Skip to Content
Anuma SDKClientInternalType AliasesLlmapiPortalChatCompletionResponse

LlmapiPortalChatCompletionResponse

LlmapiPortalChatCompletionResponse = object

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

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

client_injected_tools?

optional client_injected_tools: string[]

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

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:653 

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:657 

CreditsUsed is CostMicroUSD in credits.


extra_fields?

optional extra_fields: LlmapiChatCompletionExtraFields

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


image_model?

optional image_model: string

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

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:668 

InferenceID is the unique identifier for this inference request.


init_completion_tokens?

optional init_completion_tokens: number

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

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:676 

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:683 

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:687 

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:691 

PricingSource is which lookup calculated the costs.


provider_cost_micro_usd?

optional provider_cost_micro_usd: number

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

ProviderCostMicroUSD is what we paid the provider.


tool_call_events?

optional tool_call_events: LlmapiToolCallEvent[]

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

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:703 

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:707 

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

Last updated on