openclaw - 💡(How to fix) Fix [Docs] Clarify auth profile provider field after openai-codex OAuth login

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…

After successfully authenticating with openclaw models auth login --provider openai-codex, the generated auth profile contains "provider": "openai" (not "openai-codex" as might be expected). If the provider field is manually set or preserved as "openai-codex" (e.g., from older configs or manual edits), all OpenAI model requests fail with a cryptic error: "No available auth profile for openai-codex (all in cooldown or unavailable)", even though the auth profile exists and the token is valid.

Error Message

After successfully authenticating with openclaw models auth login --provider openai-codex, the generated auth profile contains "provider": "openai" (not "openai-codex" as might be expected). If the provider field is manually set or preserved as "openai-codex" (e.g., from older configs or manual edits), all OpenAI model requests fail with a cryptic error: "No available auth profile for openai-codex (all in cooldown or unavailable)", even though the auth profile exists and the token is valid. The openai-codex is the login flow identifier (for the Codex harness OAuth), but the actual provider ID stored in the auth profile is "openai". The model runtime looks up auth by provider ID, and "openai-codex" doesn't match any registered provider, causing the "unavailable" error.

Root Cause

The openai-codex is the login flow identifier (for the Codex harness OAuth), but the actual provider ID stored in the auth profile is "openai". The model runtime looks up auth by provider ID, and "openai-codex" doesn't match any registered provider, causing the "unavailable" error.

Code Example

openclaw models auth login --provider openai-codex

---

{
     "openai-codex:[email protected]": {
       "type": "oauth",
       "provider": "openai",  // ← NOTE: This is "openai", NOT "openai-codex"
       ...
     }
   }

---

{
     "openai-codex:[email protected]": {
       "type": "oauth",
       "provider": "openai-codex",  // ← WRONG: This causes the bug
       ...
     }
   }
RAW_BUFFERClick to expand / collapse

Summary

After successfully authenticating with openclaw models auth login --provider openai-codex, the generated auth profile contains "provider": "openai" (not "openai-codex" as might be expected). If the provider field is manually set or preserved as "openai-codex" (e.g., from older configs or manual edits), all OpenAI model requests fail with a cryptic error: "No available auth profile for openai-codex (all in cooldown or unavailable)", even though the auth profile exists and the token is valid.

Steps to Reproduce

  1. Run OAuth login:

    openclaw models auth login --provider openai-codex
  2. Check generated auth profile in ~/.openclaw/agents/main/agent/auth-profiles.json:

    {
      "openai-codex:[email protected]": {
        "type": "oauth",
        "provider": "openai",  // ← NOTE: This is "openai", NOT "openai-codex"
        ...
      }
    }
  3. (Hypothetical/legacy scenario) If the provider field is "openai-codex":

    {
      "openai-codex:[email protected]": {
        "type": "oauth",
        "provider": "openai-codex",  // ← WRONG: This causes the bug
        ...
      }
    }
  4. Attempt to use any OpenAI model → Fails with "No available auth profile for openai-codex"

Expected Behavior

The documentation should clearly state that after openai-codex OAuth login, the provider field in the auth profile is "openai", not "openai-codex".

Actual/Cryptic Behavior

When provider: "openai-codex" is set:

  • openclaw models auth list shows the profile as valid
  • openclaw models list --provider openai shows models as available
  • But actual requests fail with: "No available auth profile for openai-codex (all in cooldown or unavailable)"
  • System silently falls back to primary model (e.g., Kimi)

Root Cause

The openai-codex is the login flow identifier (for the Codex harness OAuth), but the actual provider ID stored in the auth profile is "openai". The model runtime looks up auth by provider ID, and "openai-codex" doesn't match any registered provider, causing the "unavailable" error.

Environment

  • OpenClaw 2026.5.27
  • Auth method: OpenAI Codex OAuth (ChatGPT Plus)
  • Affected: All openai/* model refs with agentRuntime.id: "codex"

Suggested Documentation Fix

Add a note in the OpenAI provider docs or Codex harness docs clarifying:

Note: When authenticating via openclaw models auth login --provider openai-codex, the resulting auth profile stores "provider": "openai" (not "openai-codex"). The openai-codex value is only used for the login command; the actual provider ID used by the runtime is openai. Manual edits to auth profiles should preserve "provider": "openai".

Additional Context

This may affect users who:

  • Manually edit auth-profiles.json
  • Migrate configs from older OpenClaw versions
  • Use config management tools that preserve old provider values

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Docs] Clarify auth profile provider field after openai-codex OAuth login