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?
optionalclient_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?
optionalcost_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?
optionalcredits_used:number
Defined in: src/client/types.gen.ts:657
CreditsUsed is CostMicroUSD in credits.
extra_fields?
optionalextra_fields:LlmapiChatCompletionExtraFields
Defined in: src/client/types.gen.ts:658
image_model?
optionalimage_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?
optionalinference_id:string
Defined in: src/client/types.gen.ts:668
InferenceID is the unique identifier for this inference request.
init_completion_tokens?
optionalinit_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?
optionalinit_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?
optionalmessages: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?
optionalportal_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?
optionalpricing_source:string
Defined in: src/client/types.gen.ts:691
PricingSource is which lookup calculated the costs.
provider_cost_micro_usd?
optionalprovider_cost_micro_usd:number
Defined in: src/client/types.gen.ts:695
ProviderCostMicroUSD is what we paid the provider.
tool_call_events?
optionaltool_call_events:LlmapiToolCallEvent[]
Defined in: src/client/types.gen.ts:699
ToolCallEvents is an array of tool call events.
tool_cost_micro_usd?
optionaltool_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?
optionaltools_checksum:string
Defined in: src/client/types.gen.ts:707
ToolsChecksum is the checksum of the tool schemas used by the AI Portal.