Skip to content

Commit 8abdc3c

Browse files
committed
fix(think): skip provider profile when model not in catalog
When a specific model was requested but is not found in the provider catalog and the provider profile only offers "off", skip the profile and fall through to the base profile. This prevents the /think menu from showing only "off" for live-discovered models (e.g. Ollama) that report thinking capabilities but aren't yet in the catalog.
1 parent d03ef9d commit 8abdc3c

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

src/auto-reply/thinking.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,22 @@ export function resolveThinkingProfile(params: {
216216
normalized.levels.length > 0 &&
217217
(context.reasoning !== false || pluginProfile.preserveWhenCatalogReasoningFalse === true)
218218
) {
219-
return normalized;
219+
// When a specific model was requested but not found in the catalog and
220+
// the provider profile only offers "off", skip the profile and fall
221+
// through to the base profile. The catalog may be incomplete (e.g. a
222+
// live-discovered Ollama model that reports thinking capabilities), and
223+
// showing more levels is safe — the API rejects unsupported levels at
224+
// runtime, while hiding valid levels blocks supported functionality.
225+
if (
226+
context.reasoning === undefined &&
227+
context.modelId &&
228+
normalized.levels.length === 1 &&
229+
normalized.levels[0]?.id === "off"
230+
) {
231+
// fall through to base profile
232+
} else {
233+
return normalized;
234+
}
220235
}
221236
}
222237
if (context.reasoning === false) {

0 commit comments

Comments
 (0)