openclaw - 💡(How to fix) Fix Support Codex OAuth profile for local OpenClaw gateway on Mac mini

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…

Error Message

The gateway appears to treat openai/gpt-5.5 as requiring a direct OpenAI API key and blocks with the missing OPENAI_API_KEY error.

Root Cause

For a local Mac mini setup, I want OpenClaw to operate through my Codex OAuth-backed account/profile rather than provisioning and storing a separate direct OpenAI API key.

Code Example

Missing API key for OpenAI on the gateway. Use openai/gpt-5.5 with the Codex OAuth profile, or set OPENAI_API_KEY for direct OpenAI API-key runs.
RAW_BUFFERClick to expand / collapse

Request

I want OpenClaw running on my Mac mini to be able to use my existing Codex account/session, without requiring a separate OPENAI_API_KEY.

Current behavior

When the local gateway tries to use openai/gpt-5.5, it fails with:

Missing API key for OpenAI on the gateway. Use openai/gpt-5.5 with the Codex OAuth profile, or set OPENAI_API_KEY for direct OpenAI API-key runs.

This is confusing because the local OpenClaw config already has a Codex OAuth profile configured.

Local environment

  • macOS / Mac mini
  • OpenClaw Codex package: @openclaw/[email protected]
  • OpenClaw package metadata references @openai/[email protected]
  • Gateway mode: local gateway on loopback
  • Default model: openai/gpt-5.5
  • Auth profile configured: openai-codex:<account email> with mode: oauth

I intentionally omitted local gateway tokens and channel bot tokens from this issue.

Expected behavior

OpenClaw should detect/use the configured Codex OAuth profile for openai/gpt-5.5 when running through the local gateway, or provide a clear documented config field/command to select that profile.

Actual behavior

The gateway appears to treat openai/gpt-5.5 as requiring a direct OpenAI API key and blocks with the missing OPENAI_API_KEY error.

Why this matters

For a local Mac mini setup, I want OpenClaw to operate through my Codex OAuth-backed account/profile rather than provisioning and storing a separate direct OpenAI API key.

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

OpenClaw should detect/use the configured Codex OAuth profile for openai/gpt-5.5 when running through the local gateway, or provide a clear documented config field/command to select that profile.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING