mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-06 02:09:04 +00:00
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 |
||
|---|---|---|
| .. | ||
| .agents/skills | ||
| crates | ||
| docs/adrs | ||
| .gitignore | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| clippy.toml | ||