Skip to content

ChatRequest

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

optional keep_alive?: string | number

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


optional max_tokens?: number

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


messages: ChatMessage[]

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


optional min_p?: number

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


model: string

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


optional num_batch?: number

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


optional num_ctx?: number

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


optional num_gpu?: number

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


optional num_predict?: number

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


optional num_thread?: number

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


optional repeat_last_n?: number

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


optional repeat_penalty?: number

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


optional seed?: number

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


optional stop?: string[]

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


optional stream?: boolean

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


optional temperature?: number

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


optional think?: boolean

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

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

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

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


optional top_p?: number

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