mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-26 22:30:11 +00:00
* fix(anthropic): drop or reject sampling params under anthropic-version 2026-10-21 * fix(anthropic): apply the 2026-10-21 sampling gate only on Anthropic's own API anthropic-version 2026-10-21 removed temperature, top_p and top_k from Anthropic's API, but the gate ran for every anthropic/ deployment. Third-party Anthropic-compatible APIs set as api_base, such as DeepSeek or MiniMax, still accept those params, and /v1/messages dropped them or raised UnsupportedParamsError The gate now checks the resolved API base (the deployment api_base, else ANTHROPIC_API_BASE or ANTHROPIC_BASE_URL, else the default) and applies only when its host is api.anthropic.com or a Foundry host. Any other host gets the params untouched, as before the gate. The Python hook and the Rust request_body take the base or URL across every override, and Azure AI, Claude Platform, Mantle and Vertex keep their gating --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| adapters | ||
| context_management | ||
| native | ||
| responses_adapters | ||
| __init__.py | ||
| conftest.py | ||
| test_advisor_orchestration.py | ||
| test_anthropic_native_passthrough_spend_logging.py | ||
| test_caller_model_checks.py | ||
| test_convertible_blocks.py | ||
| test_reasoning_effort_fields.py | ||
| test_safeguards.py | ||
| test_stream_assembly.py | ||