You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reasoning effort tiers are still hardcoded / manually declared — expose them from the models.dev catalog like limits and modalities (#11959 follow-up) #13393
#11959 landed a models.dev-backed catalog for context windows, output limits, and input modalities (merged 2026-10-02, after the 0.24.7 stable). Reasoning effort tiers did not make it into scope (the PR description says so explicitly). Today they come from four places:
the built-in provider registry (ALL_PROVIDERS[].models[].capabilities.reasoning — inline entries for qwen/glm models),
hardcoded per-family tables (getGptReasoningCapabilities for gpt-* models, anthropicSupportedEffortTiers for claude),
per-surface wire adapters, and
manual capabilities.reasoning declarations in user config (parseModelReasoningCapabilities).
For any model not covered by any of those, /effort offers the full default tier ladder and clampReasoningEffort clamps to whatever the current surface supports — with no UI-visible signal (at most a one-time debug-log warning), so the user never learns what the model actually accepts.
Meanwhile the data to fix this is already in the catalog that was just merged:
models.dev api.json exposes reasoning_options per model: {type: "effort", values: [...]} (3,865 entries), {type: "budget_tokens", min and/or max} (599), and {type: "toggle"} (on/off only, 1,396). Spot-checked 2026-10-04: anthropic/claude-opus-5 → ["low","medium","high","xhigh","max"], matching the native Anthropic API exactly.
Provider APIs increasingly advertise this natively:
AnthropicGET /v1/models → capabilities.effort with per-level support (low/medium/high/max/xhigh, each CapabilitySupport{supported}) — the richest source, needs no catalog at all;
The base OpenAI-compatible GET /v1/models schema has no capability fields (verified against the official openai-openapi spec), so catalog+native-API discovery is the only workable route for non-first-party endpoints.
Proposal
Extend the #11959 precedence chain to reasoning capabilities (the built-in provider registry is the natural insertion point — the inherited slot in validateReasoningCapabilities):
Open question — vocabulary bridge: the catalog uses minimal (e.g. openai/gpt-5 → ["minimal","low","medium","high"]), while qwen-code tiers are low..max plus thinking-off. Either drop out-of-vocabulary values or add the tier.
Expected benefit
/effort shows the real tier list for catalog-covered models without user config;
fewer silent clamps (clampReasoningEffort operates on real data instead of surface defaults);
unknown/aliased ids keep today's behavior (catalog miss → fallback), so no regression path;
The catalog lists model capability, not endpoint semantics. Per-provider wire adapters must stay authoritative where they collapse tiers (e.g. DeepSeek maps low/medium → high), hence the precedence order above.
models.dev carries no mandatory/can-disable signal. The hardcoded gpt tables encode thinkingMandatory (e.g. gpt-5); a catalog-derived capability for a mandatory-reasoning model outside the tables would let /effort offer disabling thinking, which the API would reject. Catalog-derived capabilities should either default thinking to always-on or leave canDisable adapter-owned.
Summary
#11959 landed a models.dev-backed catalog for context windows, output limits, and input modalities (merged 2026-10-02, after the 0.24.7 stable). Reasoning effort tiers did not make it into scope (the PR description says so explicitly). Today they come from four places:
ALL_PROVIDERS[].models[].capabilities.reasoning— inline entries for qwen/glm models),getGptReasoningCapabilitiesfor gpt-* models,anthropicSupportedEffortTiersfor claude),capabilities.reasoningdeclarations in user config (parseModelReasoningCapabilities).For any model not covered by any of those,
/effortoffers the full default tier ladder andclampReasoningEffortclamps to whatever the current surface supports — with no UI-visible signal (at most a one-time debug-log warning), so the user never learns what the model actually accepts.Meanwhile the data to fix this is already in the catalog that was just merged:
api.jsonexposesreasoning_optionsper model:{type: "effort", values: [...]}(3,865 entries),{type: "budget_tokens", min and/or max}(599), and{type: "toggle"}(on/off only, 1,396). Spot-checked 2026-10-04:anthropic/claude-opus-5→["low","medium","high","xhigh","max"], matching the native Anthropic API exactly.GET /v1/models→capabilities.effortwith per-level support (low/medium/high/max/xhigh, eachCapabilitySupport{supported}) — the richest source, needs no catalog at all;GET /v1/models→reasoning: {supported_efforts, default_effort, mandatory}plussupported_parameters(includesreasoning_effort);POST /api/show→thinking: {values: [...], default}.The base OpenAI-compatible
GET /v1/modelsschema has no capability fields (verified against the officialopenai-openapispec), so catalog+native-API discovery is the only workable route for non-first-party endpoints.Proposal
Extend the #11959 precedence chain to reasoning capabilities (the built-in provider registry is the natural insertion point — the
inheritedslot invalidateReasoningCapabilities):Mapping sketch:
reasoning_optionstype: "effort",valueseffortslist for/efforttype: "budget_tokens",min/max/effortladder)type: "toggle"toggleOnly: true(already representable)Open question — vocabulary bridge: the catalog uses
minimal(e.g.openai/gpt-5→["minimal","low","medium","high"]), while qwen-code tiers arelow..maxplus thinking-off. Either drop out-of-vocabulary values or add the tier.Expected benefit
/effortshows the real tier list for catalog-covered models without user config;clampReasoningEffortoperates on real data instead of surface defaults);Caveats (from probing real endpoints)
low/medium → high), hence the precedence order above.thinkingMandatory(e.g. gpt-5); a catalog-derived capability for a mandatory-reasoning model outside the tables would let/effortoffer disabling thinking, which the API would reject. Catalog-derived capabilities should either default thinking to always-on or leavecanDisableadapter-owned.capabilities.effortfromGET /v1/models.Related
Environment
reasoningEffortsForCapability/parseModelReasoningCapabilities); catalog not present in 0.24.7 stable, present in nightlies after feat(core): resolve model limits and modalities from a models.dev catalog #11959.