Skip to content

ChatRequest

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

optional keep_alive?: string | number

Defined in: src/lib/providers/types.ts:117


optional max_tokens?: number

Defined in: src/lib/providers/types.ts:118


messages: ChatMessage[]

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


optional min_p?: number

Defined in: src/lib/providers/types.ts:112


model: string

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


optional num_batch?: number

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


optional num_ctx?: number

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


optional num_gpu?: number

Defined in: src/lib/providers/types.ts:115


optional num_predict?: number

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


optional num_thread?: number

Defined in: src/lib/providers/types.ts:114


optional reasoningEffort?: ReasoningEffort

Defined in: src/lib/providers/types.ts:126

Provider-neutral user-selected reasoning control. auto is omitted.


optional repeat_last_n?: number

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


optional repeat_penalty?: number

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


optional seed?: number

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


optional stop?: string[]

Defined in: src/lib/providers/types.ts:113


optional stream?: boolean

Defined in: src/lib/providers/types.ts:119


optional temperature?: number

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


optional think?: boolean | "medium" | "high" | "max" | "low"

Defined in: src/lib/providers/types.ts:124

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?: "required" | "none" | "auto"

Defined in: src/lib/providers/types.ts:141

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: src/lib/providers/types.ts:132

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: src/lib/providers/types.ts:106


optional top_p?: number

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