Chat hangs on "Waiting model" when LLM stream stalls - STOP cannot interrupt blocked I/O
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start by reading chat.clj, llm_api.clj, and the streaming provider files to trace how STOP is handled and where each provider reads the response stream. The issue proposes storing the stream for cancellation; verify how that fits the existing callbacks and error handling. Done means STOP cancels a stalled stream, returns chat to idle, and allows a new message.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
This ticket has been created by ECA. There is currently no known way how to reproduce this bug. It just randomly appears (with no error) so I asked Claude to find out what is going on ;-)
Describe the bug
When an LLM provider's streaming response stalls (server keeps connection open but stops sending data), the chat gets
stuck on "Waiting model" indefinitely. Clicking STOP does not recover the chat. Attempting to shut down ECA also
fails with "Timeout while waiting for response. Method: shutdown".
Root cause: .readLine() on the response InputStream blocks forever. STOP sets a :stopping flag, but this flag is only
checked in callbacks that fire after .readLine() returns. Since it never returns, the flag is never checked.
Thread.interrupt() does not work on blocking java.io streams.
Affects all streaming providers (openai_chat, anthropic, ollama, openai).
To Reproduce (not sure if possible)
Steps to reproduce the behavior:
- Start a chat with any streaming LLM provider
- Send a message
- Have the LLM server stall mid-stream (keep connection open, stop sending data)
- Observe chat stuck on "Waiting model"
- Click STOP - chat remains stuck
- Try to stop ECA - get "Timeout while waiting for response. Method: shutdown"
Expected behavior
- Clicking STOP should immediately cancel the request and return chat to idle state, allowing new messages to be sent.
- There should be some timeout (180s?) on streaming response
Additional context
Proposed fix: Store the response InputStream when streaming starts, close it when STOP is pressed. Closing the stream
causes .readLine() to throw IOException, which is already handled via on-error.
Implementation:
- Add cancel-stream* atom to callbacks, store in chat state
- Each provider stores body (InputStream) in the atom before reading
- prompt-stop closes the stream via the atom
~10 lines across chat.clj, llm_api.clj, and each provider file.
- Lenguaje dominante
- Clojure
- Estrellas
- 1k
- Forks
- 82
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 16
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 editor-code-assistant/eca
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
editor-code-assistant/eca#661 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
editor-code-assistant/eca#657 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
editor-code-assistant/eca#652 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
editor-code-assistant/eca#648 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
editor-code-assistant/eca#644 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de editor-code-assistant/eca
Issues similares
-
needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
module:cql
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
.Needs Triage Priority:P3 Type:Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
metabase/metabase#84843 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
NoahTheDuke/splint#57 · 1 comentario ·
-
category:runtime
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
jank-lang/jank#1110 · 2 comentarios ·
Los mantenedores suelen responder en 1 día