Skip to Content
Anuma SDKClientInternalType AliasesLlmapiChatCompletionUsage

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?

optional cost_micro_usd: number

credits_used?

optional credits_used: number

init_completion_tokens?

optional init_completion_tokens: number

init_prompt_tokens?

optional init_prompt_tokens: number

pricing_source?

optional pricing_source: string

provider_cost_micro_usd?

optional provider_cost_micro_usd: number

tool_cost_micro_usd?

optional tool_cost_micro_usd: number

Last updated on