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

Aperta
#2,682 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
api, backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)

Lingua principale
TypeScript
Stelle
2k
Fork
301
Merge medio
3g 14h
PR unite (30g)
103

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Zoo-Code-Org/Zoo-Code

Tutte le issue di Zoo-Code-Org/Zoo-Code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.