ECA hangs indefinitely on 503 LLM Overload errors during tool generation

Offen
#274 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
38/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
clojure
Bereich
backend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Clojure
Sterne
1k
Forks
82
Ø Merge
1 T. 21 Std.
Gemergte PRs (30 T.)
25

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus editor-code-assistant/eca

Alle Issues in editor-code-assistant/eca

Ähnliche Issues

Weitere Issues zu Clojure

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.