mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* 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. |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| AGENTS.md | ||
| Cargo.toml | ||