Skip to content

Poor error message when API rate limit is exceeded #257

@ospreyboi

Description

@ospreyboi

When a user exceeds their free API quota, mesa-llm
raises a 200 line LiteLLM exception with hundreds of lines
of JSON that is unreadable.

Steps to reproduce:

  1. Set up Gemini free API key
  2. Run the negotiation example
  3. Exceed the quota

Expected output : Clear message telling user what happened and how to fix it
Actual output : 200+ lines of unreadable (for user) JSON error

I have a fix ready — a try/except block in module_llm.py
that catches RateLimitError and raises a clean readable message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions