-
-
Notifications
You must be signed in to change notification settings - Fork 69.6k
OAuth (ChatGPT Pro) only works with GPT-4o — all GPT-5+ models fail with "Failed to extract accountId from token" #27055
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Hi, I'm running OpenClaw 2026.2.24 on a Vultr VPS with Telegram as my main channel.
My auth is ChatGPT Pro via OAuth (openai-codex provider).
The problem: GPT-4o works perfectly when using openai-completions API, but every GPT-5+ model fails immediately with:
Failed to extract accountId from token
Models tested:
- gpt-4o → ✅ Works (via openai-completions)
- gpt-5 → ❌ Failed to extract accountId from token
- gpt-5-mini → ❌ Same error
- gpt-5.2 → ❌ Same error
- gpt-4.1 → ❌ Same error
What I've tried:
- Updated OpenClaw from 2026.2.23 to 2026.2.24
- Re-authenticated via
openclaw agents add main(OAuth flow) - Changed API endpoint from
openai-responsestoopenai-completionsin models.json (this is what fixed GPT-4o) - Added GPT-5+ models explicitly in models.json with
"api": "openai-completions" - Cleared cooldowns and error counts in auth-profiles.json
- Verified the model definitions are correct in both openclaw.json and models.json
Background: The original issue was that gpt-5.3-codex started failing with HTTP 401: Missing scopes: api.responses.write. My OAuth token only has scopes: openid, profile, email, offline_access — it's missing api.responses.write which the Responses API now requires.
Switching to openai-completions fixed GPT-4o, but OpenClaw seems to internally force a different code path for GPT-5+ models that still fails.
Questions:
- Is there a way to force GPT-5+ models to use the Chat Completions API path with OAuth?
- Is there a plan to update the OAuth flow to request the
api.responses.writescope? - Any workaround to use GPT-5.2 or GPT-4.1 with a ChatGPT Pro subscription?
Relevant config:
- Provider: openai-codex with OAuth
- API set to: openai-completions
- Auth profile type: oauth
- OpenClaw version: 2026.2.24 (df9a474)
- OS: Ubuntu on Vultr VPS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.