Skip to content

UsageSummary

UsageSummary = object

Provider usage summary attached to a normalized harness run.

const usage: UsageSummary = {
provider: "openai",
model: "gpt-4o-mini",
inputTokens: 212,
outputTokens: 48,
totalTokens: 260,
};

optional inputTokens?: number

Input, prompt, or request tokens consumed by the run.


optional metadata?: Record<string, JsonValue>

Provider-specific JSON-safe usage details. Cost estimates belong here.


optional model?: string

Model used for the application run.


optional outputTokens?: number

Output or completion tokens produced by the run.


optional provider?: string

Provider that served the application run.


optional reasoningTokens?: number

Reasoning tokens reported by providers that expose them.


optional retries?: number

Retry count observed during the run.


optional toolCalls?: number

Count of tool calls observed during the run.


optional totalTokens?: number

Total token count reported by the provider or adapter.