mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-14 15:05:48 +00:00
test_bedrock_nova_grounding_web_search_options_non_streaming
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user