Add reasoning and reasoningBudgetTokens parameters to config schemas and docs

This commit is contained in:
ferenci84 2025-04-08 11:18:34 +02:00
parent 1ad3d7f1bc
commit 2c0413ecc5
4 changed files with 16 additions and 0 deletions

View file

@ -159,6 +159,8 @@ Parameters that control the behavior of text generation and completion settings.
- `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`.
- `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes).
- `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream.
- `reasoning`: Enables thinking/reasoning for Anthropic Claude 3.7+ models.
- `reasoningBudgetTokens`: Sets budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models.
Example

View file

@ -160,6 +160,8 @@ The `models` section defines the language models used in your configuration. Mod
- `topK`: Maximum number of tokens considered at each step.
- `stop`: An array of stop tokens that will terminate the completion.
- `n`: Number of completions to generate.
- `reasoning`: Boolean to enable thinking/reasoning for Anthropic Claude 3.7+ models.
- `reasoningBudgetTokens`: Budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models.
- `requestOptions`: HTTP request options specific to the model.

View file

@ -71,6 +71,16 @@
"title": "Ollama keep_alive",
"description": "The number of seconds after no requests are made to unload the model from memory. Defaults to 60*30 = 30min",
"type": "integer"
},
"reasoning": {
"title": "Reasoning",
"description": "Enable thinking/reasoning for Anthropic Claude 3.7+ models",
"type": "boolean"
},
"reasoningBudgetTokens": {
"title": "Reasoning Budget Tokens",
"description": "Set budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models",
"type": "integer"
}
}
},

View file

@ -47,6 +47,8 @@ export const completionOptionsSchema = z.object({
topK: z.number().optional(),
stop: z.array(z.string()).optional(),
n: z.number().optional(),
reasoning: z.boolean().optional(),
reasoningBudgetTokens: z.number().optional(),
});
export type CompletionOptions = z.infer<typeof completionOptionsSchema>;