Skip to main content

Module catalog

Module catalog 

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

CapabilityProvenance
Where each capability/field fact came from (feedback 02 provenance).
CatalogFilters
Filters applied when the snapshot was produced.
CatalogSnapshot
Versioned snapshot of the whole catalog - the JSON contract envelope.
ModelCapabilities
Capability matrix for a model - the picker’s tool/vision/reasoning view.
ModelLimits
Context/output limits.
ModelProtocol
Protocol facts for one model.
ModelRecord
Normalized Workers AI model record - one source of truth for the picker, the fallback list, and generated YAML.
PricingPerMillion
Per-million-token pricing (normalized to USD, per feedback 01 contract).

Enums§

Availability
Availability of a model for this account.
CapabilityState
Capability verdict for one model feature.
CatalogSource
Where the snapshot data came from.
ModelRole
Role of a Workers AI model in the provider catalog.
Visibility
Picker visibility policy for a model (feedback 01/02).

Constants§

EXPERIMENTAL_MODELS
Models currently marked experimental by project policy (feedback 01/02). 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).

Functions§

picker_models_from_openrouter
Normalize a full OpenRouter-format payload → picker model list.