Skip to content

ChatRequest

Defined in: lib/providers/types.ts:93

optional keep_alive?: string | number

Defined in: lib/providers/types.ts:109


optional max_tokens?: number

Defined in: lib/providers/types.ts:110


messages: ChatMessage[]

Defined in: lib/providers/types.ts:95


optional min_p?: number

Defined in: lib/providers/types.ts:104


model: string

Defined in: lib/providers/types.ts:94


optional num_batch?: number

Defined in: lib/providers/types.ts:108


optional num_ctx?: number

Defined in: lib/providers/types.ts:102


optional num_gpu?: number

Defined in: lib/providers/types.ts:107


optional num_predict?: number

Defined in: lib/providers/types.ts:103


optional num_thread?: number

Defined in: lib/providers/types.ts:106


optional repeat_last_n?: number

Defined in: lib/providers/types.ts:100


optional repeat_penalty?: number

Defined in: lib/providers/types.ts:99


optional seed?: number

Defined in: lib/providers/types.ts:101


optional stop?: string[]

Defined in: lib/providers/types.ts:105


optional stream?: boolean

Defined in: lib/providers/types.ts:111


optional temperature?: number

Defined in: lib/providers/types.ts:96


optional think?: boolean

Defined in: lib/providers/types.ts:116

Ollama thinking toggle. Used for short internal utility calls where hidden reasoning would waste time and never be shown to the user.


optional tool_choice?: "auto" | "none" | "required"

Defined in: lib/providers/types.ts:131

Tool-call policy. “none” forbids new tool calls while keeping the tools array in the payload, so strict OpenAI-compatible endpoints that reject a message history with tool turns but no tools field do not 400. Used by the synthesis pass after the tool loop hits its iteration cap. Ollama has no such param, so its adapter expresses “none” by omitting tools (it accepts tool history without them).


optional tools?: ToolDefinition[]

Defined in: lib/providers/types.ts:122

Tool definitions offered to the model. Only set for tool-capable models (gated on resolved toolCalling); when absent the request is identical to the pre-tool-calling wire shape, so non-tool models are unaffected.


optional top_k?: number

Defined in: lib/providers/types.ts:98


optional top_p?: number

Defined in: lib/providers/types.ts:97