Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Fix: test_nova_invoke_streaming_chunk_parsing

Sameer Kankutea4bf14f6e707
diff --git a/tests/llm_translation/test_bedrock_invoke_tests.py b/tests/llm_translation/test_bedrock_invoke_tests.py
index 2795d894f2b..e87f629be63 100644
--- a/tests/llm_translation/test_bedrock_invoke_tests.py
+++ b/tests/llm_translation/test_bedrock_invoke_tests.py
@@ -114,7 +114,7 @@ def test_nova_invoke_streaming_chunk_parsing():
}
result = decoder._chunk_parser(nova_tool_start_chunk)
assert result.choices[0].delta.content == ""
- assert result.choices[0].index == 1
+ assert result.choices[0].index == 0
assert result.choices[0].delta.tool_calls is not None
assert result.choices[0].delta.tool_calls[0].type == "function"
assert result.choices[0].delta.tool_calls[0].function.name == "get_weather"
@@ -129,7 +129,7 @@ def test_nova_invoke_streaming_chunk_parsing():
}
result = decoder._chunk_parser(nova_tool_args_chunk)
assert result.choices[0].delta.content == ""
- assert result.choices[0].index == 2
+ assert result.choices[0].index == 0
assert result.choices[0].delta.tool_calls is not None
assert (
result.choices[0].delta.tool_calls[0].function.arguments