generateStream: no empty-response guard, no fallback, and a raw provider error yielded as content
Los mantenedores suelen responder en 4 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
Comienza en packages/outpost/ai/src/generator.ts:196-208 y compara generateStream con el comportamiento de generate corregido por #223. Sigue cómo pipeline.generateStreamingResponse consume los valores producidos y usa la receta de aimock de #223 para cubrir un stream vacío y la ruta de catch. Se considera terminado cuando las respuestas vacías reciben el comportamiento de fallback previsto y los errores del proveedor no se emiten como contenido ordinario.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Split out of #231, which carries this as a bullet rather than a tracked item. #223's review said "tracking with #228" — that reference is wrong: #228 is the QA chat SSE cross-chunk buffer bug in apps/web/src/hooks/use-qa-chat.ts, a different subject. So this has had no issue of its own.
generate() was fixed by #223 (merged as 825d0981): it now reads every text block and throws 'Model response contained no usable text' on none, caught by the never-crash fallback. generateStream has the same two defects, both unfixed.
1. No empty-response guard, and no fallback at all
packages/outpost/ai/src/generator.ts:196-206 yields only content_block_delta/text_delta events. A completion with no text yields nothing — the consumer sees a successful empty stream. There is no degraded signal on this path and no apology fallback, so it is strictly worse than the pre-#223 non-streaming behaviour, which at least returned an empty string a caller could test.
2. The catch yields a raw provider error as ordinary content
:207-208:
} catch (error) {
yield `\n\n_Error generating response: ${error instanceof Error ? error.message : String(error)}_`;
}
That is provider error text placed into the response body. pipeline.generateStreamingResponse buffers what it yields, so a 500 becomes publishable content. Trap rather than live bug — no production caller reaches it today, which is also why it has stayed unnoticed. Overlaps #146 (the streaming path still reads the pre-#143 groundedness signal) and should probably be fixed in the same pass.
Why it hasn't bitten yet
generateStream's only caller is pipeline.generateStreamingResponse, which nothing in the queue invokes. The moment streaming is wired to a real channel, both defects are live.
Test gaps
No coverage for an empty stream and none for the catch path. Both are straightforward with the aimock recipe #223 used — the empty case needs a mocked stream that yields no text delta.
- Lenguaje dominante
- TypeScript
- Estrellas
- 10
- Forks
- 4
- Merge medio
- 4 d 2 h
- PR fusionados (30 d)
- 7
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin 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 CopilotKit/outpost
-
area: docs area: security roadmap: now
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
CopilotKit/outpost#277 ·
Los mantenedores suelen responder en 4 días
-
area: infrastructure roadmap roadmap: later
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
CopilotKit/outpost#179 ·
Los mantenedores suelen responder en 4 días
-
area: ai roadmap roadmap: now
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CopilotKit/outpost#145 ·
Los mantenedores suelen responder en 4 días
-
area: integrations priority: low roadmap roadmap: later
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
CopilotKit/outpost#124 · 3 comentarios ·
Los mantenedores suelen responder en 4 días
-
area: integrations priority: low roadmap roadmap: later
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
CopilotKit/outpost#123 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
Todos los issues de CopilotKit/outpost
Issues similares
-
dx hacktoberfest help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
cloudflare/agents#2498 ·
Los mantenedores suelen responder en 1 día
-
Missing repro Platform: Android
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
software-mansion/react-native-reanimated#10816 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
e2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
redhat-developer/rhdh-plugin-export-overlays#4129 ·
Los mantenedores suelen responder en 1 día