agentscope-ai / agentscope-ai/agentscope
[Bug]: WebUI message stalls indefinitely (spinner never stops) when LLM backend crashes/freezes
- Langage dominant
- Python
- Étoiles
- 31.5k
- Forks
- 3.5k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 95
Description
### Prerequisites
- [x] I have searched the existing [issues](https://github.com/agentscope-ai/agentscope/issues) and [discussions](https://github.com/agentscope-ai/agentscope/discussions), and this is not a duplicate.
- [x] This is a bug, not a usage question. (For questions, please use [Discussions](https://github.com/agentscope-ai/agentscope/discussions/new?category=general) instead.)
### Background / Description
When sending a message in the WebUI, if the underlying LLM model/service crashes, hangs, or becomes unresponsive (e.g., OOM, process killed, network partition), the frontend UI enters an unrecoverable state. The loading spinner continues to animate indefinitely—sometimes for hours—and the "Stop" button becomes non-functional. The user is forced to manually refresh the browser to recover the session.
Expected behavior: When the LLM backend fails, the WebUI should detect the connection drop or timeout, stop the spinner, and display an error message (e.g., "Model response failed" or "Connection lost"). The "Stop" button should either work to cancel the pending request or be replaced by a "Retry/Refresh" option.
### Error Messages
```shell
Backend logs typically show the LLM crash (e.g., CUDA out of memory, grpc timeout, connection reset by peer). However, the browser console shows no explicit error; the WebSocket/SSE connection often remains technically "open" on the client side even though the backend stopped streaming. No ReplyEndEventor error event is received by the frontend to trigger the UI reset.
```
### Steps to Reproduce
1. Start the AgentScope service and open the WebUI.
2. Configure a chat session with an LLM model (e.g., a local vLLM instance or a remote endpoint).
3. Simulate a model crash or freeze
4. Observe the WebUI:
The message bubble shows a loading spinner.
The spinner continues spinning indefinitely (tested up to 2+ hours).
### Environment
- AgentScope Version: 2.0.4
- Python Version: 3.12
- OS: windows 11
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.