codex - 💡(How to fix) Fix Amazon Bedrock Mantle provider uses incorrect /openai/v1 endpoint path [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#21352Fetched 2026-05-07 03:41:25
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Root Cause

This appears easy to confuse with the separate Bedrock Runtime OpenAI-compatible Chat Completions endpoint, which AWS documents as:

https://bedrock-runtime.<region>.amazonaws.com/openai/v1

Bedrock Mantle is a different endpoint family and uses /v1.

References:

Code Example

cargo fmt
cargo test -p codex-model-provider-info test_create_amazon_bedrock_provider
cargo test -p codex-model-provider base_url_uses_region_endpoint
MACOSX_DEPLOYMENT_TARGET=15.0 CXXFLAGS="..." cargo test -p codex-tui status_model_provider_uses_bedrock_runtime_base_url

---

target/debug/codex \
  -c 'model_provider="amazon-bedrock"' \
  -c 'model="openai.gpt-oss-120b"' \
  -c 'model_providers.amazon-bedrock.aws.profile="codex-bedrock"' \
  -c 'model_providers.amazon-bedrock.aws.region="ap-northeast-1"' \
  exec 'Say hello in one sentence.'
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

Built locally from the current openai/codex mainline with a one-commit fix applied.

What issue are you seeing?

The built-in amazon-bedrock provider points Bedrock Mantle requests at:

https://bedrock-mantle.<region>.api.aws/openai/v1

but AWS Bedrock Mantle exposes its OpenAI-compatible APIs directly under:

https://bedrock-mantle.<region>.api.aws/v1

As a result, Codex Responses requests should go to /v1/responses, not /openai/v1/responses.

Root cause

This appears easy to confuse with the separate Bedrock Runtime OpenAI-compatible Chat Completions endpoint, which AWS documents as:

https://bedrock-runtime.<region>.amazonaws.com/openai/v1

Bedrock Mantle is a different endpoint family and uses /v1.

References:

Verified fix

I prepared a local fix:

  • Branch: toyamarinyon/codex:fix-bedrock-mantle-responses-url
  • Commit: 1b5b98213e07d34dddd25e35d9d0129e8e062455

I could not open a PR because this repository currently limits PR creation to collaborators.

Verification

Unit tests run:

cargo fmt
cargo test -p codex-model-provider-info test_create_amazon_bedrock_provider
cargo test -p codex-model-provider base_url_uses_region_endpoint
MACOSX_DEPLOYMENT_TARGET=15.0 CXXFLAGS="..." cargo test -p codex-tui status_model_provider_uses_bedrock_runtime_base_url

I also verified locally with the built artifact:

target/debug/codex \
  -c 'model_provider="amazon-bedrock"' \
  -c 'model="openai.gpt-oss-120b"' \
  -c 'model_providers.amazon-bedrock.aws.profile="codex-bedrock"' \
  -c 'model_providers.amazon-bedrock.aws.region="ap-northeast-1"' \
  exec 'Say hello in one sentence.'

This succeeded through the amazon-bedrock provider and reached:

https://bedrock-mantle.ap-northeast-1.api.aws/v1/responses

Expected behavior

The built-in Amazon Bedrock provider should use:

https://bedrock-mantle.<region>.api.aws/v1

for Bedrock Mantle, so Responses requests are sent to /v1/responses.

Actual behavior

The current default and generated region-specific URLs include /openai/v1, which belongs to the Bedrock Runtime Chat Completions compatibility path, not Bedrock Mantle.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The built-in Amazon Bedrock provider should use:

https://bedrock-mantle.<region>.api.aws/v1

for Bedrock Mantle, so Responses requests are sent to /v1/responses.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Amazon Bedrock Mantle provider uses incorrect /openai/v1 endpoint path [1 participants]