litellm/litellm-rust/crates/llms
Nate Armstrong 59f0026f9a
feat(gateway): serve /v1/messages for chat-completions providers (#47642)
* feat(gateway): serve /v1/messages for chat-completions providers

A /v1/messages request for a deployment with no Messages API of its own
(openai, azure, hosted_vllm and the other OpenAI-compatible providers)
failed with "invalid provider". The messages route now translates the
request to a Chat Completions body, sends it through the chat route's
OpenAI passthrough and translates the JSON or SSE answer back into
Anthropic Messages, as the Python proxy's pass-through adapter does

* fix(gateway): account translated messages by upstream usage and keep chat code out of the wheel

Translated /v1/messages calls now record what the chat provider reported
(usage and response model) apart from the Anthropic wire events. A stream
cut off before its usage chunk records no usage, so budgets and rate limits
keep their reservations, and Azure deployments priced by response model
price translated Messages the same way as chat completions.

ChatCompletions is now its own machine that the gateway picks per
deployment instead of a branch inside MessagesRoute, so the Python wheel no
longer links the OpenAI-compatible providers and their tokenizer data.
2026-10-20 15:15:10 -07:00
..
src feat(gateway): serve /v1/messages for chat-completions providers (#47642) 2026-10-20 15:15:10 -07:00
tests feat(rust): settle EdenAI Messages reported cost (#45698) 2026-10-12 17:39:08 -07:00
AGENTS.md feat(rust): add native OpenRouter Responses (#46000) 2026-10-15 11:02:03 -07:00
Cargo.toml feat(gateway): land the chat provider series and full-feature load test on the poc branch (#47388) 2026-10-19 12:47:12 -07:00