Defined in: packages/components/src/agents/types.ts:4
Token usage reported by a model provider.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
completion_tokens |
number |
Tokens in the generated reply. | packages/components/src/agents/types.ts:6 |
prompt_cache_hit_tokens? |
number |
Prompt tokens served from the provider's cache, when the provider reports it. | packages/components/src/agents/types.ts:10 |
prompt_cache_miss_tokens? |
number |
Prompt tokens not served from the cache, when the provider reports it. | packages/components/src/agents/types.ts:12 |
prompt_tokens |
number |
Tokens in the request, including the conversation history. | packages/components/src/agents/types.ts:8 |
total_tokens |
number |
Sum of prompt and completion tokens. | packages/components/src/agents/types.ts:14 |