litellm/litellm-rust
mateo-berri 0a7f656ef1 fix(gateway): default max_tokens for Anthropic chat completions
When neither the client nor the deployment set max_tokens, the Rust gateway sent Anthropic chat requests without it and Anthropic answered 400 "max_tokens: Field required". The gateway now fills max_tokens the same way the Python SDK does, taking the deployment's model_info.max_output_tokens, then the bundled cost map's max_output_tokens for the exact model name, then 128000

A client max_tokens always wins, and a client null counts as unset. The bundled cost map is parsed once when the gateway starts and is injected into the inference gateway
2026-11-07 16:39:39 -08:00
..
.agents/skills feat(redis): extend the native Redis foundation for the store families (#50169) 2026-11-06 12:30:07 +09:00
crates fix(gateway): default max_tokens for Anthropic chat completions 2026-11-07 16:39:39 -08:00
docs/adrs docs(rust): add ADRs for the Rust core (#45205) 2026-10-08 10:21:56 -07:00
.gitignore feat: add LiteLLM Rust workspace with Mistral OCR bridge (#31033) 2026-06-23 13:16:47 -07:00
AGENTS.md feat(redis): extend the native Redis foundation for the store families (#50169) 2026-11-06 12:30:07 +09:00
Cargo.lock fix(gateway): default max_tokens for Anthropic chat completions 2026-11-07 16:39:39 -08:00
Cargo.toml feat(redis): extend the native Redis foundation for the store families (#50169) 2026-11-06 12:30:07 +09:00
clippy.toml build(rust): upgrade reqwest to 0.13 and move MCP out of litellm-http (#48039) 2026-10-28 07:32:40 -07:00