From 0cb56c97a59c5cd73650ba527d77fb52c06a1a37 Mon Sep 17 00:00:00 2001 From: Sameer Kankute Date: Wed, 18 Feb 2026 08:48:29 +0530 Subject: [PATCH] Add mapping for thinking and response format --- litellm/llms/anthropic/chat/transformation.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/litellm/llms/anthropic/chat/transformation.py b/litellm/llms/anthropic/chat/transformation.py index 85a4790a9b9..c6eef7f6b91 100644 --- a/litellm/llms/anthropic/chat/transformation.py +++ b/litellm/llms/anthropic/chat/transformation.py @@ -172,8 +172,8 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig): @staticmethod def _is_claude_opus_4_6(model: str) -> bool: - """Check if the model is Claude Opus 4.5.""" - return "opus-4-6" in model.lower() or "opus_4_6" in model.lower() + """Check if the model is Claude Opus 4.5 or Sonnet 4.6.""" + return "opus-4-6" in model.lower() or "opus_4_6" in model.lower() or "sonnet-4-6" in model.lower() or "sonnet_4_6" in model.lower() def get_supported_openai_params(self, model: str): params = [ @@ -881,6 +881,10 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig): "opus-4-5", "opus-4.6", "opus-4-6", + "sonnet-4.6", + "sonnet-4-6", + "sonnet_4.6", + "sonnet_4_6", } ): _output_format = (