Skip to content

feat(image): Codex CLI on GPT-5.5 via Bedrock (no per-user key)#198

Merged
wdvr merged 1 commit into
mainfrom
codex-bedrock-gpt55
Jun 2, 2026
Merged

feat(image): Codex CLI on GPT-5.5 via Bedrock (no per-user key)#198
wdvr merged 1 commit into
mainfrom
codex-bedrock-gpt55

Conversation

@wdvr
Copy link
Copy Markdown
Owner

@wdvr wdvr commented Jun 2, 2026

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:

  • pip aws-bedrock-token-generator (mints a ~12h Bedrock bearer token from IRSA)
  • apt bubblewrap (codex sandbox; clears the bundled-bwrap warning)
  • replace /usr/local/bin/codex with a wrapper: mint token → OPENAI_API_KEY, (re)write ~/.codex/config.toml each launch (pins openai.gpt-5.5 + bedrock provider + web_search=disabled + 272K metadata + effort from CODEX_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 /model picker 404).

Usage: codex → GPT-5.5 high; CODEX_EFFORT=xhigh codex to change effort; avoid /model. IAM already has bedrock-mantle:* + aws-marketplace:Subscribe. Ships on the next image rebuild.

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).
@wdvr wdvr merged commit 0e1f26c into main Jun 2, 2026
3 checks passed
@wdvr wdvr deleted the codex-bedrock-gpt55 branch June 2, 2026 04:48
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.

1 participant