bug: Streams that are not SSE (Bedrock, Ollama NDJSON) reach the client only when they end
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- backend, networking
Direzione di ricerca
Start in core/listener/forwardproxy/server.go around lines 972 and 1015, then read the existing fix for #1879. Reproduce with a Go test that sends five flushed event-stream lines at 400 ms intervals, with and without a body-reading plugin. Done means supported non-SSE streams reach the client incrementally and are not buffered until completion.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The proxy streams a response only when its type is text/event-stream. It buffers all other streaming responses until they are complete. These streams arrive at the client only at the end:
- Bedrock
invoke-with-response-stream(application/vnd.amazon.eventstream) - Ollama
/api/chat(application/x-ndjson) - Gemini
streamGenerateContentwithoutalt=sse
These streams also get a 502 when they are larger than 10 MB (see #1879).
Reproduction (main at 676557d35)
A Go test that builds forwardproxy.NewServer with one ReadsBody plugin. The upstream sends Content-Type: application/vnd.amazon.eventstream and writes one line every 400 ms, five times, with a flush after each line.
Result: the client gets the first line after 2.007 s, which is when the upstream ends the stream. Without the proxy, the first line arrives at about 0 s.
Cause
core/listener/forwardproxy/server.go:972: httpx.IsEventStream is the only test for a stream. All other responses go to the buffered branch at server.go:1015 when any plugin reads bodies. inference-parser always reads bodies.
Fix
Use the same fix as #1879: buffer only parsed traffic. Also send ContentLength == -1 responses through flushWriter when no plugin must read them.
Impact if not fixed
Claude Code on Bedrock through Cortex shows no streamed output. Local Ollama and Gemini clients that use these formats have the same problem.
- Lingua principale
- Go
- Stelle
- 26
- Fork
- 46
- Merge medio
- 9h 55m
- PR unite (30g)
- 257
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rossoctl/cortex
-
bug laptop
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
bug laptop
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
feat: Do not count a removed session's cost again when an import brings it backForse già presa @huang195 l’ha presa oggi. Apertaenhancement
rossoctl/cortex#1885 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
bug: The JWT bypass matches a cleaned path but forwards the raw path, so /mcp/../healthz skips validationForse già presa @evaline-ju l’ha presa oggi. Apertabug
rossoctl/cortex#1884 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
bug: One-hour Anthropic cache writes are priced at the 5-minute rate, so spend is 37.5% too lowApertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rossoctl/cortex
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Containerpak/cpak#93 ·
-
bug triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
router-for-me/CLIProxyAPI#7607 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement ui/ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
myNameArnav/lex#52 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100