fix(bedrock): use documented Mantle base URL - #894
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b39e55ad35
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| return fmt.Sprintf("https://bedrock-runtime.%s.%s/openai/v1/", region, standardSuffix) | ||
| } | ||
| return fmt.Sprintf("https://bedrock-mantle.%s.api.aws/openai/v1/", region) | ||
| return fmt.Sprintf("https://bedrock-mantle.%s.api.aws/v1/", region) |
There was a problem hiding this comment.
Update the remaining Mantle URL documentation
After changing the default to /v1, README.md:1363-1366 and bedrock/README.md:3-8 still document /openai/v1 as the Mantle default, and bedrock/example_test.go:129-134 explicitly sets that old URL. A user copying the bearer example therefore overrides the corrected default and continues sending requests to the route this commit is intended to fix; update these references and the example alongside the default.
Useful? React with 👍 / 👎.
|
Addressed the documentation feedback in commit ac2c43b: updated the root README, bedrock/README.md, and bearer example to use the documented Mantle /v1 base URL. Validation: go test ./bedrock passed. |
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
The Mantle route appears to be model-family dependent, so changing the single SDK-wide default from /openai/v1 to /v1 trades one incompatibility for another. AWS currently documents /v1 for Kimi/general Mantle examples, but its GPT-5.5 page explicitly uses /openai/v1. A caller using the default with GPT-5.5 would therefore be redirected onto the wrong API root by this change. I think the SDK either needs model-family-aware route selection, or should preserve one compatibility default and document BaseURL as the required override for families using the other route.
Fixes #812
AWS Bedrock Mantle documents the OpenAI-compatible base URL as /v1, but the SDK default used /openai/v1. Update the default and focused URL expectations while preserving Runtime and custom BaseURL behavior.
Validation: