fix(codex-executor): route GPT-5.x/Codex to mantle /openai/v1 (#34)#36
Merged
Conversation
GPT-5.5/5.4 rejected every request with 400 validation_error: The model 'openai.gpt-5.5' does not support the '/v1/responses' API because the executor hardcoded base_url .../v1 for all OpenAI models. bedrock-mantle serves the two OpenAI families on different OpenAI-compat base paths on the same host: frontier GPT-5.x/Codex under /openai/v1 (per the AWS launch docs), open-weight gpt-oss-* under /v1. They reject each other's path. The #31 design verified gpt-oss on /v1 and assumed it was the only path; the heavy models were never routed to /openai/v1. Verified live 2026-06-11 (R&D acct, short-term bearer): on /openai/v1, gpt-5.5 and gpt-5.4 stream successfully in both us-east-1 and us-east-2; gpt-oss-120b still requires /v1. AWS Bedrock had no open health events — this was never an outage, just the wrong base path. Changes: - Select the mantle OpenAI-compat base path by model id: /v1 for gpt-oss-*, /openai/v1 otherwise. New optional `mantle_api_path` input overrides it. - Drop the now-stale us-east-1 -> us-east-2 remap: GPT-5.x are served in us-east-1 too now (were us-east-2-only at v3.1.0). Honor the requested region as-is; empty falls back to us-east-2. - Refresh header comments, CLAUDE.md, and ARCHITECTURE.md. Closes #34. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Follow-up to the /openai/v1 path fix. GPT-5.5/5.4 are now served in us-east-1 too (were us-east-2-only at v3.1.0), so the "Resolve mantle region" step that silently rewrote the region is no longer needed and was a confusing surprise. Drop the step entirely and pass inputs.aws_region straight through to configure-aws-credentials and the mantle base_url. Clean up all remap-related comments in the executor header, the orchestrator's codex-mantle call, CLAUDE.md, and ARCHITECTURE.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
codex-executor(v3.1.0, #31) targetsopenai.gpt-5.5/openai.gpt-5.4on bedrock-mantle, but every call failed:#34 raised this as a possible AWS-side availability change. It isn't.
Root cause
The executor hardcoded
base_url = https://bedrock-mantle.{region}.api.aws/v1for all OpenAI models. But bedrock-mantle serves the two OpenAI families on different OpenAI-compatible base paths on the same host:/v1/openai/v1openai.gpt-5.5,openai.gpt-5.4, Codex/openai/v1openai.gpt-oss-*/v1The AWS launch blog prescribes
/openai/v1for the GPT-5.x models; #31 verified gpt-oss on/v1and that path got baked in as the only one, so the heavy models were always sent to the endpoint that rejects them.Verification (live, 2026-06-11, R&D acct, short-term bearer from the bedrock-code-review role)
/openai/v1:gpt-5.5andgpt-5.4stream successfully (the exact executor call shape:responses.create+reasoning+store=false+stream=True), in both us-east-1 and us-east-2./v1: gpt-5.x reject; gpt-oss-120b works.#ext-aws-tam-dotcms) is not needed.Changes
/v1forgpt-oss-*,/openai/v1otherwise. New optionalmantle_api_pathinput overrides it if AWS changes the routing.us-east-1 → us-east-2region remap entirely: GPT-5.x are now served in us-east-1 too (were us-east-2-only at v3.1.0), so the "Resolve mantle region" step that silently rewrote the region is gone.inputs.aws_regionpasses straight through. Removes a confusing surprise for later readers.CLAUDE.md, andARCHITECTURE.md.Validation
actionlint(rhysd/actionlint:1.7.7) → exit 0py_compile→ OKresponses.createstreaming run confirmed for gpt-5.5 + gpt-5.4 on/openai/v1Closes #34.
🤖 Generated with Claude Code