openclaw - ✅(Solved) Fix [Bug]: OpenClaw update/doctor rewrites OAuth model provider to API-key provider [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#78570Fetched 2026-05-07 03:35:14
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
2
Author
Timeline (top)
labeled ×2commented ×1cross-referenced ×1subscribed ×1

Observed behavior: Running openclaw update / openclaw doctor --non-interactive --fix rewrites model references under agents from:

  • openai-codex/gpt-5.5
  • openai-codex/gpt-5.4

to:

  • openai/gpt-5.5
  • openai/gpt-5.4

Root Cause

This silently changes normal agent model calls from OAuth (openai-codex) to the API-key provider (openai). Because the gateway environment contains OPENAI_API_KEY for embeddings, model calls then start billing through the OpenAI Platform API.

Fix Action

Fixed

PR fix notes

PR #78603: fix #78570: [Bug]: OpenClaw update/doctor rewrites OAuth model provider to API-key provider

Description (problem / solution / changelog)

Summary

Fixes #78570

Issue

[Bug]: OpenClaw update/doctor rewrites OAuth model provider to API-key provider

Changes

  • fix(doctor): skip openai-codex route rewrite when OAuth is available

Changed Files

CHANGELOG.md                                       |   2 +-
 .../doctor/shared/codex-route-warnings.test.ts     | 202 +++++++++++++--------
 src/commands/doctor/shared/codex-route-warnings.ts |  85 +++++----
 3 files changed, 180 insertions(+), 109 deletions(-)

Changed files

  • CHANGELOG.md (modified, +1/-1)
  • src/commands/doctor/shared/codex-route-warnings.test.ts (modified, +128/-74)
  • src/commands/doctor/shared/codex-route-warnings.ts (modified, +51/-34)
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Observed behavior: Running openclaw update / openclaw doctor --non-interactive --fix rewrites model references under agents from:

  • openai-codex/gpt-5.5
  • openai-codex/gpt-5.4

to:

  • openai/gpt-5.5
  • openai/gpt-5.4

Steps to reproduce

openclaw update

Expected behavior

This silently changes normal agent model calls from OAuth (openai-codex) to the API-key provider (openai). Because the gateway environment contains OPENAI_API_KEY for embeddings, model calls then start billing through the OpenAI Platform API.

Impact: This caused unexpected OpenAI Platform API usage/costs. Local session logs showed approximately $4.70 of provider=openai model usage in one day, mainly from automated agents/heartbeats, even though the intended model provider was OAuth via openai-codex.

Actual behavior

Expected configuration:

  • Agent models should use OAuth provider:
    • openai-codex/gpt-5.5
    • fallback openai-codex/gpt-5.4
  • OpenAI API key should only be used for embeddings:
    • agents.defaults.memorySearch.provider = "openai"
    • agents.defaults.memorySearch.model = "text-embedding-3-large"

OpenClaw version

2026.5.5 (b1abf9d)

Operating system

Debian GNU/Linux 13 (trixie)

Install method

npm

Model

5.5 gpt

Provider / routing chain

Oauth openai

Additional provider/model setup details

API for openai memory embeddings - for only that purpose

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

This silently changes normal agent model calls from OAuth (openai-codex) to the API-key provider (openai). Because the gateway environment contains OPENAI_API_KEY for embeddings, model calls then start billing through the OpenAI Platform API.

Impact: This caused unexpected OpenAI Platform API usage/costs. Local session logs showed approximately $4.70 of provider=openai model usage in one day, mainly from automated agents/heartbeats, even though the intended model provider was OAuth via openai-codex.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING