mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
fix(anthropic): forward service_tier parameter to Anthropic API
Add service_tier to supported params and map it to the request body. Valid values: 'auto' (Priority Tier if available) or 'standard_only'. Closes BerriAI/litellm#23398
This commit is contained in:
parent
e37efc4218
commit
176a2653da
1 changed files with 5 additions and 0 deletions
|
|
@ -195,6 +195,7 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):
|
|||
"speed",
|
||||
"context_management",
|
||||
"cache_control",
|
||||
"service_tier",
|
||||
]
|
||||
|
||||
if (
|
||||
|
|
@ -1068,6 +1069,10 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):
|
|||
elif param == "cache_control" and isinstance(value, dict):
|
||||
# Pass through top-level cache_control for automatic prompt caching
|
||||
optional_params["cache_control"] = value
|
||||
elif param == "service_tier" and isinstance(value, str):
|
||||
# Pass through Anthropic service_tier for Priority Tier support
|
||||
# Valid values: "auto", "standard_only"
|
||||
optional_params["service_tier"] = value
|
||||
|
||||
## handle thinking tokens
|
||||
self.update_optional_params_with_thinking_tokens(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue