Repository navigation
fix(ai): document Bedrock Mantle base URL per model - #59990
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Looks good. This change only adds doc comments, and I checked them against configuredRoute/configure: the documented defaults (/v1 for Responses and Chat, /anthropic/v1 for Messages, with baseURL overriding them) match the code. There's no runtime change to verify.
Public API: unchanged (documentation only).
Related: #36208
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Mantle provider defaults Responses and Chat to
https://bedrock-mantle.<region>.api.aws/v1. That path rejects GPT models:openai.gpt-5.4returns "does not support the '/v1/responses' API" on Responses and "isn't supported on this route" on Chat. The default gives no hint that these models need a different base URL.Change
I documented the path rule on
baseURLinstead of changing the default. AWS serves each model on exactly one prefix and says to read it from the model card (Responses API: "the path prefix varies by model. Most models are served under/v1... some are served under/openai/v1"). The prefixes don't follow the model ID, so there is no rule the provider can apply on its own:/v1/openai/v1openai.gpt-oss-120bqwen.qwen3-coder-nextopenai.gpt-5.4xai.grok-4.3google.gemma-4-31bSwitching the default to
/openai/v1would break the open-weight models. opencode is unaffected because it passes each model's base URL from models.dev.Out of scope
Picking the prefix per model inside the provider. That would need a hardcoded model list.
Added by the opencode bot (AI-generated).
Related: #36208