Skip to content

fix: add missing /openai path segment to Bedrock Mantle base URL#2706

Open
kagura-agent wants to merge 1 commit into
strands-agents:mainfrom
kagura-agent:fix/bedrock-mantle-openai-path
Open

fix: add missing /openai path segment to Bedrock Mantle base URL#2706
kagura-agent wants to merge 1 commit into
strands-agents:mainfrom
kagura-agent:fix/bedrock-mantle-openai-path

Conversation

@kagura-agent

Copy link
Copy Markdown

Summary

Fixes the _MANTLE_BASE_URL_TEMPLATE in _openai_bedrock.py which was missing the /openai path segment, causing 400 validation_error for OpenAI Responses API models (e.g. openai.gpt-5.4) routed through Bedrock Mantle.

Before: https://bedrock-mantle.{region}.api.aws/v1
After: https://bedrock-mantle.{region}.api.aws/openai/v1

Changes

  • strands-py/src/strands/models/_openai_bedrock.py: Updated URL template
  • strands-py/tests/strands/models/test_openai.py: Updated 4 test assertions
  • strands-py/tests/strands/models/test_openai_responses.py: Updated 4 test assertions
  • strands-py/tests_integ/models/test_model_mantle.py: Updated docstring URL

Testing

All 20 Bedrock Mantle config tests pass (10 for OpenAIModel + 10 for OpenAIResponsesModel).

Fixes #2629

…late

The _MANTLE_BASE_URL_TEMPLATE was missing the /openai path segment,
producing URLs like bedrock-mantle.<region>.api.aws/v1/responses
instead of bedrock-mantle.<region>.api.aws/openai/v1/responses.

This caused 400 validation_error for OpenAI Responses API models
(e.g. openai.gpt-5.4) routed through Bedrock Mantle, even though
those models genuinely support the Responses API.

Fixes strands-agents#2629

Signed-off-by: kagura-agent <kagura.agent.ai@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bedrock_mantle_config builds wrong base_url for OpenAI Responses models (missing /openai path segment)

1 participant