Skip to content

fix(reply): clear 'model unavailable' reply + correct operator hint for retired runtime models#97611

Merged
RomneyDa merged 2 commits into
openclaw:mainfrom
RomneyDa:fix/runtime-bound-model-resolution-hint
Jun 29, 2026
Merged

fix(reply): clear 'model unavailable' reply + correct operator hint for retired runtime models#97611
RomneyDa merged 2 commits into
openclaw:mainfrom
RomneyDa:fix/runtime-bound-model-resolution-hint

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jun 29, 2026

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where a chat user (e.g. on Telegram) gets "⚠️ Something went
wrong while processing your request. Please try again, or use /new to start a
fresh session"
on every message — and /new doesn't help — when the agent's
configured model has been retired/renamed by the provider.

Concrete trigger: a config pinned to openai/gpt-5.3-codex via the codex
agent runtime (OpenAI ChatGPT account). After OpenAI stopped offering
gpt-5.3-codex to ChatGPT-account Codex, every turn failed. Two things made it
hard to recover:

  1. Chat user surface: model resolution throws a typed FailoverError with
    reason model_not_found, but the reply classifier has no matching branch, so
    the reply falls back to the generic "try again / use /new" copy — which is
    actively wrong here, since retrying or starting a new session can never fix a
    bad model id.

  2. Operator surface: the underlying "Unknown model" error appends a hint
    telling the operator to register the model in models.providers[].models[].
    For a runtime-bound model that's misleading: runtime-owned models draw their
    catalog from the runtime/account, not config, so following the hint can't
    help (and can push the operator toward a config that the provider rejects
    downstream).

Why This Change Was Made

Two small, layered changes, one per surface:

  • Chat reply (provider-request-error-classifier.ts): add a
    provider_model_unavailable classification that returns a dedicated reply
    ("the model is unavailable; this needs a config change; retrying//new won't
    help") instead of the generic copy. Detection is structural and typed-only
    — it keys off isFailoverError(err) && err.reason === "model_not_found" (the
    reason run.ts sets at resolution time). It does not match provider error
    text.

  • Operator hint (embedded-agent-runner/model.ts): when the configured
    agents.defaults.models entry is bound to an agentRuntime, stop advising a
    models.providers[] registration and instead point at the runtime's live
    catalog (openclaw models list --provider <id>).

Non-runtime/plain-provider behavior is unchanged.

Scope / non-goals

The chat classifier deliberately handles only the typed model_not_found
failover. It does not classify raw provider error strings or account-scoped
provider 400s (e.g. OpenAI's "model is not supported when using Codex with a
ChatGPT account"). Those carry no structured signal, and string-matching error
classification belongs to the failover layer that already owns it — not to this
downstream reply classifier. In practice the typed path covers the real
recovery case, and the operator-hint change steers operators away from the
config state that produces such provider 400s.

User Impact

  • Chat users now get an accurate, actionable reply instead of an endless
    generic "try again" loop, for any failure that surfaces as a typed
    model_not_found.
  • Operators debugging via logs/CLI get a hint that leads to the real fix
    (switch to an available model) instead of a models.providers[] registration
    that can't help for runtime-bound models.

Evidence

  • New unit tests:
    • provider-request-error-classifier.test.ts — a typed
      FailoverError(reason: "model_not_found") classifies to
      provider_model_unavailable; a bare error string without the typed reason,
      and a different typed reason (overloaded), both stay unclassified
      (locks in structural-only detection).
    • model.test.ts — a runtime-bound entry gets the runtime-catalog hint; a
      plain-provider entry keeps the existing registration hint.
  • Reproduced live on an affected install: the Codex app-server offered
    gpt-5.5/gpt-5.4/gpt-5.4-mini but not gpt-5.3-codex; the failing path
    threw exactly the typed model_not_found failover handled here, and switching
    the default to openai/gpt-5.5 restored normal operation. (Live
    ChatGPT/Codex account path not re-run in CI.)

AI-assisted: investigated and authored with Claude Code.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Jun 29, 2026
@clawsweeper

clawsweeper Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 28, 2026, 9:56 PM ET / 01:56 UTC.

Summary
The branch adds a typed model_not_found auto-reply classification and changes unknown-model hints for agentRuntime-bound agents.defaults.models entries to point at the runtime catalog instead of models.providers[], with focused regression tests.

PR surface: Source +10, Tests +23. Total +33 across 2 files.

Reproducibility: yes. at source level: current main throws typed model_not_found for unresolved models, lacks a matching reply-classifier branch, and emits provider-registration advice for configured agent model rows without provider rows. I did not rerun the live ChatGPT/Codex account path in this read-only review.

Review metrics: none identified.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Align the PR body or release context with the actual typed model_not_found behavior if maintainers want the public description to mention provider 400 text handling.

Risk before merge

  • [P1] The PR body still describes raw provider-message/account-scoped 400 classification, but the latest diff intentionally handles only typed FailoverError reason model_not_found; release notes should describe the typed path unless maintainers add the broader text classifier.

Maintainer options:

  1. Decide the mitigation before merge
    Land the focused classifier and hint change after maintainer review and green checks, with PR body or release context aligned to the actual typed-error scope.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • No automated repair candidate: this is a protected maintainer-labeled PR with no concrete patch defect from review; normal maintainer review and CI should decide landing.

Security
Cleared: Cleared: the diff changes TypeScript error classification/copy and tests only, with no dependency, workflow, secret, package, or supply-chain surface.

Review details

Best possible solution:

Land the focused classifier and hint change after maintainer review and green checks, with PR body or release context aligned to the actual typed-error scope.

Do we have a high-confidence way to reproduce the issue?

Yes at source level: current main throws typed model_not_found for unresolved models, lacks a matching reply-classifier branch, and emits provider-registration advice for configured agent model rows without provider rows. I did not rerun the live ChatGPT/Codex account path in this read-only review.

Is this the best way to solve the issue?

Yes, with one scope note: the typed FailoverError classifier is the right chat-user layer and the hint builder is the narrow operator layer. The current diff should not be treated as raw provider-400 text classification unless that behavior is added or the PR body is corrected.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4a4657a1828f.

Label changes

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This fixes a real user-facing model-recovery failure with limited blast radius in error classification and recovery copy.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable as a maintainer/MEMBER PR; the PR body reports live affected-install reproduction and the contributor proof gate does not require action here.
Evidence reviewed

PR surface:

Source +10, Tests +23. Total +33 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 14 4 +10
Tests 1 23 0 +23
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 37 4 +33

What I checked:

  • Live PR state: Live GitHub metadata shows this PR is open, mergeable, authored by a MEMBER, labeled maintainer, and currently at head a436ebf8af7f0f7ce07c7a82f6b7e15d73ff2c4f; cleanup review should keep it open for normal maintainer handling. (a436ebf8af7f)
  • Current-main operator hint: Current main builds Unknown model errors by appending buildMissingProviderModelRegistrationHint before provider plugin hints; the existing helper emits models.providers[] registration advice whenever a configured agents.defaults.models entry lacks a matching provider model row. (src/agents/embedded-agent-runner/model.ts:1879, 4a4657a1828f)
  • PR operator hint fix: At the PR head, buildMissingProviderModelRegistrationHint now detects configuredEntry.agentRuntime?.id and returns runtime-catalog guidance instead of provider-registration guidance for runtime-bound models. (src/agents/embedded-agent-runner/model.ts:1921, a436ebf8af7f)
  • Current-main chat failure path: When model resolution fails, current main throws a typed FailoverError with reason model_not_found; the existing reply classifier has auth, 429, conversation-state, and internal-error branches but no model-unavailable branch. (src/agents/embedded-agent-runner/run.ts:1142, 4a4657a1828f)
  • PR chat classifier fix: At the PR head, the classifier adds provider_model_unavailable and returns the dedicated user message only for typed FailoverError instances whose reason is model_not_found; tests also assert raw text alone remains unclassified. (src/auto-reply/reply/provider-request-error-classifier.ts:61, a436ebf8af7f)
  • Regression coverage: The PR keeps the plain provider-registration hint test, adds a runtime-bound model hint test, and adds classifier tests for typed model_not_found, raw-text non-classification, and other typed failover reasons. (src/agents/embedded-agent-runner/model.test.ts:2811, a436ebf8af7f)

Likely related people:

  • sweetcornna: Authored the merged provider-registration hint change that introduced the current recovery text this PR narrows. (role: recent area contributor; confidence: high; commits: 1532b46e2a63; files: src/agents/embedded-agent-runner/model.ts, src/agents/embedded-agent-runner/model.test.ts)
  • vincentkoc: Merged the provider-registration hint PR and has recent merged work in the central model resolver file. (role: merger and recent agent-runner contributor; confidence: medium; commits: 1532b46e2a63, 206552c6977b, 6ee989a235f0; files: src/agents/embedded-agent-runner/model.ts, src/agents/embedded-agent-runner/model.test.ts)
  • sjf-oa: Recently added typed provider-auth failure handling in the same provider request classifier and test file. (role: recent classifier contributor; confidence: high; commits: 113d6f3c6483; files: src/auto-reply/reply/provider-request-error-classifier.ts, src/auto-reply/reply/provider-request-error-classifier.test.ts)
  • dutifulbob: Introduced the provider conversation-state classifier path that this PR follows for user-facing channel failure copy. (role: classifier feature contributor; confidence: medium; commits: 80d03a1e5bcc; files: src/auto-reply/reply/provider-request-error-classifier.ts, src/auto-reply/reply/provider-request-error-classifier.test.ts)
  • steipete: Recent OpenAI/Codex model catalog and docs work is adjacent to the runtime-catalog contract behind this fix. (role: Codex/OpenAI catalog contributor; confidence: medium; commits: f4b5e58231c7, 33c0cd1378fc, 20b05f220e67; files: extensions/codex/provider.ts, extensions/openai/openai-provider.ts, docs/concepts/model-providers.md)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

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.

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Jun 29, 2026
@RomneyDa RomneyDa changed the title fix(models): don't advise models.providers[] registration for runtime-bound models fix(reply): clear 'model unavailable' reply + correct operator hint for retired runtime models Jun 29, 2026
RomneyDa and others added 2 commits June 28, 2026 18:52
…-bound models

When an agent's configured model is bound to an agent runtime (e.g. the
"codex" runtime, whose catalog comes from the OpenAI ChatGPT-account
app-server), and that model id is no longer offered by the runtime, model
resolution fails with "Unknown model: <provider>/<model>". The appended hint
told users to register the model in models.providers[].models[].

For runtime-owned models that advice is misleading: adding the registration
makes resolution "succeed" only for the request to be rejected later by the
provider — e.g. OpenAI returns 400 "model is not supported when using Codex
with a ChatGPT account" once a model id such as gpt-5.3-codex is deprecated.

Detect the agentRuntime binding on the configured agents.defaults.models entry
and instead point the user at the runtime's live catalog (openclaw models list
--provider <id>) and at switching the configured default to an available model.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… failure

When a configured model is retired/renamed by the provider, model resolution
fails (run.ts throws a typed FailoverError with reason "model_not_found") and
the agent runner falls back to the generic "Something went wrong … use /new"
reply. That copy is actively misleading for this failure: retrying or starting
a new session can never help, because the model id itself must be changed in
config. Users on a deprecated model (e.g. gpt-5.3-codex on a Codex ChatGPT
account) just see the generic message on every message and on /new.

Classify this failure into a dedicated user-facing reply that explains the
model is unavailable and points at the config. Detection is structural — it
keys off the typed FailoverError reason, not provider error text — so it stays
robust as provider wording changes; free-text rejections without a typed reason
remain the responsibility of the failover layer that owns error classification.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@RomneyDa
RomneyDa force-pushed the fix/runtime-bound-model-resolution-hint branch from 614ac49 to a436ebf Compare June 29, 2026 01:52
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Jun 29, 2026
@RomneyDa
RomneyDa merged commit 9388550 into openclaw:main Jun 29, 2026
115 of 117 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 29, 2026
…or retired runtime models (openclaw#97611)

* fix(models): don't advise models.providers[] registration for runtime-bound models

When an agent's configured model is bound to an agent runtime (e.g. the
"codex" runtime, whose catalog comes from the OpenAI ChatGPT-account
app-server), and that model id is no longer offered by the runtime, model
resolution fails with "Unknown model: <provider>/<model>". The appended hint
told users to register the model in models.providers[].models[].

For runtime-owned models that advice is misleading: adding the registration
makes resolution "succeed" only for the request to be rejected later by the
provider — e.g. OpenAI returns 400 "model is not supported when using Codex
with a ChatGPT account" once a model id such as gpt-5.3-codex is deprecated.

Detect the agentRuntime binding on the configured agents.defaults.models entry
and instead point the user at the runtime's live catalog (openclaw models list
--provider <id>) and at switching the configured default to an available model.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix(reply): show a clear "model unavailable" reply instead of generic failure

When a configured model is retired/renamed by the provider, model resolution
fails (run.ts throws a typed FailoverError with reason "model_not_found") and
the agent runner falls back to the generic "Something went wrong … use /new"
reply. That copy is actively misleading for this failure: retrying or starting
a new session can never help, because the model id itself must be changed in
config. Users on a deprecated model (e.g. gpt-5.3-codex on a Codex ChatGPT
account) just see the generic message on every message and on /new.

Classify this failure into a dedicated user-facing reply that explains the
model is unavailable and points at the config. Detection is structural — it
keys off the typed FailoverError reason, not provider error text — so it stays
robust as provider wording changes; free-text rejections without a typed reason
remain the responsibility of the failover layer that owns error classification.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
QiuYuang pushed a commit to QiuYuang/openclaw that referenced this pull request Jul 1, 2026
…or retired runtime models (openclaw#97611)

* fix(models): don't advise models.providers[] registration for runtime-bound models

When an agent's configured model is bound to an agent runtime (e.g. the
"codex" runtime, whose catalog comes from the OpenAI ChatGPT-account
app-server), and that model id is no longer offered by the runtime, model
resolution fails with "Unknown model: <provider>/<model>". The appended hint
told users to register the model in models.providers[].models[].

For runtime-owned models that advice is misleading: adding the registration
makes resolution "succeed" only for the request to be rejected later by the
provider — e.g. OpenAI returns 400 "model is not supported when using Codex
with a ChatGPT account" once a model id such as gpt-5.3-codex is deprecated.

Detect the agentRuntime binding on the configured agents.defaults.models entry
and instead point the user at the runtime's live catalog (openclaw models list
--provider <id>) and at switching the configured default to an available model.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix(reply): show a clear "model unavailable" reply instead of generic failure

When a configured model is retired/renamed by the provider, model resolution
fails (run.ts throws a typed FailoverError with reason "model_not_found") and
the agent runner falls back to the generic "Something went wrong … use /new"
reply. That copy is actively misleading for this failure: retrying or starting
a new session can never help, because the model id itself must be changed in
config. Users on a deprecated model (e.g. gpt-5.3-codex on a Codex ChatGPT
account) just see the generic message on every message and on /new.

Classify this failure into a dedicated user-facing reply that explains the
model is unavailable and points at the config. Detection is structural — it
keys off the typed FailoverError reason, not provider error text — so it stays
robust as provider wording changes; free-text rejections without a typed reason
remain the responsibility of the failover layer that owns error classification.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 1, 2026
…or retired runtime models (openclaw#97611)

* fix(models): don't advise models.providers[] registration for runtime-bound models

When an agent's configured model is bound to an agent runtime (e.g. the
"codex" runtime, whose catalog comes from the OpenAI ChatGPT-account
app-server), and that model id is no longer offered by the runtime, model
resolution fails with "Unknown model: <provider>/<model>". The appended hint
told users to register the model in models.providers[].models[].

For runtime-owned models that advice is misleading: adding the registration
makes resolution "succeed" only for the request to be rejected later by the
provider — e.g. OpenAI returns 400 "model is not supported when using Codex
with a ChatGPT account" once a model id such as gpt-5.3-codex is deprecated.

Detect the agentRuntime binding on the configured agents.defaults.models entry
and instead point the user at the runtime's live catalog (openclaw models list
--provider <id>) and at switching the configured default to an available model.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix(reply): show a clear "model unavailable" reply instead of generic failure

When a configured model is retired/renamed by the provider, model resolution
fails (run.ts throws a typed FailoverError with reason "model_not_found") and
the agent runner falls back to the generic "Something went wrong … use /new"
reply. That copy is actively misleading for this failure: retrying or starting
a new session can never help, because the model id itself must be changed in
config. Users on a deprecated model (e.g. gpt-5.3-codex on a Codex ChatGPT
account) just see the generic message on every message and on /new.

Classify this failure into a dedicated user-facing reply that explains the
model is unavailable and points at the config. Detection is structural — it
keys off the typed FailoverError reason, not provider error text — so it stays
robust as provider wording changes; free-text rejections without a typed reason
remain the responsibility of the failover layer that owns error classification.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 3, 2026
…or retired runtime models (openclaw#97611)

* fix(models): don't advise models.providers[] registration for runtime-bound models

When an agent's configured model is bound to an agent runtime (e.g. the
"codex" runtime, whose catalog comes from the OpenAI ChatGPT-account
app-server), and that model id is no longer offered by the runtime, model
resolution fails with "Unknown model: <provider>/<model>". The appended hint
told users to register the model in models.providers[].models[].

For runtime-owned models that advice is misleading: adding the registration
makes resolution "succeed" only for the request to be rejected later by the
provider — e.g. OpenAI returns 400 "model is not supported when using Codex
with a ChatGPT account" once a model id such as gpt-5.3-codex is deprecated.

Detect the agentRuntime binding on the configured agents.defaults.models entry
and instead point the user at the runtime's live catalog (openclaw models list
--provider <id>) and at switching the configured default to an available model.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix(reply): show a clear "model unavailable" reply instead of generic failure

When a configured model is retired/renamed by the provider, model resolution
fails (run.ts throws a typed FailoverError with reason "model_not_found") and
the agent runner falls back to the generic "Something went wrong … use /new"
reply. That copy is actively misleading for this failure: retrying or starting
a new session can never help, because the model id itself must be changed in
config. Users on a deprecated model (e.g. gpt-5.3-codex on a Codex ChatGPT
account) just see the generic message on every message and on /new.

Classify this failure into a dedicated user-facing reply that explains the
model is unavailable and points at the config. Detection is structural — it
keys off the typed FailoverError reason, not provider error text — so it stays
robust as provider wording changes; free-text rejections without a typed reason
remain the responsibility of the failover layer that owns error classification.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
ObliviateRickLin added a commit to ObliviateRickLin/openclaw that referenced this pull request Jul 12, 2026
OpenAI-backed runtimes reject plan/account-restricted models with HTTP
400 invalid_request_error ("The '<model>' model is not supported when
using Codex with a ChatGPT account."). Without a model_not_found match
the ambiguous-400 branch collapses this into a format failure, so users
get the generic retry//new copy for a config-only problem (openclaw#104490).
The 'when using' qualifier keeps capability rejections ("not supported
for tool calling") out of the class, preserving the openclaw#97611 contract.

Fixes openclaw#104490
ObliviateRickLin added a commit to ObliviateRickLin/openclaw that referenced this pull request Jul 12, 2026
OpenAI-backed runtimes reject plan/account-restricted models with HTTP
400 invalid_request_error ("The '<model>' model is not supported when
using Codex with a ChatGPT account."). Without a model_not_found match
the ambiguous-400 branch collapses this into a format failure, so users
get the generic retry//new copy for a config-only problem (openclaw#104490).
The 'when using' qualifier keeps capability rejections ("not supported
for tool calling") out of the class, preserving the openclaw#97611 contract.

Fixes openclaw#104490
altaywtf added a commit that referenced this pull request Jul 13, 2026
#104878)

* fix(agents): classify account-restricted model 400s as model_not_found

OpenAI-backed runtimes reject plan/account-restricted models with HTTP
400 invalid_request_error ("The '<model>' model is not supported when
using Codex with a ChatGPT account."). Without a model_not_found match
the ambiguous-400 branch collapses this into a format failure, so users
get the generic retry//new copy for a config-only problem (#104490).
The 'when using' qualifier keeps capability rejections ("not supported
for tool calling") out of the class, preserving the #97611 contract.

Fixes #104490

* fix(agents): narrow account model rejection match

---------

Co-authored-by: Altay <[email protected]>
wm0018 pushed a commit to wm0018/openclaw that referenced this pull request Jul 14, 2026
openclaw#104878)

* fix(agents): classify account-restricted model 400s as model_not_found

OpenAI-backed runtimes reject plan/account-restricted models with HTTP
400 invalid_request_error ("The '<model>' model is not supported when
using Codex with a ChatGPT account."). Without a model_not_found match
the ambiguous-400 branch collapses this into a format failure, so users
get the generic retry//new copy for a config-only problem (openclaw#104490).
The 'when using' qualifier keeps capability rejections ("not supported
for tool calling") out of the class, preserving the openclaw#97611 contract.

Fixes openclaw#104490

* fix(agents): narrow account model rejection match

---------

Co-authored-by: Altay <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 14, 2026
openclaw#104878)

* fix(agents): classify account-restricted model 400s as model_not_found

OpenAI-backed runtimes reject plan/account-restricted models with HTTP
400 invalid_request_error ("The '<model>' model is not supported when
using Codex with a ChatGPT account."). Without a model_not_found match
the ambiguous-400 branch collapses this into a format failure, so users
get the generic retry//new copy for a config-only problem (openclaw#104490).
The 'when using' qualifier keeps capability rejections ("not supported
for tool calling") out of the class, preserving the openclaw#97611 contract.

Fixes openclaw#104490

* fix(agents): narrow account model rejection match

---------

Co-authored-by: Altay <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant