Repository navigation
Description
OpenClaw 2026.6.10 provider-unification incident: openai/gpt-5.5 failed after upgrade because provider-level routing still pointed elsewhere
Summary
After upgrading to OpenClaw 2026.6.10, a multi-agent installation started failing to route ChatGPT-subscription-backed GPT-5.5 requests correctly. Some agents fell back to a paid fallback model; agents without fallbacks returned generic errors.
The root cause was a provider-unification mismatch:
- The 2026.6.10 migration rewrote/expected agent primaries as
openai/gpt-5.5. - In this installation, provider
openaiwas still configured for a different backend used by non-agent tooling. - The ChatGPT subscription route still existed under the older provider key (
openai-codex). - Since routing fields such as
baseUrl,auth, andapiare provider-level,openai/gpt-5.5could not reach the subscription backend while provideropenaipointed elsewhere.
The durable fix was to align provider openai with the migration's expectation: make openai point to the ChatGPT subscription backend, move unrelated non-agent tooling to a separate provider, and keep agent primaries as openai/gpt-5.5.
Environment
- OpenClaw version: 2026.6.10
- OS: Windows
- Multi-agent setup
- ChatGPT subscription/OAuth-backed GPT-5.5 route
- Some agents had a paid fallback model configured; others had no fallback
- Auth state had migrated into per-agent SQLite stores
Symptoms
Observed symptoms included:
- Agents selecting
openai/gpt-5.5but failing authentication or model resolution. - Agents with fallbacks moving to a paid fallback model unexpectedly.
- Agents without fallbacks returning generic processing errors.
- A restart temporarily making things worse because the provider-unification migration re-applied.
- Existing JSON auth-profile repair workflows no longer working because live auth had moved to SQLite.
Representative error classes:
Auth profile "openai:..." uses oauth auth, but openai/openai-responses requires an OpenAI API key profile.
No API key found for provider "openai-codex".
Fallback selected paid fallback model after selected openai/gpt-5.5 failed auth/model routing.
What made it confusing
There were several overlapping issues:
1. The model string changed
Older working configuration used a route similar to:
openai-codex/gpt-5.5
The new migration expected/canonicalized toward:
openai/gpt-5.5
At first, it looked like the fix was to change everything back to openai-codex/gpt-5.5. That worked only until the next restart, because the migration re-applied.
2. Provider-level routing mattered more than model names
The decisive point: provider routing is provider-level. If provider openai points at backend A, a model called gpt-5.5 under provider openai cannot independently route to backend B unless OpenClaw supports that at the model level.
So the config was internally inconsistent:
agents -> openai/gpt-5.5
provider openai -> non-subscription backend
provider openai-codex -> subscription backend
The migration expected openai to be the subscription backend. In this installation it was not.
3. Auth moved to SQLite
The upgrade migrated live auth state into per-agent SQLite stores. Old auth-profiles.json files/backups were useful for recovery, but not necessarily the live source of truth.
This means repairs that only edited JSON profile files did not affect runtime behavior.
4. Session-level overrides can hide config fixes
One active session stayed pinned to the paid fallback model through a session-level model override. Even after provider config was fixed, that session continued using the fallback until the override was cleared/reset.
Failed/temporary fixes
These helped diagnose the issue but were not durable:
- Re-adding an
openai-codexprovider and setting primaries back toopenai-codex/gpt-5.5. - Copying old provider blocks into generated per-agent catalogs.
- Restarting the gateway before proving the fix was migration-stable.
- Treating auth-profile JSON files as live after auth had moved to SQLite.
The key failure mode: changes that fought the migration worked only until the next restart/doctor run.
Durable fix
The durable fix was to make the post-migration canonical route actually correct.
1. Make provider openai the subscription-backed provider
Provider openai was changed to use the ChatGPT subscription backend fields equivalent to the previous working subscription provider:
provider: openai
baseUrl: ChatGPT subscription backend
api: subscription responses API
apiKey/auth: token/OAuth-backed profile
models: gpt-5.5 and related subscription-backed models
2. Move unrelated tooling off provider openai
A transcription model that had been configured under provider openai was moved to the separate openrouter provider. Embedding configuration in this installation used a separate inline OpenRouter config and was left unchanged.
3. Keep agent primaries migration-stable
All agents were set to:
openai/gpt-5.5
This matched the migration's canonical output, so future restarts no longer re-broke the configuration.
4. Repair per-agent SQLite auth aliases
For agents using a separate subscription account, valid tokens were present in imported/backup auth data but missing under the provider aliases expected by the resolver. The fix was to write the required token aliases into the per-agent SQLite auth_profile_store.
5. Clear fallback session override
The active orchestrator session was reset from its paid fallback override back to the configured primary.
Verification
Verification should not stop at config validation. The useful checks were:
openclaw config validate- Gateway status / connectivity probe
- Live agent healthcheck messages
- Inspect latest transcript/provider field to confirm provider was
openaiand not the paid fallback provider - Confirm usage/cost showed subscription usage rather than paid fallback spend
Example verification pattern:
agent healthcheck -> expected exact reply
inspect latest transcript -> provider=openai
confirm paid fallback provider not present in latest turn
Lessons learned
- On OpenClaw 2026.6.10, do not assume
openai-codex/gpt-5.5remains the durable canonical route after provider unification. - If a migration rewrites primaries to
openai/gpt-5.5, make sure provideropenaiactually points at the ChatGPT subscription backend. - Provider-level fields (
baseUrl,auth,api) are the real routing truth. - Auth may now live in per-agent SQLite, not in
auth-profiles.json. - Avoid gateway restarts during partial incidents unless the fix is proven restart-stable or a maintenance window is approved.
- Validate with live agent runs and transcript provider fields, not config checks alone.
- Watch for session-level model overrides pinning a session to fallback even after config is fixed.
Suggested upstream improvements
These would have prevented or shortened the incident:
- Migration warning when
openai/gpt-5.5is selected but provideropenaidoes not contain the subscription backend/API shape. - Doctor check that detects: agent primary is
openai/gpt-5.5while provideropenailacksgpt-5.5or points at a non-subscription backend. - Doctor output that clearly says where live auth is stored after migration (SQLite vs JSON).
- A built-in command to refresh/reload per-agent auth without restarting the gateway.
- A command to show resolved runtime route: selected model -> provider -> backend/API -> auth profile -> cost bucket.
- A warning when an active session has a model override that differs from agent config.
Final state
After aligning provider openai with the subscription backend and moving unrelated OpenRouter tooling away from provider openai, restart no longer re-broke routing. Agents selected openai/gpt-5.5 and resolved to the subscription-backed route as intended.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 25, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 29, 2026, 10:46 AM ET / 14:46 UTC.
Summary
Keep open. Current main has legacy
openai-codexrepair, unsafe mixed-provider preservation, SQLite auth storage, and pinned-session status warnings, but I did not find a current doctor/status diagnostic that fully covers canonicalopenai/gpt-5.5while provider-levelopenaistill points at a non-subscription backend.Reproducibility: Do we have a high-confidence way to reproduce the issue? Partially: source and tests cover the mixed-provider shape and stale-session warning paths, but I did not replay the exact Windows multi-agent OAuth upgrade against live providers.
Ways to help us reproduce this
Next step
The current labels and source review point to a maintainer product decision before automation, because the remaining repair could be a doctor warning, status route inspection, auth reload command, or session-warning behavior.
Review details
Best possible solution:
Keep canonical
openai/gpt-*Codex routing, then add or bless a focused doctor/status diagnostic for mixedopenaiand legacy subscription-backend state plus stale fallback/session pins.Do we have a high-confidence way to reproduce the issue?
Do we have a high-confidence way to reproduce the issue? Partially: source and tests cover the mixed-provider shape and stale-session warning paths, but I did not replay the exact Windows multi-agent OAuth upgrade against live providers.
Is this the best way to solve the issue?
Is this the best way to solve the issue? Unclear: canonical
openai/gpt-*routing is the right direction, but maintainers should choose whether the fix is a narrow doctor/status diagnostic or a broader route-inspection/auth-reload UX.AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against be94853de0d0.
Label changes
Label justifications:
P2: The report describes a bounded but real upgrade/provider-routing failure with paid fallback and auth-provider side effects.impact:session-state: The issue includes stale session-level model overrides that kept a session pinned to a fallback after config repair.impact:auth-provider: The issue centers on provider routing, OAuth/API-key profile resolution, and theopenai-codextoopenaimigration.Evidence reviewed
What I checked:
openaialready exists, migration skips unsafe merges where provider-level defaults would leak into legacy Codex models. (src/commands/doctor/shared/legacy-config-migrations.runtime.models.ts:1237, be94853de0d0)openaiprovider and a ChatGPT-backedopenai-codexprovider when provider-level defaults cannot be represented safely on merged models. (src/commands/doctor/shared/legacy-config-migrate.test.ts:422, be94853de0d0)models.providers.openai-codex, not a canonicalmodels.providers.openaibackend mismatch after migration. (src/commands/doctor/shared/preview-warnings.test.ts:466, be94853de0d0)models.providers.openai-codexcontains legacy transport overrides alongside Codex OAuth. (src/commands/doctor-auth.ts:117, be94853de0d0)Likely related people:
openai-codexmodel merge commit that preserves unsafe mixed providers for manual cleanup. (role: recent doctor migration contributor; confidence: high; commits: e06f6ffc3e87; files:src/commands/doctor/shared/legacy-config-migrations.runtime.models.ts,src/commands/doctor/shared/legacy-config-migrate.test.ts)src/commands/doctor/shared/legacy-config-migrations.runtime.models.ts,src/commands/doctor-auth.ts,src/agents/auth-profiles/sqlite.ts)models.providers.openai-codextransport overrides shadowing OAuth. (role: adjacent doctor-warning contributor; confidence: medium; commits: 505001754301; files:src/commands/doctor-auth.ts)src/commands/status.command-sections.ts,src/commands/status.summary.test.ts)src/agents/auth-profiles/sqlite.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.hongyegong commentedon Jun 30, 2026
Reproducing the same provider-unification pattern on 2026.6.9 — adding one specific data point that may or may not be a separate underlying bug:
After the 2026.6.9 upgrade ran on this macOS install, the SQLite
auth_profile_stateandauth_profile_storestables are both empty (SELECT count(*) FROM auth_profile_stores;→ 0, same forauth_profile_state). The migration's intermediate backup files exist on disk:…but the live JSON
auth-profiles.jsonfiles no longer exist (they were moved aside by.sqlite-import.*.bak) and the SQLite destination has no rows. So at runtime there is no live auth profile state from either source. The visible failure when this combines with the model-name rename mismatch is:Even though OAuth was the original credential type and an API key was never required.
Recovery on this install was:
auth-profiles.json.sqlite-import.<ts>.bakback overauth-profiles.jsonfor each agent diropenai-codex/gpt-5.4→openai/gpt-5.4inagents.defaults.model.primary,agents.defaults.models, and the SQLitecron_jobs.payload_modelcolumn for all crons)models.providers["openai-codex"](added during one of my own attempted fixes — should not exist post-unification) withmodels.providers["openai"] = { models: [{id: "gpt-5.4", name: "gpt-5.4"}] }(OAuth-based, no apiKey/baseUrl)openclaw models auth login --provider openaiso the user re-authenticates ChatGPT/Codex OAuth in a browserAfter all four steps the bot recovers. The expired OAuth token was actually expected since it had been ~26h since the previous successful refresh — the underlying problem was that there was no live profile state for the refresh attempt to land into.
Two clarifying questions in case this is helpful:
openai"? On this install the absence wasn't visible until the first user message after the upgrade.openclaw-barnacle commentedon Jul 15, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
barnacle-openclaw commentedon Jul 22, 2026
Closing due to inactivity.
If this is still an issue, please retry on the latest OpenClaw release and share updated details.
If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.