Skip to content

llm-council: 429/ETIMEDOUT errors produce unhelpful messages — no actionable hint about cause #100

Description

@23r2efewvcs

Enhancement

When a model call fails with 429 (rate-limit) or ETIMEDOUT (connection timeout), the error message is generic:

[ERROR 429: {"error":{"message":"Provider returned error","code":429,...}}]

or for connection errors, the raw Node.js error propagates and kills the session.

Users have no idea:

  • Why it failed (another client using the same API key? free-tier concurrent limit?)
  • What to do (wait? switch provider? use --sequential? use a separate key?)

Current behavior

if (res.status >= 400) return { success: false, content: `[ERROR ${res.status}: ${res.body.slice(0, 300)}]`, model, latency_ms: elapsed };

Generic error. No context about what the status code means.

Proposed fix

After retries are exhausted, produce differentiated error messages:

  • 429: explain it's a rate-limit, suggest: wait 60s, use --sequential, switch provider, use separate API key
  • ETIMEDOUT/ECONNRESET: explain connection failed, suggest: increase --timeout, use --sequential, try different endpoint
  • 5xx: explain server error, suggest: retry later, check provider status

All messages are [ERROR ...] with a \nHint: section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions