Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.Thin issue quality; more reproduction proof or environment detail is needed.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Bug
OpenClaw 2026.6.1 (2e08f0f) — OpenAI ChatGPT Plus OAuth flow does not request the model.request scope, causing all openai/* model calls to fail with HTTP 401 and silently fall back to the next configured model.
What happened
- Primary model:
openai/gpt-5.5(ChatGPT Plus OAuth,openai:oliver.prado@gmail.com) - Fallback:
litellm-anthropic/glm-5.1 - OAuth login succeeds, token is issued, but API calls return:
{
"error": {
"message": "You have insufficient permissions for this operation. Missing scopes: model.request.",
"type": "invalid_request_error",
"code": "missing_scope"
}
}- Result: every request silently falls back to the fallback model. No visible error to the user.
Root cause
The OAuth scope string in openai-chatgpt-oauth-flow.runtime-*.js is:
const SCOPE = "openid profile email offline_access";OpenAI now requires model.request for chat completion API access. This scope is not being requested.
The probe URL in openai-chatgpt-oauth.runtime-*.js also only requests openid+profile+email.
Workaround
Manually patch the scope to include model.request:
const SCOPE = "openid profile email offline_access model.request";Then restart gateway and re-run openclaw models auth login.
Expected fix
Update the default OAuth scope string to include model.request (or whatever scope OpenAI currently requires for model access).
Environment
- OpenClaw 2026.6.1 (2e08f0f)
- Linux x64
- ChatGPT Plus plan
chatgptPlanType: plusin auth profile
Reacted by clawsweeper
Reacted by clawsweeper
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.Thin issue quality; more reproduction proof or environment detail is needed.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Activity
clawsweeper commentedon Jun 5, 2026
Thanks for the report. I checked current
main, but this shell is missing enough reproduction detail to verify a current bug.The reporter’s successful connector-scope workaround is useful historical evidence, but the only reproduction is from June on 2026.6.1. Current authentication and routing distinguish several credential types and endpoints; the unchanged scope string alone does not establish a remaining model-access defect.
Review details
Best possible solution:
Keep credential-specific routing and use Settings → Models → Connect provider → Test & use to verify current access before considering any broader OAuth grant.
Do we have a high-confidence way to reproduce the issue?
No high-confidence current-main reproduction is established. The June workaround succeeded, but the original failing request’s endpoint and runtime are unspecified and no recent release reproduction was added.
Is this the best way to solve the issue?
No: adding model.request is contradicted by the reporter’s authorization failure and prior merged scope correction. Connector-scope expansion needs a current credential-and-endpoint reproduction before it can be justified as an inference repair.
Security review:
Security review: This is authentication-failure triage without a proposed patch or demonstrated security-boundary violation.
AGENTS.md: found and applied where relevant.
What I checked:
extensions/openai/openai-chatgpt-oauth-authorization.runtime.ts:9, aacb4fa81796)docs/providers/openai/authentication.md. (docs/providers/openai/authentication.md:64, aacb4fa81796)codex-rs/login/src/server.rs:607, a956835d0207)extensions/openai/openai-provider.ts:570, aacb4fa81796)Likely related people:
Codex review notes: model internal, reasoning medium; reviewed against aacb4fa81796.
ozp commentedon Jun 5, 2026
Follow-up from local testing: adding only
model.requestto the OpenAI ChatGPT OAuth authorize scope caused the browser OAuth flow itself to fail with an OpenAI authentication error before token issuance (request id c7b5211d-5493-4493-ae1e-f583212d2e71). Based on ClawSweeper review noting upstream Codex currently requestsapi.connectors.read api.connectors.invoke, I am testing that scope pair locally next. This suggests the API 401 message namingmodel.requestmay not map 1:1 to an accepted OAuth consent scope for this client.ozp commentedon Jun 5, 2026
Final local validation: after changing the OpenAI ChatGPT OAuth authorize scope to
openid profile email offline_access api.connectors.read api.connectors.invokeand re-runningopenclaw models auth login --agent main, a direct smoke test succeeded:openclaw agent --agent main --session-key agent:main:oauth-smoke-test --model openai/gpt-5.5 --thinking off --json --timeout 120 --message "Smoke test. Reply with exactly: OPENAI_OK". Result:winnerProvider=openai,winnerModel=gpt-5.5,fallbackUsed=false, responseOPENAI_OK. This confirms the connector scopes restored GPT-5.5 access locally, whilemodel.requestalone broke browser OAuth authorization.13 remaining items
openclaw-barnacle commentedon Sep 20, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
openclaw-barnacle commentedon Oct 7, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.