MCPcopy Index your code
hub / github.com/coder/coder / updateTestStepWithFullUsage

Function updateTestStepWithFullUsage

coderd/x/chatd/chatdebug/summary_test.go:496–516  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

494// updateTestStepWithFullUsage completes a step with all token usage
495// fields, including reasoning tokens.
496func 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}

Callers 2

updateTestStepWithUsageFunction · 0.85

Calls 2

UpdateStepMethod · 0.80
HelperMethod · 0.65

Tested by

no test coverage detected