From 3da404a7c12fceee1cade251643dcfff330091c1 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2026 10:14:05 -0700 Subject: [PATCH] fix(bedrock_mantle): add is_mantle_claude_model for the count_tokens picks Hand-port of the is_mantle_claude_model helper from #43646 to stable/1.104.x, which #45317 imports. Taken from 01b4ffe16b (main). --- litellm/llms/bedrock_mantle/common_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/litellm/llms/bedrock_mantle/common_utils.py b/litellm/llms/bedrock_mantle/common_utils.py index 9892ef6224e..ca637af0110 100644 --- a/litellm/llms/bedrock_mantle/common_utils.py +++ b/litellm/llms/bedrock_mantle/common_utils.py @@ -158,3 +158,7 @@ def mantle_base_segment(model: str | None, model_cost: dict) -> str: """ entry: Final = model_cost.get(f"bedrock_mantle/{split_mantle_region_prefix(model)[1]}", {}) if model else {} return "openai/v1" if entry.get("use_openai_responses_path") is True else "v1" + + +def is_mantle_claude_model(model: str) -> bool: + return "claude" in model.lower()