Skip to content

OpenClaw 2026.6.10 provider-unification gotcha: openai/gpt-5.5 requires provider openai to route to the subscription backend #96771

Closed as not planned

Description

@FreddieM-engpai

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 openai was 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, and api are provider-level, openai/gpt-5.5 could not reach the subscription backend while provider openai pointed 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:

  1. Agents selecting openai/gpt-5.5 but failing authentication or model resolution.
  2. Agents with fallbacks moving to a paid fallback model unexpectedly.
  3. Agents without fallbacks returning generic processing errors.
  4. A restart temporarily making things worse because the provider-unification migration re-applied.
  5. 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:

  1. Re-adding an openai-codex provider and setting primaries back to openai-codex/gpt-5.5.
  2. Copying old provider blocks into generated per-agent catalogs.
  3. Restarting the gateway before proving the fix was migration-stable.
  4. 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:

  1. openclaw config validate
  2. Gateway status / connectivity probe
  3. Live agent healthcheck messages
  4. Inspect latest transcript/provider field to confirm provider was openai and not the paid fallback provider
  5. 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

  1. On OpenClaw 2026.6.10, do not assume openai-codex/gpt-5.5 remains the durable canonical route after provider unification.
  2. If a migration rewrites primaries to openai/gpt-5.5, make sure provider openai actually points at the ChatGPT subscription backend.
  3. Provider-level fields (baseUrl, auth, api) are the real routing truth.
  4. Auth may now live in per-agent SQLite, not in auth-profiles.json.
  5. Avoid gateway restarts during partial incidents unless the fix is proven restart-stable or a maintenance window is approved.
  6. Validate with live agent runs and transcript provider fields, not config checks alone.
  7. 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:

  1. Migration warning when openai/gpt-5.5 is selected but provider openai does not contain the subscription backend/API shape.
  2. Doctor check that detects: agent primary is openai/gpt-5.5 while provider openai lacks gpt-5.5 or points at a non-subscription backend.
  3. Doctor output that clearly says where live auth is stored after migration (SQLite vs JSON).
  4. A built-in command to refresh/reload per-agent auth without restarting the gateway.
  5. A command to show resolved runtime route: selected model -> provider -> backend/API -> auth profile -> cost bucket.
  6. 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.

Activity

  1. clawsweeper commented on Jun 25, 2026

    @clawsweeper
    Contributor

    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-codex repair, 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 canonical openai/gpt-5.5 while provider-level openai still 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

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.
    • Include redacted logs or terminal output.

    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 mixed openai and 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:

    • The live Windows multi-agent OAuth upgrade path was not replayed, so the exact runtime failure remains source-reproducible rather than fully reproduced.
    • The remaining scope could become broad if maintainers choose a new route-inspection command instead of a focused doctor/status warning for the mixed-provider state.

    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 the openai-codex to openai migration.
    Evidence reviewed

    What I checked:

    Likely related people:

    • Chunyue Wang: Authored the safe legacy openai-codex model 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)
    • Peter Steinberger: GitHub path history shows repeated OpenAI provider identity, legacy Codex doctor-only, auth SQLite, and status runtime helper commits across the implicated surfaces. (role: feature-history owner; confidence: high; commits: 4c33aaa86c16, 7423e9cb663c, e16ac0433092; files: src/commands/doctor/shared/legacy-config-migrations.runtime.models.ts, src/commands/doctor-auth.ts, src/agents/auth-profiles/sqlite.ts)
    • B: Authored the stale Codex override warning that detects legacy models.providers.openai-codex transport overrides shadowing OAuth. (role: adjacent doctor-warning contributor; confidence: medium; commits: 505001754301; files: src/commands/doctor-auth.ts)
    • Mason Huang: Authored the current pinned-session status clear-hint work adjacent to the report's session override confusion. (role: recent status guidance contributor; confidence: medium; commits: 3ce3ed668d92; files: src/commands/status.command-sections.ts, src/commands/status.summary.test.ts)
    • Vincent Koc: Recently maintained the SQLite auth profile storage path, including security paths and read contention behavior. (role: recent auth persistence contributor; confidence: medium; commits: 7186f0d65462, e51c0c8cea52, 0ef8620746f8; files: src/agents/auth-profiles/sqlite.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P2Normal backlog priority with limited blast radius.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jun 25, 2026
  3. hongyegong commented on Jun 30, 2026

    @hongyegong

    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_state and auth_profile_stores tables are both empty (SELECT count(*) FROM auth_profile_stores; → 0, same for auth_profile_state). The migration's intermediate backup files exist on disk:

    ~/.openclaw/agents/main/agent/auth-profiles.json.openai-provider-unification.<ts>.bak
    ~/.openclaw/agents/main/agent/auth-profiles.json.sqlite-import.<ts>.bak
    ~/.openclaw/agents/feishu/agent/auth-profiles.json.sqlite-import.<ts>.bak
    ~/.openclaw/agents/feishu/agent/auth-profiles.json.bak.<ts>
    

    …but the live JSON auth-profiles.json files 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:

    Missing API key for the selected provider on the gateway. Configure provider auth, then try again.
    

    Even though OAuth was the original credential type and an API key was never required.

    Recovery on this install was:

    1. Restore the OAuth profile by copying auth-profiles.json.sqlite-import.<ts>.bak back over auth-profiles.json for each agent dir
    2. Align config with the migration's expectation (rename openai-codex/gpt-5.4 → openai/gpt-5.4 in agents.defaults.model.primary, agents.defaults.models, and the SQLite cron_jobs.payload_model column for all crons)
    3. Replace models.providers["openai-codex"] (added during one of my own attempted fixes — should not exist post-unification) with models.providers["openai"] = { models: [{id: "gpt-5.4", name: "gpt-5.4"}] } (OAuth-based, no apiKey/baseUrl)
    4. Run openclaw models auth login --provider openai so the user re-authenticates ChatGPT/Codex OAuth in a browser

    After 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:

    1. Is the empty-SQLite outcome above expected when an installation crosses the unification migration, or is it an additional bug that should be tracked separately?
    2. Is there a recommended way to confirm a healthy post-unification install before re-auth — e.g., a CLI subcommand or diagnostic that surfaces "live auth profile rows present per agent store_key, matching provider id openai"? On this install the absence wasn't visible until the first user message after the upgrade.
  4. openclaw-barnacle commented on Jul 15, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  5. barnacle-openclaw commented on Jul 22, 2026

    @barnacle-openclaw

    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.

  6. locked as resolved and limited conversation to collaborators on Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions