#I've tried everything to connect my Codex Chatgpt account and nothing works.

1 messages · Page 1 of 1 (latest)

wanton nest
#

I followed your advice on OpenClaw for OpenAI, but nothing works. Are you having a routing issue with version 4.15? I can't access it.

manic radishBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

normal stagBOT
raven scrollBOT
#

Let me verify the docs and whether 2026.4.15 had a known OpenAI/Codex auth issue.

#

Yeah, 2026.4.15 is suspicious here.

A couple important checks first:

  1. ChatGPT/Codex sign-in must use openai-codex/*, not openai/*

    • openai/* = OpenAI API key
    • openai-codex/* = ChatGPT/Codex account OAuth
  2. There were real Codex transport/OAuth fixes in and after 2026.4.15, and more fixes landed in 2026.4.18, so if you're on 2026.4.15 I would update first.

Please paste these:

openclaw --version
openclaw config get agents.defaults.model.primary
openclaw models status
wanton nest
#

},
"openai-codex": {
"baseUrl": "https://api.openai.com",
"auth": "oauth",
"api": "openai-completions",
"models": [
{
"id": "gpt-5.4",
"name": "GPT-5.4",
"api": "openai-completions",
"reasoning": true,
"input": [
"text"
],
"contextWindow": 1050000,
"maxTokens": 16384,
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
}
},

raven scrollBOT
#

That snippet helps a lot. I’m checking the docs for the exact fix path, because that openai-codex block looks like it’s overriding the built-in Codex route.

#

Yep, that block is the problem.

You’ve got a legacy models.providers.openai-codex override that is shadowing the built-in Codex OAuth route:

"baseUrl": "https://api.openai.com",
"api": "openai-completions"

For a ChatGPT/Codex account, don’t force openai-codex onto the generic OpenAI completions path. Let OpenClaw use its built-in Codex routing.

What to do

1. Remove that override
Either delete the whole models.providers.openai-codex block, or at least remove:

  • baseUrl
#
  • api
  • any per-model api override under that provider

A safe shape is more like:

{
  agents: {
    defaults: { model: { primary: "openai-codex/gpt-5.4" } }
  }
}

If you want provider tweaks, keep them to harmless stuff like model caps, not transport routing.

2. Update off 2026.4.15
There were more Codex OAuth fixes after that, especially in 2026.4.18.

wanton nest
#

},
"list": [
{
"id": "Dx",
"default": true,
"workspace": "/homeacmini/.openclaw/workspace",
"agentDir": "/hommini/.openclaw/agents/Drenox/agent",
"model": {
"primary": "openai-codex/gpt-5.4",
"fallbacks": [
"zai/glm-4.7",
"minimax/MiniMax-M2.7"
]
},

raven scrollBOT
#

That part looks fine, your default model is correct.

So the problem is probably not agents.defaults.model.primary, it’s still the lower-level provider config or stale OAuth.

What I need next is this, specifically:

openclaw config get models.providers.openai-codex
openclaw doctor
openclaw models status

If doctor says anything like:

  • models.providers.openai-codex contains a legacy transport override
  • api=openai-completions
  • baseUrl=https://api.openai.com
#

then that’s the bug.

So, short version:

  • âś… openai-codex/gpt-5.4 as the primary model is right
  • ❌ a custom models.providers.openai-codex transport override is not
  • ⚠️ if you’re still on 2026.4.15, I’d still update after fixing that

Paste those 3 outputs and I can tell you exactly what to remove.

wanton nest
#

i dont see your 2026.4.18 where i download it ?

raven scrollBOT
#

I’m checking the update docs so I don’t send you to the wrong place.

#

You’re right, my bad, I jumped ahead to main.

2026.4.18 is not the published stable download yet.
npm latest is still 2026.4.15, so you won’t see 2026.4.18 in the normal install/update path.

What I’d do now

You probably do not need 4.18 to fix this. The bigger issue is still that stale openai-codex provider override.

Please run and paste:

openclaw config get models.providers.openai-codex
openclaw doctor

If you want the newest published build, use:

#
openclaw update

Docs: https://docs.openclaw.ai/install/updating

If you really want bleeding-edge main, that’s a separate path, but I would not do that first. Let’s fix the config that’s shadowing Codex OAuth.

wanton nest
#

"codex": {
"baseUrl": "https://chatgpt.com/backend-api/v1",
"auth": "oauth",
"api": "openai-codex-responses",
"models": [
{
"id": "gpt-5.4",
"name": "GPT-5.4 Codex",
"api": "openai-codex-responses",
"reasoning": true,
"input": [
"text",
"image"
],
"contextWindow": 272000,
"maxTokens": 128000,
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
}
}
},
"openai-codex:fran@gmail.com": {
"provider": "openai-codex",
"mode": "oauth"
}
}
},

raven scrollBOT
#

I’m checking one detail here, because a provider key named codex is different from the built-in openai-codex path.

#

Ah, this is helpful.

If that snippet is literal, then I see the mismatch:

  • your model/auth are using openai-codex
  • but your custom provider block is named codex

Those are not the same provider id.

So right now you’ve got:

  • openai-codex/gpt-5.4 as the model
  • openai-codex:fran@gmail.com as the OAuth profile
  • but a separate custom provider called codex

That custom codex block is not the built-in openai-codex path.

#

What I’d do

Delete the custom models.providers.codex block and use the built-in provider only.

Keep:

  • openai-codex/gpt-5.4
  • openai-codex:fran@gmail.com

Then run:

openclaw models auth login --provider openai-codex --set-default
openclaw doctor
openclaw gateway restart
#

Short version

  • âś… openai-codex:fran@gmail.com is fine
  • âś… openai-codex/gpt-5.4 is fine
  • ❌ custom provider key codex is probably the thing confusing this setup

If you want, paste just these two next:

openclaw config get models.providers
openclaw config get auth.order

and I’ll tell you the exact lines to remove.

wanton nest
#

"openai-codex:fra@gmail.com": {
"provider": "openai-codex",
"mode": "oauth"
} "model": {
"primary": "openai-codex/gpt-5.4",
"fallbacks": [
"minimax/MiniMax-M2.7"

raven scrollBOT
#

Yep, those lines are fine.

So:

  • âś… openai-codex:fra@gmail.com auth profile is fine
  • âś… primary: openai-codex/gpt-5.4 is fine
  • âś… the MiniMax fallback is unrelated

That means the bad config is somewhere else, almost certainly under models.providers.

What to remove, if you see it

If your config has either of these blocks:

  • models.providers.codex
  • models.providers.openai-codex
#

and inside it you see stuff like:

baseUrl: ...
api: ...
models: [...]

then delete that whole custom provider block.

For Codex OAuth, you usually want:

  • the auth profile
  • the model selection

and not a hand-written provider transport block.

#

Then run

openclaw models auth login --provider openai-codex --set-default
openclaw doctor
openclaw gateway restart

If you want, paste this one command next:

openclaw config get models.providers

That should expose the exact bit that’s still breaking it.

wanton nest
#

work thanks you