bug: Streams that are not SSE (Bedrock, Ollama NDJSON) reach the client only when they end
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- backend, networking
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 26
- Forks
- 46
- Merge medio
- 9 h 55 min
- PR fusionados (30 d)
- 257
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rossoctl/cortex
-
bug laptop
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug laptop
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
feat: Do not count a removed session's cost again when an import brings it backPosiblemente ocupada @huang195 la tomó hoy. Abiertoenhancement
rossoctl/cortex#1885 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
bug: The JWT bypass matches a cleaned path but forwards the raw path, so /mcp/../healthz skips validationPosiblemente ocupada @evaline-ju la tomó hoy. Abiertobug
rossoctl/cortex#1884 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
bug: One-hour Anthropic cache writes are priced at the 5-minute rate, so spend is 37.5% too lowAbiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de rossoctl/cortex
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Containerpak/cpak#93 ·
-
bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
router-for-me/CLIProxyAPI#7607 ·
Los mantenedores suelen responder en 1 día
-
enhancement ui/ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
myNameArnav/lex#52 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100