updateTestStepWithFullUsage completes a step with all token usage fields, including reasoning tokens.
( t *testing.T, fixture testFixture, stepID uuid.UUID, input, output, reasoning, cacheCreation, cacheRead int64, )
| 494 | // updateTestStepWithFullUsage completes a step with all token usage |
| 495 | // fields, including reasoning tokens. |
| 496 | func updateTestStepWithFullUsage( |
| 497 | t *testing.T, |
| 498 | fixture testFixture, |
| 499 | stepID uuid.UUID, |
| 500 | input, output, reasoning, cacheCreation, cacheRead int64, |
| 501 | ) { |
| 502 | t.Helper() |
| 503 | _, err := fixture.svc.UpdateStep(fixture.ctx, chatdebug.UpdateStepParams{ |
| 504 | ID: stepID, |
| 505 | ChatID: fixture.chat.ID, |
| 506 | Status: chatdebug.StatusCompleted, |
| 507 | Usage: map[string]any{ |
| 508 | "input_tokens": input, |
| 509 | "output_tokens": output, |
| 510 | "reasoning_tokens": reasoning, |
| 511 | "cache_creation_tokens": cacheCreation, |
| 512 | "cache_read_tokens": cacheRead, |
| 513 | }, |
| 514 | }) |
| 515 | require.NoError(t, err) |
| 516 | } |
no test coverage detected