Skip to content

server

OpenAI-compatible HTTP proxy in front of Databricks Model Serving.

Databricks serving endpoints speak OpenAI wire formats, so this server is a thin pass-through: it resolves the request’s (possibly fuzzy) model to a real endpoint id via the ModelProxyBackend, stamps a fresh auth header, and forwards to the right Databricks URL:

  • Chat Completions → /serving-endpoints/<name>/invocations, except for Responses-only models (Codex) which are translated and sent to /serving-endpoints/responses.
  • Responses → native /serving-endpoints/responses (OpenAI-family) or /serving-endpoints/open-responses (Claude/Gemini/…), body forwarded as-is. No chat round-trip.

Any OpenAI-compatible tool (iTerm, editors, the openai SDK, Codex CLI) can point its base URL at this server and use loose model names.

Routes:

  • GET /health, GET / liveness
  • GET /v1/models, GET /models list resolvable endpoints. Emits the OpenAI {object:"list",data:[…]} shape by default; when the request looks like the Codex CLI (a client_version query param, which Codex always sends) it emits Codex’s {models:[{slug,…}]} shape instead, so both standard OpenAI clients and Codex can enumerate the catalogue.
  • POST /v1/chat/completions proxy (also /completions, /v1/completions, /v1/embeddings, and the un-prefixed variants)
  • POST /v1/responses OpenAI Responses API, forwarded to Databricks’ native Responses / Open Responses surface.