Skip to content

Commit

Permalink
test(test_get_model_info.py): add check for region name w/ cris model
Browse files Browse the repository at this point in the history
Resolves #8115
  • Loading branch information
krrishdholakia committed Feb 1, 2025
1 parent 74d86b6 commit 3e0c01f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/local_testing/test_get_model_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,24 @@ def test_get_model_info_huggingface_models(monkeypatch):
providers=["huggingface"],
**info,
)


@pytest.mark.parametrize(
"model, provider",
[
("bedrock/us-east-2/us.anthropic.claude-3-haiku-20240307-v1:0", None),
(
"bedrock/us-east-2/us.anthropic.claude-3-haiku-20240307-v1:0",
"bedrock",
),
],
)
def test_get_model_info_cost_calculator_bedrock_region_cris_stripped(model, provider):
"""
ensure cross region inferencing model is used correctly
Relevant Issue: https://github.com/BerriAI/litellm/issues/8115
"""
info = get_model_info(model=model, custom_llm_provider=provider)
print("info", info)
assert info["key"] == "us.anthropic.claude-3-haiku-20240307-v1:0"
assert info["litellm_provider"] == "bedrock"

0 comments on commit 3e0c01f

Please sign in to comment.