LlmapiChatCompletionUsage
LlmapiChatCompletionUsage =
OpenaiCompletionUsage&object
Defined in: src/clientCompat.ts:49
The pre-migration usage shape: standard OpenAI token counts plus the
portal’s cost/credit fields all on one flat object. The new schema splits
these — OpenAI tokens stay in usage, portal cost fields move to the
portal envelope — so this type no longer appears in the generated client.
Kept as a named alias because it is a public export: removing it on a
non-major bump would break consumers (CLI, client, externals) that pin the
type by name. The SDK’s buildFinalResponse mirrors cost fields back into
usage, so a streaming response’s usage still matches this shape.
Type Declaration
cost_micro_usd?
optionalcost_micro_usd:number
credits_used?
optionalcredits_used:number
init_completion_tokens?
optionalinit_completion_tokens:number
init_prompt_tokens?
optionalinit_prompt_tokens:number
pricing_source?
optionalpricing_source:string
provider_cost_micro_usd?
optionalprovider_cost_micro_usd:number
tool_cost_micro_usd?
optionaltool_cost_micro_usd:number