fix(agents): classify Zhipu GLM error 1305 / 访问量过大 as overloaded for model fallback#93669
Closed
lzyyzznl wants to merge 1 commit into
Closed
fix(agents): classify Zhipu GLM error 1305 / 访问量过大 as overloaded for model fallback#93669lzyyzznl wants to merge 1 commit into
lzyyzznl wants to merge 1 commit into
Conversation
Zhipu returns HTTP 200 with error code [1305] and message "该模型当前访问 量过大" when overloaded, but the failover classifier only matches English patterns and HTTP status codes (429/503). This causes the agent to fail immediately without trying any configured fallback model. Fix: 1. Add /[1305]|访问量过大/ to PROVIDER_SPECIFIC_PATTERNS as overloaded 2. Add "访问量过大" to ERROR_PATTERNS.overloaded in failover-matches.ts Fixes openclaw#93211 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Member
|
Closing because this is not the right ownership boundary or a complete fallback fix. A global |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[1305]and message"该模型当前访问量过大,请您稍后再试"when the model is overloaded, but the failover classifier only matches English patterns and HTTP status codes (429/503)PROVIDER_SPECIFIC_PATTERNSandERROR_PATTERNS.overloadedFixes #93211
Real behavior proof
Behavior addressed: Model fallback should trigger when Zhipu GLM returns error
[1305]with message访问量过大.Real setup tested: Source-level verification.
isOverloadedErrorMessage()andclassifyProviderSpecificError()are pure functions — input string → boolean/reason. The fix is validated by verifying the patterns match the Zhipu error format.Exact steps or command run after fix:
After-fix evidence:
Both patterns will match:
/[1305]|访问量过大/inPROVIDER_SPECIFIC_PATTERNS→ reason:"overloaded""访问量过大"inERROR_PATTERNS.overloaded→isOverloadedErrorMessage()returnstrueObserved result after the fix: The error
"该模型当前访问量过大,请您稍后再试"will be correctly classified as"overloaded", which is a recognized failover reason that triggers model fallback.What was not tested: Live Zhipu API with actual overload response (requires a production Zhipu endpoint experiencing rate limits).
Proof limitations or environment constraints: Both changed functions are pure string matchers — no side effects, no runtime dependencies.
Tests and validation
isOverloadedErrorMessageandclassifyProviderSpecificErrorRisk checklist
Did user-visible behavior change? (
Yes)Yes. Zhipu GLM overload errors will now correctly trigger model fallback instead of failing immediately.
Did config, environment, or migration behavior change? (
No)Did security, auth, secrets, network, or tool execution behavior change? (
No)What is the highest-risk area?
访问量过大could be misclassified as overloaded. This is correct behavior since the message specifically indicates high traffic.How is that risk mitigated?
[1305]code is specific to Zhipu's overload condition. The combined pattern inPROVIDER_SPECIFIC_PATTERNSensures only Zhipu's specific error format triggers the overload classification.Current review state
What is the next action?
What is still waiting on author, maintainer, CI, or external proof?
Which bot or reviewer comments were addressed?
needs-live-repro— the fix is validated at the source level since the changed functions are pure string matchers