Skip to Content
Anuma SDKClientInternalType AliasesLlmapiPortalChatCompletionResponse

LlmapiPortalChatCompletionResponse

LlmapiPortalChatCompletionResponse = object

Defined in: src/client/types.gen.ts:776 

Portal carries non-OpenAI fields scoped to the portal under a single key so they don’t collide with the embedded SDK type’s custom JSON marshaling.

Properties

cached_tokens?

optional cached_tokens: number

Defined in: src/client/types.gen.ts:781 

CachedTokens are the prompt tokens served from the provider’s cache (cache-hit reads), summed across the MCP tool loop. Omitted from the response when zero (no cache hit reported).


client_injected_tools?

optional client_injected_tools: string[]

Defined in: src/client/types.gen.ts:785 

ClientInjectedTools are tool names the client provided in the original request.


cost_micro_usd?

optional cost_micro_usd: number

Defined in: src/client/types.gen.ts:789 

CostMicroUSD is what we charge the user (today identical to what we paid the provider).


credits_used?

optional credits_used: number

Defined in: src/client/types.gen.ts:793 

CreditsUsed is CostMicroUSD in credits.


extra_fields?

optional extra_fields: LlmapiChatCompletionExtraFields

Defined in: src/client/types.gen.ts:794 


image_model?

optional image_model: string

Defined in: src/client/types.gen.ts:800 

ImageModel is set when an image generation tool was called during the request. This allows the client to detect that the response contains generated images and render them appropriately, even when the orchestrating model is a text model.


inference_id?

optional inference_id: string

Defined in: src/client/types.gen.ts:804 

InferenceID is the unique identifier for this inference request.


init_completion_tokens?

optional init_completion_tokens: number

Defined in: src/client/types.gen.ts:808 

InitCompletionTokens are the completion tokens from the first LLM call (before the MCP tool loop).


init_prompt_tokens?

optional init_prompt_tokens: number

Defined in: src/client/types.gen.ts:812 

InitPromptTokens are the prompt tokens from the first LLM call (before the MCP tool loop).


messages?

optional messages: OpenaiChatCompletionMessageParamUnion[]

Defined in: src/client/types.gen.ts:819 

Messages contains the full conversation history when local tools need execution. This is populated when the model requests tools that are not MCP tools (client-side tools). The client should execute these tools and send a new request with this message history plus the tool results appended.


portal_injected_tools?

optional portal_injected_tools: string[]

Defined in: src/client/types.gen.ts:823 

PortalInjectedTools are tool names the portal’s classifier added to the request.


pricing_source?

optional pricing_source: string

Defined in: src/client/types.gen.ts:827 

PricingSource is which lookup calculated the costs.


provider_cost_micro_usd?

optional provider_cost_micro_usd: number

Defined in: src/client/types.gen.ts:831 

ProviderCostMicroUSD is what we paid the provider.


tool_call_events?

optional tool_call_events: LlmapiToolCallEvent[]

Defined in: src/client/types.gen.ts:835 

ToolCallEvents is an array of tool call events.


tool_cost_micro_usd?

optional tool_cost_micro_usd: number

Defined in: src/client/types.gen.ts:839 

ToolCostMicroUSD is the aggregate cost from MCP tool calls (subset of CostMicroUSD).


tools_checksum?

optional tools_checksum: string

Defined in: src/client/types.gen.ts:843 

ToolsChecksum is the checksum of the tool schemas used by the AI Portal.

Last updated on