File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
instrumentation/opentelemetry-instrumentation-botocore/tests Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4444
4545- ` opentelemetry-instrumentation-botocore ` : bedrock: only decode JSON input buffer in Anthropic Claude streaming
4646 ([ #3875 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3875 ) )
47+ - ` opentelemetry-instrumentation-botocore ` : bedrock: Add safety check for bedrock ConverseStream responses
48+ ([ #TBD] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/TBD ) )
4749- ` opentelemetry-instrumentation-aiohttp-client ` , ` opentelemetry-instrumentation-aiohttp-server ` : Fix readme links and text
4850 ([ #3902 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3902 ) )
4951- ` opentelemetry-instrumentation-aws-lambda ` : Fix ImportError with slash-delimited handler paths
Original file line number Diff line number Diff line change @@ -3051,21 +3051,23 @@ def stream_error_callback(exc, ended):
30513051 else :
30523052 assert "input" not in tool_block
30533053
3054+
30543055def test_converse_stream_with_missing_output_in_response ():
30553056 """Test that converse stream handles malformed response missing output key."""
3057+
30563058 def stream_done_callback (response , ended ):
30573059 pass
3058-
3060+
30593061 wrapper = ConverseStreamWrapper (
30603062 stream = mock .MagicMock (),
30613063 stream_done_callback = stream_done_callback ,
30623064 model_id = "amazon.nova-micro-v1:0" ,
30633065 )
3064-
3065- malformed_response = {"stopReason" : "end_turn" }
3066- result = wrapper ._complete_stream (malformed_response )
3066+
3067+ bedrock_response = {"stopReason" : "end_turn" }
3068+ result = wrapper ._complete_stream (bedrock_response )
30673069 assert result is None
3068-
3070+
30693071
30703072def amazon_nova_messages ():
30713073 return [
You can’t perform that action at this time.
0 commit comments