Skip to main content

Module ai_catalog

Module ai_catalog 

Source
Expand description

Curated, per-cloud model catalog for the AI gateway.

Single source of truth for which public model ids each cloud exposes, the upstream id the gateway forwards, and the wire protocol of the model’s native endpoint. Backs getAvailableModels() and the gateway’s /v1/models, and the Azure controller deploys the Azure entries as named deployments at provision time (see azure_deployments).

A model is includable only if its cloud serves it over a protocol the client SDK already speaks (OpenAI Chat Completions or Anthropic Messages), so the gateway forwards the request body untranslated.

Structs§

CatalogModel
One curated model: the public id an app requests, the cloud that serves it, the upstream id the gateway forwards (for Azure this is the deployment name), and the protocol of its native endpoint.
ResponsesTarget
Where a model sits on the bedrock-mantle Responses API.

Enums§

Activation
The one-time action, if any, a customer must take in the cloud provider before the gateway can invoke a model. Static per (provider, cloud), surfaced in docs and the example README. Distinct from runtime availability, which getAvailableModels probes live per deployment.
Protocol
The upstream wire protocol a model speaks. The gateway forwards to the matching native endpoint; the client SDK is responsible for speaking it.

Functions§

azure_deployments
The Azure predefined model deployments, as (deployment name, model name, version).
lookup
The catalog model for a public id, or None if it is not exposed.
models_for
resolve
The catalog model for a client-sent model id, accepting the Anthropic-native spellings agent CLIs actually send alongside the catalog’s public ids.
resolve_for
The catalog model for a client-sent model id on a specific cloud. A public id can appear once per cloud (Claude serves on more than one), so resolution must scope to the binding’s cloud rather than filter a first-match lookup — the first match is another cloud’s entry whenever ids overlap.
responses_target
The bedrock-mantle Responses target for a public model id, or None when the model is not servable over the Responses API.