Skip to content

Commit 8c4f49c

Browse files
committed
fix(ollama): show full thinking levels for live-discovered models in /think menu
When an Ollama model is live-discovered (not in configured catalog), the provider's resolveThinkingProfile received reasoning:undefined and returned the non-reasoning profile with only ['off']. This made the /think inline keyboard show no useful options. Change the ternary to an explicit false check: reasoning===false still yields the off-only profile, but undefined (live-discovered) now defaults to the reasoning profile so /think shows realistic choices for newly discovered models. Fixes #93835
1 parent 788eb2e commit 8c4f49c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

extensions/ollama/provider-policy-api.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,12 @@ export function resolveThinkingProfile({
5656
}: {
5757
reasoning?: boolean;
5858
}): ProviderThinkingProfile {
59-
return reasoning ? OLLAMA_REASONING_THINKING_PROFILE : OLLAMA_NON_REASONING_THINKING_PROFILE;
59+
// When reasoning is not explicitly configured (live-discovered models),
60+
// default to the reasoning profile because Ollama models typically
61+
// support thinking capabilities even when unknown to the catalog.
62+
// Explicit reasoning:false from config still yields the off-only profile.
63+
if (reasoning === false) {
64+
return OLLAMA_NON_REASONING_THINKING_PROFILE;
65+
}
66+
return OLLAMA_REASONING_THINKING_PROFILE;
6067
}

0 commit comments

Comments
 (0)