We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8347dc0 commit 82ab888Copy full SHA for 82ab888
1 file changed
extensions/ollama/src/stream.ts
@@ -205,7 +205,8 @@ export function createConfiguredOllamaCompatStreamWrapper(
205
// Only apply the think parameter for models that are known to support thinking.
206
// Models like qwen2.5:0.5b don't support the think parameter at all and will
207
// return a 400 error if the parameter is sent (even with think=false).
208
- const supportsThinking = isReasoningModelHeuristic(ctx.modelId);
+ // Check both the heuristic (model ID patterns) AND explicit model config reasoning flag.
209
+ const supportsThinking = isReasoningModelHeuristic(ctx.modelId) || ctx.model?.reasoning === true;
210
211
if (supportsThinking && ctx.thinkingLevel === "off") {
212
streamFn = createOllamaThinkingWrapper(streamFn, false);
0 commit comments