Commit 57f8bfb
committed
delegate.js: classify transient vs permanent Gemini errors instead of always suggesting resume
callGenerateContentOnce/callGenerateContent already tag network-layer failures
with err.status (429/503 are the documented transient cases -- see client.js's
own model-cascade, which already only retries on 429). Everything else -- a
malformed request (400), auth/config problems (401/403, or no status at all
e.g. "GEMINI_API_KEY is not set"), or "Gemini returned no candidates" from a
safety/recitation block -- will reproduce identically on retry. The per-step
failure message previously treated all of these the same way and always told
the caller to resume, which is actively misleading for the non-transient
cases. Added isTransientGeminiError() and branched the message accordingly.1 parent 6038a34 commit 57f8bfb
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
37 | 49 | | |
38 | 50 | | |
39 | 51 | | |
| |||
0 commit comments