Expand description
Normalized model catalog types and provider-specific parsers.
This module is intentionally parser-first: unit tests exercise static JSON fixtures only. Live network fetches are thin wrappers around these parsers.
§Provider research notes (spec appendix)
OpenRouter GET https://openrouter.ai/api/v1/models — no auth required.
Metadata: id, name, context_length, supported_parameters, pricing, top_provider,
architecture.input_modalities. Reasoning detected from supported_parameters:
- “reasoning”/“include_reasoning” => OpenRouter reasoning request
- “reasoning_effort” => effort-style (o-series via OR)
- “verbosity” => Anthropic-style through OR
- pricing.internal_reasoning => Gemini thinking-token pricing
Groq GET https://api.groq.com/openai/v1/models — Bearer auth.
Fields: id, active, context_window, owned_by. No reasoning in wire.
NVIDIA NIM GET https://integrate.api.nvidia.com/v1/models — no auth for list.
Minimal: id, object, created, owned_by. Thinking via system-prompt injection.
Anthropic GET https://api.anthropic.com/v1/models — paginated, Bearer/x-api-key.
Optional capabilities.thinking / capabilities.effort.
Structs§
- Anthropic
Catalog Page - Anthropic
Catalog Provider - Catalog
Model - Normalized model catalog entry. Every provider handler produces these.
- Codex
Catalog Provider - Generic
Catalog Provider - Groq
Catalog Provider - Nvidia
Catalog Provider - Open
Router Catalog Provider - Pricing
Summary - Pricing metadata. Stored as decimal-string USD/token as returned by OpenRouter.
Enums§
- Catalog
Provider Kind - Catalog
Source - Modality
- Input/output modality.
- Reasoning
Support - Normalized reasoning/thinking capability for a model.
Constants§
Traits§
Functions§
- anthropic_
models_ url - catalog_
provider_ for - codex_
static_ catalog_ models - fetch_
catalog_ models - Fetch catalog models for any registered provider.
OpenRouter uses its rich parser; all others use the generic parser.
Compatible shim: callers that previously used
registry::fetch_provider_modelsand then mapped toExpandedModelEntrycan switch to this. - fetch_
generic_ catalog_ models - Fetch a generic provider’s
/modelsendpoint. - fetch_
openrouter_ catalog_ models - Fetch the OpenRouter live model list. Auth not required.
- from_
static_ seed - Build a static-fallback CatalogModel from a (id, label) pair.
- infer_
groq_ reasoning - infer_
nvidia_ reasoning - merge_
catalog_ pages - parse_
anthropic_ catalog_ models - parse_
anthropic_ catalog_ page - parse_
generic_ catalog_ models - Parse a
{data:[{id,name?}]}response. Identical filtering behaviour toregistry::parse_provider_models_response. - parse_
groq_ catalog_ models - parse_
nvidia_ catalog_ models - parse_
openrouter_ catalog_ models - Parse an OpenRouter
/modelsJSON body into CatalogModel entries. Pure function — no network I/O — safe to unit-test with fixtures. - static_
seeds_ from_ spec - Convert all static seeds in a ProviderSpec to CatalogModel entries.