fix(agents): classify Zhipu GLM overload as overloaded for failover#93241
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 20, 2026, 11:47 PM ET / 03:47 UTC. Summary PR surface: Source +1, Tests +31. Total +32 across 3 files. Reproducibility: no. high-confidence live reproduction is present. Source inspection shows current main and v2026.6.9 lack the reported overload phrase, and the PR tests exercise the injected thrown-error boundary, but no real Z.AI endpoint or redacted OpenClaw fallback run was provided. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one canonical classifier fix once maintainers accept provider-neutral phrase matching and the PR has redacted real fallback proof or an explicit proof waiver; keep the linked issue open until merge. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction is present. Source inspection shows current main and v2026.6.9 lack the reported overload phrase, and the PR tests exercise the injected thrown-error boundary, but no real Z.AI endpoint or redacted OpenClaw fallback run was provided. Is this the best way to solve the issue? Likely yes, subject to maintainer acceptance and proof: the latest head avoids the rejected bare numeric matcher and uses the existing shared Chinese overload bucket. If maintainers want provider-specific scoping, the safer alternative is a Z.AI provider AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9750d887f502. Label changesLabel justifications:
Evidence reviewedPR surface: Source +1, Tests +31. Total +32 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
|
|
Strengthened the proof to the orchestrator level. Added a
Commands and before/after are in the updated PR description. On the same-issue overlap with #93212: this branch changes only the message-pattern list ( @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
ed503cd to
e0eb3c4
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
7794eee to
92efb24
Compare
Zhipu (GLM) signals overload as HTTP 200 with body "[1305][该模型当前访问量过大,请您稍后再试]". The failover classifier had no pattern for it, so a configured model fallback never triggered and the run failed outright. Add the distinctive overload phrase to the overloaded message patterns, alongside the existing Chinese overload markers, so failover keys on it. Closes openclaw#93211
…Fallback Drive the real runWithModelFallback orchestrator with the reported Zhipu overload error [1305][该模型当前访问量过大,请您稍后再试]. Before the overload pattern the run classifies the error as "unknown"; with it the recovery is keyed on "overloaded" and falls back to the configured model. Covers openclaw#93211 at the orchestrator level alongside the matcher-level regression tests.
92efb24 to
db79e94
Compare
|
Merged via squash.
Thanks @0xghost42! |
…penclaw#93241) Merged via squash. Prepared head SHA: db79e94 Co-authored-by: 0xghost42 <[email protected]> Co-authored-by: steipete <[email protected]> Reviewed-by: @steipete
…26.6.10) (#1256) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/openclaw/openclaw](https://openclaw.ai) ([source](https://github.com/openclaw/openclaw)) | patch | `2026.6.9` → `2026.6.10` | --- ### Release Notes <details> <summary>openclaw/openclaw (ghcr.io/openclaw/openclaw)</summary> ### [`v2026.6.10`](https://github.com/openclaw/openclaw/blob/HEAD/CHANGELOG.md#2026610) [Compare Source](openclaw/openclaw@v2026.6.9...v2026.6.10) ##### Highlights - **Automatic fast mode for talks:** OpenClaw can enable fast mode for short conversational turns, then return to normal mode for longer runs with bounded fallback and delivery behavior. ([#​85104](openclaw/openclaw#85104)) Thanks [@​alexph-dev](https://github.com/alexph-dev) and [@​vincentkoc](https://github.com/vincentkoc). - **More reliable model routing:** Zai model synthesis, GLM overload failover, and native reasoning-level selection now follow the active model catalog more consistently. ([#​94461](openclaw/openclaw#94461), [#​93241](openclaw/openclaw#93241), [#​94067](openclaw/openclaw#94067), [#​94136](openclaw/openclaw#94136)) Thanks [@​Pandah97](https://github.com/Pandah97), [@​chrysb](https://github.com/chrysb), [@​0xghost42](https://github.com/0xghost42), [@​zhengli0922](https://github.com/zhengli0922), [@​openperf](https://github.com/openperf), [@​civiltox](https://github.com/civiltox), and [@​BorClaw](https://github.com/BorClaw). - **Safer session and channel state:** channel switches reset stale origin fields, and cron delivery awareness stays attached to the target session. ([#​95328](openclaw/openclaw#95328), [#​93580](openclaw/openclaw#93580)) Thanks [@​ZengWen-DT](https://github.com/ZengWen-DT), [@​jalehman](https://github.com/jalehman), [@​gorkem2020](https://github.com/gorkem2020), and [@​scotthuang](https://github.com/scotthuang). - **Trusted policies survive hook composition:** composed hook registries keep the trusted tool policies required by approval-sensitive flows. ([#​94545](openclaw/openclaw#94545)) Thanks [@​jesse-merhi](https://github.com/jesse-merhi). ##### Changes - **Agent and channel runtime:** fast-mode state now survives retries, fallback transitions, progress events, and embedded/CLI/ACP normalization; session and channel routing retain the current target and delivery context. ([#​85104](openclaw/openclaw#85104), [#​93580](openclaw/openclaw#93580), [#​95328](openclaw/openclaw#95328)) Thanks [@​alexph-dev](https://github.com/alexph-dev), [@​vincentkoc](https://github.com/vincentkoc), [@​scotthuang](https://github.com/scotthuang), [@​ZengWen-DT](https://github.com/ZengWen-DT), [@​jalehman](https://github.com/jalehman), and [@​gorkem2020](https://github.com/gorkem2020). - **Provider behavior:** model catalogs now supply the correct Zai base URL, overload classification, and native reasoning controls for live-discovered models. ([#​94461](openclaw/openclaw#94461), [#​93241](openclaw/openclaw#93241), [#​94067](openclaw/openclaw#94067), [#​94136](openclaw/openclaw#94136)) Thanks [@​Pandah97](https://github.com/Pandah97), [@​chrysb](https://github.com/chrysb), [@​0xghost42](https://github.com/0xghost42), [@​zhengli0922](https://github.com/zhengli0922), [@​openperf](https://github.com/openperf), [@​civiltox](https://github.com/civiltox), and [@​BorClaw](https://github.com/BorClaw). ##### Fixes - **Fast-mode and policy correctness:** fallback cutoffs and reset notices are bounded, repeated progress events remain visible, Codex service-tier state is normalized, and trusted policies are not lost when hook registries are composed. ([#​85104](openclaw/openclaw#85104), [#​94545](openclaw/openclaw#94545)) Thanks [@​alexph-dev](https://github.com/alexph-dev), [@​vincentkoc](https://github.com/vincentkoc), and [@​jesse-merhi](https://github.com/jesse-merhi). - **Model and delivery edge cases:** Zai and GLM failover paths use the right runtime metadata, while stale channel-origin state no longer leaks across session changes. ([#​94461](openclaw/openclaw#94461), [#​93241](openclaw/openclaw#93241), [#​95328](openclaw/openclaw#95328)) Thanks [@​Pandah97](https://github.com/Pandah97), [@​chrysb](https://github.com/chrysb), [@​0xghost42](https://github.com/0xghost42), [@​zhengli0922](https://github.com/zhengli0922), [@​ZengWen-DT](https://github.com/ZengWen-DT), [@​jalehman](https://github.com/jalehman), and [@​gorkem2020](https://github.com/gorkem2020). - **Provider plugin onboarding:** setup refreshes provider plugin registry metadata after installing setup-selected provider plugins, so auth continuation uses the newly installed provider instead of stale registry state. ([#​95792](openclaw/openclaw#95792)) Thanks [@​snowzlmbot](https://github.com/snowzlmbot). ##### Complete contribution record This audited record covers the complete v2026.6.9..HEAD history: 12 merged PRs. The generation manifest also supplies direct commits as editorial input; the grouped notes above prioritize user impact. ##### Pull requests - **PR [#​86627](openclaw/openclaw#86627 Keep core doctor health in contribution order. Thanks [@​giodl73-repo](https://github.com/giodl73-repo). - **PR [#​93580](openclaw/openclaw#93580 fix: preserve cron delivery awareness for target sessions. Thanks [@​scotthuang](https://github.com/scotthuang) and [@​jalehman](https://github.com/jalehman). - **PR [#​95030](openclaw/openclaw#95030 refactor: add SDK transcript identity target API. Thanks [@​jalehman](https://github.com/jalehman). - **PR [#​94838](openclaw/openclaw#94838 refactor(copilot): complete harness lifecycle parity. Thanks [@​vincentkoc](https://github.com/vincentkoc). - **PR [#​95328](openclaw/openclaw#95328 fix(sessions): reset stale per-channel origin fields on channel switch. Related [#​95325](openclaw/openclaw#95325). Thanks [@​ZengWen-DT](https://github.com/ZengWen-DT) and [@​jalehman](https://github.com/jalehman) and [@​gorkem2020](https://github.com/gorkem2020). - **PR [#​94461](openclaw/openclaw#94461 fix(zai): fall back to manifest baseUrl for synthesized GLM-5 models. Related [#​94269](openclaw/openclaw#94269). Thanks [@​Pandah97](https://github.com/Pandah97) and [@​chrysb](https://github.com/chrysb). - **PR [#​93241](openclaw/openclaw#93241 fix(agents): classify Zhipu GLM overload as overloaded for failover. Related [#​93211](openclaw/openclaw#93211). Thanks [@​0xghost42](https://github.com/0xghost42) and [@​zhengli0922](https://github.com/zhengli0922). - **PR [#​94067](openclaw/openclaw#94067 fix(channels): resolve native /think menu levels via runtime catalog for live-discovered models. Related [#​93835](openclaw/openclaw#93835). Thanks [@​openperf](https://github.com/openperf) and [@​civiltox](https://github.com/civiltox). - **PR [#​94136](openclaw/openclaw#94136 fix(zai): expose GLM-5.2 reasoning levels \[AI-assisted]. Thanks [@​BorClaw](https://github.com/BorClaw). - **PR [#​85104](openclaw/openclaw#85104 feat: fast talks auto mode. Related [#​85087](openclaw/openclaw#85087). Thanks [@​alexph-dev](https://github.com/alexph-dev). - **PR [#​94545](openclaw/openclaw#94545 fix: keep trusted policies with hook registry. Thanks [@​jesse-merhi](https://github.com/jesse-merhi). - **PR [#​95792](openclaw/openclaw#95792 fix(onboard): refresh provider plugin registry after setup installs. Related [#​95765](openclaw/openclaw#95765). Thanks [@​snowzlmbot](https://github.com/snowzlmbot). </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/1256
Summary
Model fallback (
agents.defaults.model.fallbacks) did not recover correctly when Zhipu (GLM) returned its overload error. Zhipu signals overload as HTTP 200 with the error in the body:The Anthropic-compatible client surfaces that body as a thrown error, which
runWithModelFallbacknormalizes viacoerceToFailoverError→isOverloadedErrorMessage. There was no pattern for this phrase, so the overload was not recognized as a failover reason.This adds the distinctive overload phrase
访问量过大("traffic too high") toERROR_PATTERNS.overloaded, next to the existing Chinese overload markers (服务过载,当前负载过高). The error now classifies asoverloaded— the failover reason the issue asks for — so the configured fallback is reached with the correct, overload-specific recovery semantics.Closes #93211
Verification
Real behavior proof
[1305][该模型当前访问量过大,请您稍后再试]was not recognized asoverloaded, so failover did not key on the provider-overload contract.runWithModelFallbackorchestrator (the function the issue names as mishandling the error) in this checkout, before and after the patch, injecting the exact reported error at the throw point the Anthropic-compatible client surfaces it. No live Zhipu endpoint was available (no API key), so the[1305]body is reproduced at that runtime boundary rather than over the wire.overloadedinsiderunWithModelFallbackand the configured fallback model is attempted. For full honesty about currentmain: an unrecognized error already falls back generically with reasonunknownwhen candidates remain, so the symptom from the 2026.6.5 report (no fallback at all) is partly masked onmain; this patch supplies the correct classification (overloaded), which is what the issue requests and what carries the proper provider-overload retry/cooldown handling rather than the genericunknownpath.https://open.bigmodel.cn/api/anthropic) — no credentials. The orchestrator classification + fallback decision is the failover decision point, exercised above.Coverage:
failover-matches.test.ts→ 25 passed (GLM body pinned asoverloaded, not rate-limit/auth);model-fallback.test.ts→ 80 passed (new orchestrator case asserts the GLM overload reaches the configured fallback keyed onoverloaded).