Amazon Bedrock Mantle provider uses incorrect /openai/v1 endpoint path
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:
- https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-mantle.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-openai.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/endpoints.html
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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗