Skip to main content

Module models_api

Module models_api 

Source
Expand description

GET /v1/models — the org’s model catalog, served on the proxy port (enterprise#63).

IDE clients (Cursor, OpenCode, Codex, Claude Code) call this endpoint to discover selectable models and to verify a configured API key. The catalog is the org’s curated namespace: every [proxy.routing] alias (e.g. "zuehlke/fast" = "foundry:deepseek-v4-flash") is listed under its alias name — the routing engine rewrites it to the real provider/model on the forward path. Tier rules are intent-based and transparent, so they are deliberately not listed as selectable names.

Auth: the route sits behind the standard proxy auth guard — a personal gateway key (or the org Bearer token / a provider key on loopback) authenticates. A 200 from this endpoint therefore doubles as the “is my key valid?” check clients run at setup time.

Shape: OpenAI list format by default; the Anthropic variant is returned when the request carries Anthropic client headers (anthropic-version / x-api-key). Output is deterministic (#498): alias order comes from the config’s BTreeMap, the created stamp is a fixed constant — never a live clock.

Functions§

handler
GET /v1/models (and bare /models, normalized before routing).