feat(image): Codex CLI on GPT-5.5 via Bedrock (no per-user key)#198
Merged
Conversation
Codex CLI was already installed but expected a per-user OpenAI key. Wire it to GPT-5.5 on the AWS Bedrock mantle endpoint (GA 2026-06-01), authed via the pod IRSA: - pip aws-bedrock-token-generator (mints a ~12h Bedrock bearer token from IRSA) - apt bubblewrap (codex sandbox) - /usr/local/bin/codex replaced with a wrapper (base64-embedded) that mints the token -> OPENAI_API_KEY, rewrites ~/.codex/config.toml each launch pinning openai.gpt-5.5 + bedrock provider (mantle, wire_api=responses) + web_search=disabled + 272K metadata + CODEX_EFFORT (default high), then execs the real launcher. Self-heals /model mishaps. IAM already present (bedrock-mantle:* + aws-marketplace:Subscribe). Validated live on a prod B200 pod. Ships on the next image rebuild (tofu apply).
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.
Wires the (already-installed) Codex CLI to GPT-5.5 on the AWS Bedrock mantle endpoint (GA 2026-06-01), authed via the pod IRSA — no per-user OpenAI key.
Dockerfile only:
aws-bedrock-token-generator(mints a ~12h Bedrock bearer token from IRSA)bubblewrap(codex sandbox; clears the bundled-bwrap warning)/usr/local/bin/codexwith a wrapper: mint token →OPENAI_API_KEY, (re)write~/.codex/config.tomleach launch (pinsopenai.gpt-5.5+ bedrock provider +web_search=disabled+ 272K metadata + effort fromCODEX_EFFORT, default high), exec the real launcher.Why (validated live on a prod B200):
web_search=disabled(Bedrock GPT-5.5 rejects that tool),wire_api=responses(chat-completions unsupported), 272K context (else bad auto-compaction), rewrite-per-launch (ephemeral/home/dev+ self-heals the/modelpicker 404).Usage:
codex→ GPT-5.5 high;CODEX_EFFORT=xhigh codexto change effort; avoid/model. IAM already hasbedrock-mantle:*+aws-marketplace:Subscribe. Ships on the next image rebuild.