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.
DirectAnthropicModel
One model served directly by Anthropic. This is separate from CatalogModel: direct Anthropic is a provider connection, not a deployable cloud platform.
DirectDatabricksModel
One Databricks-hosted text model with an explicitly qualified upstream route.
DirectOpenAiModel
One OpenAI model qualified through the Gateway’s direct-provider route.
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 the read-only availability observation reported by the resource heartbeat for a particular deployment.
ClientApi
A public API accepted from an application client.
DirectDatabricksUpstream
The one Databricks resource and protocol used for a direct model.
ProviderApi
The provider API used for the upstream request. This is deliberately separate from ClientApi: an adapter may expose one client API over a different provider API, but only after that exact combination is qualified.

Constants§

AI_CATALOG_REVISION
Changes whenever public model ids or their supported client APIs change. Heartbeat consumers use this to distinguish an old observation from a current catalog without duplicating the catalog in durable state.

Functions§

azure_deployments
The Azure predefined model deployments, as (deployment name, model name, version).
direct_anthropic_models
direct_databricks_models
direct_openai_models
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_direct_anthropic
resolve_direct_databricks
resolve_direct_openai
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.