Skip to content

fix(ai): document Bedrock Mantle base URL per model - #59990

Merged
rekram1-node merged 1 commit into
devfrom
bedrock-mantle-openai-url
Oct 28, 2026
Merged

rekram1-node merged 1 commit into
devfrom
bedrock-mantle-openai-url

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The Mantle provider defaults Responses and Chat to https://bedrock-mantle.<region>.api.aws/v1. That path rejects GPT models: openai.gpt-5.4 returns "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 baseURL instead 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:

Model /v1 /openai/v1
openai.gpt-oss-120b works rejected
qwen.qwen3-coder-next works rejected
openai.gpt-5.4 rejected works
xai.grok-4.3 rejected works
google.gemma-4-31b rejected works

Switching the default to /openai/v1 would 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

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@rekram1-node
rekram1-node merged commit 410644a into dev Oct 28, 2026
23 checks passed
@rekram1-node
rekram1-node deleted the bedrock-mantle-openai-url branch October 28, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant