Skip to content

fix(bedrock): use documented Mantle base URL - #894

Open
tvost2 wants to merge 2 commits into
openai:mainfrom
tvost2:fix/bedrock-mantle-base-url
Open

fix(bedrock): use documented Mantle base URL#894
tvost2 wants to merge 2 commits into
openai:mainfrom
tvost2:fix/bedrock-mantle-base-url

Conversation

@tvost2

@tvost2 tvost2 commented Sep 4, 2026

Copy link
Copy Markdown

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:

  • go test ./bedrock
  • git diff --check

@tvost2
tvost2 requested a review from a team as a code owner September 4, 2026 21:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread bedrock/auth.go
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@tvost2

tvost2 commented Sep 4, 2026

Copy link
Copy Markdown
Author

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 sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EndpointMantle defaults to /openai/v1, but AWS documents mantle's base URL as /v1

2 participants