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).
This commit is contained in:
devin-ai-integration[bot] 2026-10-19 10:14:05 -07:00 • committed by mateo-berri
parent 2f968f566b
commit 3da404a7c1

View file

@ -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()