litellm/litellm-rust/crates/router
Nate Armstrong 334e7119c3
feat(gateway): serve /v1/models (#47640)
List the model groups a caller may use at GET /v1/models and /models, in the
proxy's OpenAI list shape, and answer GET /v1/models/{model_id} and
/models/{model_id} with one model or the proxy's 404

A group is listed when the caller is authorized for one of its deployments the
same way an inference request naming it would be: key and team model lists,
all-proxy-models, team-owned deployments. Groups whose deployments all set
model_info.discoverable: false are listed for the master key only, and wildcard
groups are left out. openai_routes, llm_api_routes and info_routes now allow
the listing routes
2026-10-20 17:00:42 -07:00
..
src feat(gateway): serve /v1/models (#47640) 2026-10-20 17:00:42 -07:00
tests feat(gateway): serve /v1/models (#47640) 2026-10-20 17:00:42 -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