Skip to content

fix: add zhipuai rate limit error patterns for failover#60

Open
newtontech wants to merge 1483 commits intomainfrom
fix/issue-33785
Open

fix: add zhipuai rate limit error patterns for failover#60
newtontech wants to merge 1483 commits intomainfrom
fix/issue-33785

Conversation

@newtontech
Copy link
Copy Markdown
Owner

Summary

This PR adds error pattern recognition for zhipuai's "Weekly/Monthly Limit Exhausted" error (code 1310) to trigger proper failover to fallback models.

Changes

  • Added "limit exhausted" string pattern to ERROR_PATTERNS.rateLimit
  • Added /weekly\/monthly limit/i regex pattern to ERROR_PATTERNS.rateLimit

Testing

  • Pattern matching verified against the error message from the issue
  • Existing rate limit patterns remain functional
  • All existing tests pass

Fixes openclaw#33785

bmendonca3 and others added 30 commits March 2, 2026 19:37
* Feishu: cache failing probes

* Changelog: add Feishu probe failure backoff note

---------

Co-authored-by: bmendonca3 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
…penclaw#28623)

* feat(hooks): add trigger and channelId to plugin hook agent context

Adds `trigger` and `channelId` fields to `PluginHookAgentContext` so
plugins can determine what initiated the agent run and which channel
it originated from, without session-key parsing or Redis bridging.

trigger values: "user", "heartbeat", "cron", "memory"
channelId values: "telegram", "discord", "whatsapp", etc.

Both fields are threaded through run.ts and attempt.ts hookCtx so all
hook phases receive them (before_model_resolve, before_prompt_build,
before_agent_start, llm_input, llm_output, agent_end).

channelId falls back from messageChannel to messageProvider when the
former is not set. followup-runner passes originatingChannel so queued
followup runs also carry channel context.

* docs(changelog): note hook context parity fix for openclaw#28623

---------

Co-authored-by: Vincent Koc <[email protected]>
Add requestHeartbeatNow to PluginRuntime.system so extensions can
trigger an immediate heartbeat wake without importing internal modules.

This enables extensions to inject a system event and wake the agent
in one step — useful for inbound message handlers that use the
heartbeat model (e.g. agent-to-agent DMs via Nostr).

Changes:
- src/plugins/runtime/types.ts: add RequestHeartbeatNow type alias
  and requestHeartbeatNow to PluginRuntime.system
- src/plugins/runtime/index.ts: import and wire requestHeartbeatNow
  into createPluginRuntime()
openclaw#29479)

Merged via squash.

Prepared head SHA: 1416c58
Co-authored-by: akramcodez <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
thewilloftheshadow and others added 30 commits March 3, 2026 12:23
…aw#27613)

Merged via squash.

Prepared head SHA: 31ddd43
Co-authored-by: dorukardahan <[email protected]>
Co-authored-by: grp06 <[email protected]>
Reviewed-by: @grp06
…claw#32206)

Merged via squash.

Prepared head SHA: d7f0914
Co-authored-by: hydro13 <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf
…penclaw#32490)

Merged via squash.

Prepared head SHA: 233aa03
Co-authored-by: scoootscooob <[email protected]>
Co-authored-by: joshavant <[email protected]>
Reviewed-by: @joshavant
openclaw#32831)

Merged via squash.

Prepared head SHA: 2aa58f6
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd
Merged via squash.

Prepared head SHA: 5d6d4dd
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
…w#25970)

Merged via squash.

Prepared head SHA: 3012326
Co-authored-by: openperf <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf
…penclaw#30356)

Merged via squash.

Prepared head SHA: b14f9ad
Co-authored-by: 13otKmdr <[email protected]>
Co-authored-by: grp06 <[email protected]>
Reviewed-by: @grp06
Merged via squash.

Prepared head SHA: dd88886
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
Merged via squash.

Prepared head SHA: d1acf72
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
…l fallback (openclaw#33299)

Merged via squash.

Prepared head SHA: 0986691
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
Merged via squash.

Prepared head SHA: d40f8c4
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
Merged via squash.

Prepared head SHA: 6078cd9
Co-authored-by: clawdoo <[email protected]>
Co-authored-by: grp06 <[email protected]>
Reviewed-by: @grp06
…3262)

Merged via squash.

Prepared head SHA: 5fe8170
Co-authored-by: cu1ch3n <[email protected]>
Co-authored-by: grp06 <[email protected]>
Reviewed-by: @grp06
…nclaw#29713)

Merged via squash.

Prepared head SHA: db23298
Co-authored-by: liquidhorizon88-bot <[email protected]>
Co-authored-by: grp06 <[email protected]>
Reviewed-by: @grp06
…ers (openclaw#30186)

Merged via squash.

Prepared head SHA: 0dac892
Co-authored-by: habakan <[email protected]>
Co-authored-by: grp06 <[email protected]>
Reviewed-by: @grp06
…imports (openclaw#28620)

Merged via squash.

Prepared head SHA: 8bd7d6c
Co-authored-by: hmemcpy <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
…#33690)

Merged via squash.

Prepared head SHA: 38b3c23
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
…ver (openclaw#30903)

Merged via squash.

Prepared head SHA: d3d0a18
Co-authored-by: LiaoyuanNing <[email protected]>
Co-authored-by: joshavant <[email protected]>
Reviewed-by: @joshavant
…law#30894) (openclaw#32706)

Merged via squash.

Prepared head SHA: 1714ffe
Co-authored-by: xiwan <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
…tial semantics (openclaw#33733)

Merged via squash.

Prepared head SHA: c290c2a
Co-authored-by: joshavant <[email protected]>
Co-authored-by: joshavant <[email protected]>
Reviewed-by: @joshavant
Add patterns to recognize zhipuai's 'Weekly/Monthly Limit Exhausted' error
to trigger proper failover to fallback models.

Fixes openclaw#33785
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failover not triggered for zhipuai 1310 "Weekly/Monthly Limit Exhausted" error