litellm/tests/test_litellm/completion_extras
Sameer Kankute 680f3ff810
fix: bedrock mantle fixes (#30083)
* fix: respect aws region

* Fix chat completion to responses bridge

* Handle response streaming events

* Fix bedrock mantle region priority and CI test failures.

aws_region_name now overrides BEDROCK_MANTLE_REGION env, and provider tests pass region via litellm_params.

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor(bedrock_mantle): use warmup id prefix constant and log untyped tool drops

* refactor(bedrock_mantle): keep aws_region_name extraction inside chat config

* fix(bedrock_mantle): validate aws_region_name before host interpolation

The client-supplied aws_region_name flows unvalidated into the Bedrock
Mantle host (https://bedrock-mantle.{region}.api.aws), so a value
containing a slash could redirect the request, along with the configured
bearer API key, to an arbitrary host. Validate the region against the AWS
region format in both the chat and responses transformations before it is
interpolated.

* fix(bedrock_mantle): close AWS_REGION_NAME chat gap and surface dropped tools

Chat region resolution now consults AWS_REGION_NAME, matching the
responses path precedence. Unsupported Responses tools dropped by
map_openai_params are logged at warning level so the loss is visible in
production.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-06-12 07:25:16 -07:00
..
litellm_responses_transformation feat: litellm oss 110626 (#30202) 2026-06-11 22:30:26 -07:00
__init__.py Litellm oss staging 030626 (#29578) 2026-06-03 11:01:51 -07:00
test_litellm_responses_transformation_transformation.py fix(caching): replay openai/responses bridge cache hits as chat streams (#28158) 2026-05-18 16:27:06 -07:00
test_responses_bridge_provider_propagation.py fix: bedrock mantle fixes (#30083) 2026-06-12 07:25:16 -07:00