From d3baef79b27e35b657b845b161cb7a23031872de Mon Sep 17 00:00:00 2001 From: Sameer Kankute Date: Thu, 16 Apr 2026 22:21:41 +0530 Subject: [PATCH] fix xhigh code --- litellm/llms/anthropic/chat/transformation.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/litellm/llms/anthropic/chat/transformation.py b/litellm/llms/anthropic/chat/transformation.py index 9b6a560d54b..87a015a224f 100644 --- a/litellm/llms/anthropic/chat/transformation.py +++ b/litellm/llms/anthropic/chat/transformation.py @@ -1473,20 +1473,9 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig): **optional_params, } - ## Handle output_config (Anthropic-specific parameter) - if "output_config" in optional_params: - output_config = optional_params.get("output_config") - if output_config and isinstance(output_config, dict): - effort = output_config.get("effort") - if effort and effort not in ["high", "medium", "low", "max"]: - raise ValueError( - f"Invalid effort value: {effort}. Must be one of: 'high', 'medium', 'low', 'max'" - ) - if effort == "max" and not self._is_opus_4_6_model(model): - raise ValueError( - f"effort='max' is only supported by Claude Opus 4.6. Got model: {model}" - ) - data["output_config"] = output_config + self._apply_output_config( + data=data, model=model, optional_params=optional_params + ) return data