test_bedrock_nova_grounding_web_search_options_non_streaming

This commit is contained in:
Ishaan Jaffer
2026-01-31 11:23:48 -08:00
parent 9fe0819e77
commit 8b575f4656
@@ -3984,12 +3984,11 @@ def test_bedrock_nova_grounding_web_search_options_non_streaming():
with patch.object(client, "post") as mock_post:
try:
completion(
model="us.amazon.nova-pro-v1:0", # No bedrock/ prefix when using api_base
model="bedrock/us.amazon.nova-pro-v1:0",
messages=messages,
web_search_options={}, # Enables Nova grounding
max_tokens=500,
client=client,
api_base="https://bedrock-runtime.us-east-1.amazonaws.com",
)
except Exception:
pass # Expected - we're just checking the request structure
@@ -4059,13 +4058,12 @@ def test_bedrock_nova_grounding_with_function_tools():
with patch.object(client, "post") as mock_post:
try:
completion(
model="us.amazon.nova-pro-v1:0", # No bedrock/ prefix when using api_base
model="bedrock/us.amazon.nova-pro-v1:0",
messages=messages,
tools=tools,
web_search_options={}, # Also enable web grounding
max_tokens=500,
client=client,
api_base="https://bedrock-runtime.us-east-1.amazonaws.com",
)
except Exception:
pass # Expected - we're just checking the request structure
@@ -4121,12 +4119,11 @@ async def test_bedrock_nova_grounding_async():
with patch.object(client, "post", new=AsyncMock()) as mock_post:
try:
await litellm.acompletion(
model="us.amazon.nova-pro-v1:0", # No bedrock/ prefix when using api_base
model="bedrock/us.amazon.nova-pro-v1:0",
messages=messages,
web_search_options={},
max_tokens=500,
client=client,
api_base="https://bedrock-runtime.us-east-1.amazonaws.com",
)
except Exception:
pass # Expected - we're just checking the request structure