ECA hangs indefinitely on 503 LLM Overload errors during tool generation

未关闭
#274 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
clojure
领域
backend

调研方向

Start by tracing the LLM streaming and tool-generation error handling from the logged OpenAI response error through the server’s completion state. Reproduce with a Gemini model that returns a 503 and inspect how the generation state is finalized after the stream aborts. Done means the error is surfaced to the user and the UI leaves “Generating...” so they can retry or change models.

由索引模型根据 Issue 内容生成。

描述

When the LLM provider returns a 503 Service Unavailable (Overloaded) error during the tool-calling/generation phase, the ECA server does not gracefully handle the failure. Instead of reporting a connection error or retrying, the UI displays Generating... and hangs indefinitely at the @cursor marker.

Environment

  • Process: /home/saulo/.emacs.d/eca/eca server --verbose --log-level debug
  • Workspace: ~/.emacs.d/
  • Mode: Agent

Steps to Reproduce
Set up a Gemini free model (free tier leads to the same more often). E.g., google/gemini-2.5-flash
Initiate a chat with the agent to perform a file edit (e.g., echo "hi" at @/home/saulo/.emacs.d/init.sh).

The LLM begins the response, but the provider returns a 503 error mid-stream.

Observe the chat buffer stuck at:

echo "hi" at @/home/saulo/.emacs.d/init.sh

I will add `echo "hi"` to the `init.sh` file.

Generating...
@cursor(init.org 1:1) @
stop

Attempting to run eca-chat-tool-call-accept-all results in no action.

Logs
The server logs show an unhandled 503 status code from the OpenAI endpoint:

[OPENAI-CHAT] 4952 Unexpected response status: %s body: %s 503 [{
  "error": {
    "code": 503,
    "message": "The model is overloaded. Please try again later.",
    "status": "UNAVAILABLE"
  }
}]
[OPENAI-CHAT] [4952] response-error {:message "LLM response status: 503 body: [...]"}

Expected Behavior
The ECA server should catch the 503 error, notify the user that the model is overloaded, and terminate the "Generating" state so the user can retry or change models.

Actual Behavior
The process hangs. The stop marker is reached in the buffer, but the internal state machine appears to be waiting for a completion that has been aborted by the server. No logs are produced after the 503 error when trying to interact with the tool calls.

主要语言
Clojure
星标
1k
派生
82
平均合并
1 天 21 小时
30 天内合并 PR
25

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

editor-code-assistant/eca 的其他 Issue

查看 editor-code-assistant/eca 的全部 Issue

相似的 Issue

更多 Clojure Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。