Skip to content

[Bug]: openai-codex gpt-5.1/5.2/5.3 rejected on ChatGPT/Codex OAuth, only gpt-5.4 works #67158

@drpau

Description

@drpau

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Recently, OpenClaw stopped working for me with Codex models other than openai-codex/gpt-5.4 when using a ChatGPT/Codex OAuth account.

gpt-5.1, gpt-5.2, and gpt-5.3 variants all fail with:
{"detail":"The 'gpt-5.1' model is not supported when using Codex with a ChatGPT account."}

(The model name in the error changes depending on which one I try.)

This worked previously, and it seems like other users are seeing similar behavior.

Steps to reproduce

  1. Authenticate with openai-codex / ChatGPT-Codex OAuth
  2. Try using a non-gpt-5.4 Codex model, for example a gpt-5.1, gpt-5.2, or gpt-5.3 variant
  3. Observe the request fail with the unsupported-model error above

Expected behavior

Not receive the error and just get a response back from the model

Actual behavior

{"detail":"The 'gpt-5.1' model is not supported when using Codex with a ChatGPT account."}

OpenClaw version

OpenClaw 2026.4.14 (323493f)

Operating system

Ubunto 24.04

Install method

npm

Model

openai-codex/5.4

Provider / routing chain

openclaw

Additional provider/model setup details

Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : openai-codex/gpt-5.4
Fallbacks (2) : openai-codex/gpt-5.3-codex, openai-codex/gpt-5.2-codex
Configured models (1): openai-codex/gpt-5.4

Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (1): openai-codex (2)

OAuth/token status
[openai-codex] Token refresh failed: 401 {
"error": {
"message": "Your refresh token has already been used to generate a new access token. Please try signing in again.",
"type": "invalid_request_error",
"param": null,
"code": "refresh_token_reused"
}
}
openai-codex usage: 5h 77% left ⏱2h 17m · Week 43% left ⏱1d 9h

openclaw models list --provider openai-codex

Model Input Ctx Local Auth Tags
openai-codex/gpt-5.4 text+image 1025k no yes default,configured
openai-codex/gpt-5.3-codex text+image 266k no yes fallback#1
openai-codex/gpt-5.2-codex text+image 266k no yes fallback#2

Notes

  • This started happening recently after previously working
  • It looks like openai-codex/gpt-5.4 is still usable, but the other Codex variants are not
  • Not sure whether the refresh_token_reused status is related, or just a separate auth cleanup issue

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingregressionBehavior that previously worked and now fails

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions