Documentation
¶
Overview ¶
Package catalog is the per-vendor model capability catalog: what each model can do, declared once per model family, independent of which provider serves it. It complements internal/data/providers.json, which is the offering registry (who serves which model, at which endpoint, with what limits) — capability facts live here, deployment facts live there.
Layout: one <vendor>.models.json data file plus one <vendor>.go loader per vendor (claude.models.json + claude.go today; openai/gemini can follow the same pattern). Each file only carries the fields its loader actually consumes — deliberately not a mirror of the vendor's full /v1/models response, whose unused fields (display names, dates, unrelated capability flags) are dead weight.
The `reasoning` block's shape and field names (supported_efforts, ...) follow OpenRouter's model-list schema rather than Anthropic's own nested `capabilities.effort.<level>.supported` tree. One field has no OpenRouter equivalent: `dialects`. OpenRouter's clients never see wire-protocol differences between backends — OpenRouter's own proxy absorbs that. This package IS that proxy layer for Anthropic, so it has to know which raw request shape a model accepts: "budget" (thinking.type=enabled + budget_tokens) and/or "adaptive" (thinking.type=adaptive). Models with no `reasoning` block at all do not support extended thinking.
Update the JSON when new models land instead of hardcoding model names in code; the completeness test in this package fails when providers.json offers a Claude model this catalog does not describe.
claude.models.snapshot.json is a separate, unmodified mirror of Anthropic's actual /v1/models response — the ground truth to cross-check claude.models.json against when adding or revising an entry. It is not embedded and no code reads it; it goes stale as new models ship (it currently covers 10 of the 19 models in claude.models.json — models added afterward had their reasoning capabilities inferred from the newest snapshot entry rather than sourced, see .design/model-data.md) and should be refreshed by hand from the live API when convenient, not on every edit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClaudeThinkingCaps ¶
type ClaudeThinkingCaps struct {
// ThinkingEnabled: accepts thinking.type=enabled with budget_tokens.
ThinkingEnabled bool
// ThinkingAdaptive: accepts thinking.type=adaptive.
ThinkingAdaptive bool
// EffortLevels: supported output_config.effort values (e.g. "low", "max").
// Empty means the model has no effort support.
EffortLevels map[string]bool
}
ClaudeThinkingCaps describes which thinking dialects a cataloged Claude model accepts.
func LookupClaudeThinkingCaps ¶
func LookupClaudeThinkingCaps(model string) (ClaudeThinkingCaps, bool)
LookupClaudeThinkingCaps resolves a model name to the catalog's thinking capabilities. The longest catalog key contained in the (lowercased) name wins; ok=false when the model is not in the catalog.
func (ClaudeThinkingCaps) SupportsEffort ¶
func (c ClaudeThinkingCaps) SupportsEffort() bool
SupportsEffort reports whether the model accepts output_config.effort at all.