can1357/oh-my-pi · error
Model ${model.provider}/${model.id} does not support thinkin
Error message
Model ${model.provider}/${model.id} does not support thinking What it means
requireSupportedEffort validates that a model can do extended/reasoning 'thinking' before applying an effort level. If the ApiModel's reasoning flag is falsy the model cannot accept any thinking effort, so any request to set one throws. It is the gate used by level, mapped, effort, getGoogleBudget, and supported.
Source
Thrown at packages/catalog/src/model-thinking.ts:69
const requestedIndex = THINKING_EFFORTS.indexOf(requested);
if (requestedIndex === -1) {
return undefined;
}
let clamped: Effort | undefined;
for (const effort of levels) {
if (THINKING_EFFORTS.indexOf(effort) > requestedIndex) {
break;
}
clamped = effort;
}
return clamped ?? levels[0];
}
export function requireSupportedEffort<TApi extends Api>(model: ApiModel<TApi>, effort: Effort): Effort {
if (!model.reasoning) {
throw new Error(`Model ${model.provider}/${model.id} does not support thinking`);
}
const levels = getSupportedEfforts(model);
if (!levels.includes(effort)) {
throw new Error(
`Thinking effort ${effort} is not supported by ${model.provider}/${model.id}. Supported efforts: ${levels.join(", ")}`,
);
}
return effort;
}
/** Maps a normalized thinking effort to Google's `thinkingLevel` enum values.
* When a collapsed family routes `minimal` onto the same wire id as `low`
* (Antigravity Gemini 3.6/3.7 Flash), emit `LOW` — Cloud Code Assist rejects
* `MINIMAL` on those `-low` SKUs.
*/
export function mapEffortToGoogleThinkingLevel<TApi extends Api>(
effort: Effort,
model?: ApiModel<TApi>,View on GitHub (pinned to 9690622007)
Solutions
- Check model.reasoning before requesting an effort level
- Pick a different model id that supports thinking (e.g. a reasoning-class model)
- Remove the thinking/effort config from the request for this model
- If the model does support thinking, fix discovery/catalog metadata so `reasoning` is set
Example fix
// before
const model = await getModel("my-provider/basic-model");
ctx.thinking = { effort: "high" };
// after
const model = await getModel("my-provider/basic-model");
if (model.reasoning) ctx.thinking = { effort: "high" }; Defensive patterns
Strategy: validation
Validate before calling
import { supported } from "@oh-my-pi/pi-catalog/model-thinking";
if (!model.reasoning || !supported(model).length) {
// skip thinking config for this model
}
Type guard
function supportsThinking(model: ApiModel<Api>): boolean {
return model.reasoning === true;
} Try / catch
try {
ctx.thinking = { effort: requireSupportedEffort(model, desiredEffort) };
} catch (err) {
if (err instanceof Error && /does not support thinking/.test(err.message)) {
ctx.thinking = undefined; // degrade to non-thinking request
} else throw err;
} Prevention
- Gate thinking config on model.reasoning before applying it
- Use the supported()/level() helpers instead of hard-coding efforts
- Re-check reasoning flags after switching model ids or updating the catalog
When it happens
Trigger: Calling model-thinking helpers (effort(), level(), mapped(), getGoogleBudget(), requireSupportedEffort()) with an Effort value on a model whose `reasoning` property is undefined/false.
Common situations: Hard-coding reasoning: 'high' for a non-reasoning model, a model id swap to a non-thinking variant, or a dynamically discovered model lacking reasoning metadata.
Related errors
- Thinking effort ${effort} is not supported by ${model.provid
- Received thinking_delta for non-thinking content
- Received thinking_end for non-thinking content
- Anthropic thinking budget requires max_tokens greater than $
- Model ${spec.provider}/${spec.id} resolved to an empty think
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/e248ab0c5848f79a.
Report an issue: GitHub.