ECA hangs indefinitely on 503 LLM Overload errors during tool generation

Ouverte
#274 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 2 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
38/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
clojure
Domaine
backend

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Clojure
Étoiles
1k
Forks
82
Merge moyen
1 j 21 h
PR mergées (30 j)
25

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de editor-code-assistant/eca

Toutes les issues de editor-code-assistant/eca

Issues similaires

Plus d'issues Clojure

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.