mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* fix(sagemaker,bedrock): answer 502 when a 200 AWS event stream decodes to no events or ends mid-frame SageMaker streaming (sagemaker and sagemaker_chat) and Bedrock invoke-agent turned an HTTP 200 whose event-stream body decoded to no events, or ended with bytes that never formed a whole frame, into an empty successful turn. They now raise a 502 naming the content type, the x-amzn-requestid, and the byte count, through the same tally the Bedrock converse and invoke decoders use, so router retries and fallbacks apply. Invoke-agent exception frames now raise with the status the bedrock-agent-runtime model gives them instead of being dropped, and error frames keep their error code and message. * fix(bedrock,sagemaker): keep body bytes out of the 502 and retry agent error frames The no-events 502 now names the content-type, request id and byte count only, since a cut frame can hold model text that skips message redaction. Untyped error frames on Bedrock agents answer 500 so the router retries them, and Bedrock chat keeps its body-only error text for those frames, as on main * fix(bedrock,sagemaker): answer 502 naming the request when a 200 body is not an AWS event stream * fix(bedrock): answer 502 when a Bedrock /v1/messages stream stops decoding The Rust Messages route now ends a 200 Bedrock stream whose body is not an AWS event stream, or turns corrupt after some events, with the same 502 Python's decoder gives, naming the botocore parser error class instead of a bare checksum mismatch. * test(bedrock): table the Rust invoke stream 502 cases and assert facts, not message text --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_sagemaker_chat_handler.py | ||
| test_sagemaker_chat_transformation.py | ||
| test_sagemaker_common_utils.py | ||
| test_sagemaker_completion_handler.py | ||
| test_sagemaker_embedding_openai.py | ||
| test_sagemaker_embedding_role_assumption.py | ||
| test_sagemaker_embedding_voyage.py | ||
| test_sagemaker_nova_transformation.py | ||