Expand description
The data-driven model-capability catalog: one FIRST-MATCH-WINS const table replacing the model-name string gates that were scattered across the adapters (anthropic thinking/temperature/effort tiers, gemini thinking dispatch, ollama’s gpt-oss think-string, openai-compat reasoning-model and vision markers) and the domain’s static context windows.
Each COLUMN is consulted only by the consumers named on its field doc, so
a cross-provider match can never change behavior an adapter didn’t already
have. Ollama’s /api/show probes remain authoritative for local models’
vision/thinking/context — the catalog never overrides a probe.
Deliberate behavior deltas from the old scattered gates (both accuracy
fixes, pinned by tests): matching is uniformly case-insensitive (the old
openai-compat reasoning gate was case-sensitive), and the gpt-5/gpt-4.1
static 400k context window now applies through any provider (previously
gated on provider == "openai").
Structs§
- Model
CapEntry - One catalog row: a match rule plus the capability columns.
Enums§
- Effort
Ceiling - Highest
output_config.efforttier the model accepts (ordered). Consumed by the anthropic adapter only. Every xhigh-capable model also acceptsmax(verified against the effort doc), so one ordered ceiling encodes the old supports_effort / supports_max_effort / supports_xhigh_effort trio:> None⇒ effort accepted,>= Max⇒ “max” accepted,>= XHigh⇒ “xhigh” accepted. - Match
Rule - How a catalog row matches a model id.
- Thinking
Shape - Which thinking/reasoning wire shape the model’s requests use.
Consumed by the anthropic, gemini, and ollama adapters — each reacts only
to its own variants and treats everything else as
ProviderDefault.
Constants§
- CATALOG
- The catalog. ORDER MATTERS — first match wins. Keep more-specific rules
above the family catch-alls they share a prefix/substring with (pinned by
the ordering tests):
gemini-2.5-flash-litebeforegemini-2.5-flash, the specificclaude-*prefixes before the bareclaude-catch-all,gpt-5Prefix (temperature rejected) beforegpt-5Substring (accepted). - UNKNOWN_
MODEL - The default row for models no rule matches: provider-default thinking, temperature accepted, no effort, no vision, no static window.
Functions§
- lookup
- Look up the capability row for a model id (bare or
provider/-prefixed, case-insensitive). Unmatched ids getUNKNOWN_MODEL.