Skip to content

Commit c5a32c8

Browse files
test: add unit test for _remove_inference_geo_prefix function
1 parent 9f5bf58 commit c5a32c8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/models/test_bedrock.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,19 @@ async def test_bedrock_model_usage_limit_not_exceeded(
134134
)
135135

136136

137+
@pytest.mark.parametrize(
138+
('model_name', 'expected'),
139+
[
140+
('us.anthropic.claude-sonnet-4-20250514-v1:0', 'anthropic.claude-sonnet-4-20250514-v1:0'),
141+
('eu.amazon.nova-micro-v1:0', 'amazon.nova-micro-v1:0'),
142+
('apac.meta.llama3-8b-instruct-v1:0', 'meta.llama3-8b-instruct-v1:0'),
143+
('anthropic.claude-3-7-sonnet-20250219-v1:0', 'anthropic.claude-3-7-sonnet-20250219-v1:0'),
144+
],
145+
)
146+
def test_remove_inference_geo_prefix(model_name: str, expected: str):
147+
assert BedrockConverseModel._remove_inference_geo_prefix(model_name) == expected # pyright: ignore[reportPrivateUsage]
148+
149+
137150
async def test_bedrock_model_structured_output(allow_model_requests: None, bedrock_provider: BedrockProvider):
138151
model = BedrockConverseModel('us.amazon.nova-micro-v1:0', provider=bedrock_provider)
139152
agent = Agent(model=model, system_prompt='You are a helpful chatbot.', retries=5)

0 commit comments

Comments
 (0)