Skip to content

ModelResponse

Normalized response from an LLM call (provider-agnostic).

finishReason: string

Why the model stopped: “stop”, “tool-calls”, “length”, “content-filter”, “error”, “other”.


optional text?: string

Generated text (present when the model returns a text response).


optional toolCalls?: ModelToolCall[]

Tool calls requested by the model (present when the model wants to use tools).


usage: Usage

Token usage for this call.