mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-27 06:13:07 +00:00
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:
parent
2f968f566b
commit
3da404a7c1
1 changed files with 4 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue