feat: enable openai provider use aws profile#2230
feat: enable openai provider use aws profile#2230JackYPCOnline merged 6 commits intostrands-agents:mainfrom
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Issue: This PR introduces a new public API surface ( Suggestion: Add the |
|
Assessment: Request Changes The feature design is well thought out and the PR description is excellent. However, there's a critical import issue that would break existing users of the Review Categories
The integration test rewrite is a nice simplification and the per-request token minting is the right design for long-lived agents. |
|
Assessment: Approve (with minor suggestion) All critical and important issues from the previous review have been addressed well. The lazy import, Remaining minor item
Clean implementation with solid test coverage — nice work addressing the feedback. |
|
Assessment: Approve All feedback from prior reviews has been fully addressed. The code is clean, well-documented, and ready to merge. Verification of fixes
|
|
Issue: The PR description's "Public API" section shows Suggestion: Update the PR description code snippets to use the actual parameter name: OpenAIModel(model_id="openai.gpt-oss-120b", bedrock_mantle_config={"region": "us-east-1"}) |
|
Assessment: Approve (with minor suggestions) Good evolution from Minor items (non-blocking)
The rename, stricter validation, and region resolution chain are all improvements. Implementation is clean and well-tested. |
|
Assessment: Approve The fail-fast validation for No new issues found. The implementation is clean and ready to merge. |
Description
Amazon Bedrock's OpenAI-compatible endpoint (Mantle) at
https://bedrock-mantle.<region>.api.aws/v1serves the Chat Completions andResponses APIs plus Responses-only features like stateful conversations and
reasoning controls — capabilities Converse doesn't expose.
Reaching Mantle today means hand-rolling the plumbing: mint a bearer token
with
aws-bedrock-token-generator(or sign with SigV4), compute the regional base URL, and pass both into
OpenAIModel/OpenAIResponsesModelviaclient_args. This PR adds afirst-class
bedrock_mantle_configkwarg to both classes so the Bedrock routing stopsleaking into application code.
Public API
Related Issues
Documentation PR
In-repo docs update covers the feature for Python. TypeScript tab in the
new section notes the pathway isn't yet supported on that SDK.
Type of Change
New feature
Testing
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.