[BUG] Gemini Stream Error: Incomplete JSON segment at the end

Offen
#2,682 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 3 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
22/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
api, backend

Rechercherichtung

The payload names only the error text 'Incomplete JSON segment at the end' from the Gemini context stream path. Start by searching the repository for that message and for the Gemini stream handling around it, then reproduce with a long multi-step task. The payload gives no reproduction that reliably triggers the error and no expected behaviour beyond 'normal result', so a contributor would first need to define what a fix must guarantee.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug
Problem (one or two sentences)

A Gemini context stream request sometimes fails and Zoo Code shows this error: Gemini generate context stream error: Incomplete JSON segment at the end.

Context (who is affected and when)

I use the Gemini provider with a direct Google API key and the gemini-flash-lite-latest model. The error occurs at random, but it occurs more often during long tasks. Also common in gemini-flash-latest and gemini-4-hydrogen. Don't know about the other Gemini models.

Reproduction steps
  1. Zoo Code 3.98.2 in VSCodium 1.143.17232 on Windows 10 LTSC.
  2. Do a request that will result in it needing to do some work.
  3. Many errors before working, at random.
Expected result

Normal result

Actual result

Incomplete JSON segment at the end

Variations tried (optional)

No response

App Version

3.98.2

API Provider (optional)

Google Gemini

Model Used (optional)

gemini-flash-lite-latest

Zoo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Vorherrschende Sprache
TypeScript
Sterne
2k
Forks
301
Ø Merge
3 T. 14 Std.
Gemergte PRs (30 T.)
103

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Zoo-Code-Org/Zoo-Code

Alle Issues in Zoo-Code-Org/Zoo-Code

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.