Expand description
Catalog - Workers AI model records and OpenRouter-format payload normalization.
This module owns the typed catalog contract consumed by the CLI
(auth-cloudflare catalog get --format json), the Hermes plugin, and the
conformance harness. The three-state CapabilityState deliberately
distinguishes unknown from unsupported: the OpenRouter-format catalog
omits supported_parameters for models whose docs confirm function
calling, and incomplete metadata must never be encoded as Unsupported.
Structs§
- Capability
Provenance - Where each capability/field fact came from (provenance).
- Catalog
Filters - Filters applied when the snapshot was produced.
- Catalog
Snapshot - Versioned snapshot of the whole catalog - the JSON contract envelope.
- Model
Capabilities - Capability matrix for a model - the picker’s tool/vision/reasoning view.
- Model
Limits - Context/output limits.
- Model
Protocol - Protocol facts for one model.
- Model
Record - Normalized Workers AI model record - one source of truth for the picker, the fallback list, and generated YAML.
- Pricing
PerMillion - Per-million-token pricing (normalized to USD).
Enums§
- Availability
- Availability of a model for this account.
- Capability
State - Capability verdict for one model feature.
- Catalog
Source - Where the snapshot data came from.
- Model
Role - Role of a Workers AI model in the provider catalog.
- Visibility
- Picker visibility policy for a model.
Constants§
- EXPERIMENTAL_
MODELS - Models currently marked experimental by project policy. Delivery conformance below threshold - selectable, never the default.
- FALLBACK_
MODELS - Curated fallback catalog - the account-verified 27 Cloudflare-hosted Workers AI chat
models, filtered to a practical coding/tool set (minus
llama-guard-3-8b). - HIDDEN_
MODELS - Models hidden from the primary agent picker (safety/classification).
- MODEL_
FAMILIES_ BY_ ID - Hermes
model_familyvalues for the plugin’s primary models (mirrors the plugin’s PRIMARY_AGENT_MODELS / FALLBACK_MODELS sets). Unknown models yield no family (the sync record omits the field). - REASONING_
EFFORTS_ BY_ MODEL - Reasoning-confirmed models and the
reasoning_effortenum each accepts. - VISION_
CONFIRMED - Vision-capable Cloudflare models (llama-3.2-11b-vision accepts image
input). The
models syncrecords carrysupports_visionso Hermes’ per-model catalog knows which Cloudflare models take images; the plugin’s default_vision_model() returns this id for auxiliary vision calls.
Functions§
- model_
family_ for - Hermes
model_familyfor id, or None. - picker_
models_ from_ openrouter - Normalize a full OpenRouter-format payload → picker model list.
- reasoning_
efforts_ for - Reasoning effort vocabulary for id, or an empty slice when the model is
not a documented reasoning model (the sync record then omits
reasoningandreasoning_effortsentirely). - vision_
confirmed_ for - True when id is a vision-capable Cloudflare model.