Repository navigation
Commit 813e5f2
committed
fix(agents): scope 1305 diagnostic to z.ai provider without changing failover
- REMOVE classifyFailoverReason hook from z.ai plugin — overriding to
"overloaded" changes cooldown from model-scoped (rate_limit) to
profile-wide, which is incorrect for this fix
- ADD optional provider param to formatRateLimitOrOverloadedErrorCopy
- PASS provider from errors.ts:1542 (primary API error path) via opts?.provider
- SCOPE ZAI_CODE_1305_RE check to z.ai provider when context is available;
fall back to unfiltered check when provider is unknown (backward compat
for call sites without provider context)
- Keep code 1305 classified as rate_limit by generic classifier (model-scoped
cooldown preserved)
Addresses ClawSweeper review: scope copy without changing failover.1 parent dbc1d3a commit 813e5f2
3 files changed
Lines changed: 10 additions & 14 deletions
File tree
- extensions/zai
- src/agents/embedded-agent-helpers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | 348 | | |
360 | 349 | | |
361 | 350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1539 | 1539 | | |
1540 | 1540 | | |
1541 | 1541 | | |
1542 | | - | |
| 1542 | + | |
1543 | 1543 | | |
1544 | 1544 | | |
1545 | 1545 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
| |||
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
152 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
153 | 160 | | |
154 | 161 | | |
155 | 162 | | |
| |||
0 commit comments