litellm/litellm-rust/crates/router
narmstrong-berry c4f3565193
feat(gateway): Azure OpenAI chat completions through the OpenAI passthrough
Adds azure/<deployment> chat completions, streaming and not, on the same
passthrough the openai/ route uses. The request goes to the deployment
path with the api-version query, or to /openai/v1/ for the v1, latest and
preview versions, with api_base, api_key and api_version falling back to
the AZURE_* variables and os.environ references resolved as the proxy
does. A key is sent as api-key, and an azure_ad_token or an Entra ID
token from auth-azure goes as a Bearer token. The body follows the
proxy's gpt, o-series and gpt-5 param rules, picked by base_model or the
deployment name and reading model capabilities from the cost map, so an
unsupported param is refused unless drop_params allows it to be dropped.
Spend is priced as the proxy prices Azure, by azure/<base_model> when one
is set and otherwise by the model the response names, and a content
filter error keeps Azure's inner error for the client
2026-10-19 09:59:06 -07:00
..
src feat(gateway): Azure OpenAI chat completions through the OpenAI passthrough 2026-10-19 09:59:06 -07:00
tests feat(gateway): Azure OpenAI chat completions through the OpenAI passthrough 2026-10-19 09:59:06 -07:00
Cargo.toml feat(gateway): share router cooldowns and follow proxy key invalidations through Redis (#47017) 2026-10-17 16:34:03 -07:00
README.md chore(rust): prune inference deps and rewrite layering docs (#44836) 2026-10-06 07:17:27 -07:00

litellm-router scaffolds the model-list setup and deployment lookup portion of Python's litellm.Router. Router::from_model_list(&config.model_list) maps configured public names to provider deployments. Programmatic callers can collect (String, Deployment) entries into a Router

Lookup is exact and returns None for an unknown name. This extraction preserves the gateway's existing behavior: the last entry wins when public names repeat. Multiple deployments per model group, routing strategies, retries, cooldowns, and fallbacks are not implemented yet

The router owns deployment configuration and selection. The gateway handles HTTP errors and responses, while the inference-<fmt> crates execute provider calls and resolve credentials