Skip to main content

Module catalog

Module catalog 

Source
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§

ModelCapEntry
One catalog row: a match rule plus the capability columns.

Enums§

EffortCeiling
Highest output_config.effort tier the model accepts (ordered). Consumed by the anthropic adapter only. Every xhigh-capable model also accepts max (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.
MatchRule
How a catalog row matches a model id.
ThinkingShape
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-lite before gemini-2.5-flash, the specific claude-* prefixes before the bare claude- catch-all, gpt-5 Prefix (temperature rejected) before gpt-5 Substring (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 get UNKNOWN_MODEL.