AionUi icon indicating copy to clipboard operation
AionUi copied to clipboard

[Feature]: Handle rate limit

Open StreetYo opened this issue 3 months ago • 3 comments

Feature Description

Add automatic tracking of the request limit so that the program itself sends a resend request after the time specified in the response.

Problem Statement

It often happens that the flow is interrupted by an error about exceeding the limit on the number of requests. Because of this, you have to manually send a "continue" message to continue working.

Proposed Solution

Process the response from the server about the error. It would also be useful to have a "resend message" button.

Feature Category

UI/UX Improvement

Additional Context

Response

[API Error: [{ "error": { "code": 429, "message": "You have exhausted your capacity on this model. Your quota will reset after 2s.", "errors": [ { "message": "You have exhausted your capacity on this model. Your quota will reset after 2s.", "domain": "global", "reason": "rateLimitExceeded" } ], "status": "RESOURCE_EXHAUSTED", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "RATE_LIMIT_EXCEEDED", "domain": "cloudcode-pa.googleapis.com", "metadata": { "uiMessage": "true", "model": "gemini-2.5-pro", "quotaResetDelay": "2.276662261s", "quotaResetTimeStamp": "2025-11-22T09:03:54Z" } }, { "@type": "type.googleapis.com/google.rpc.RetryInfo", "retryDelay": "2.276662261s" } ] } } ]] Possible quota limitations in place or slow response times detected. Switching to the gemini-2.5-flash model for the rest of this session.

Image

StreetYo avatar Nov 22 '25 09:11 StreetYo

🤖 Hi @StreetYo, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

aionui[bot] avatar Nov 22 '25 09:11 aionui[bot]

🤖 I'm sorry @StreetYo, but I was unable to process your request. Please see the logs for more details.

aionui[bot] avatar Nov 22 '25 09:11 aionui[bot]

Feature Description

Add automatic tracking of the request limit so that the program itself sends a resend request after the time specified in the response.

Problem Statement

It often happens that the flow is interrupted by an error about exceeding the limit on the number of requests. Because of this, you have to manually send a "continue" message to continue working.

Proposed Solution

Process the response from the server about the error. It would also be useful to have a "resend message" button.

Feature Category

UI/UX Improvement

Additional Context

Response

[API Error: [{ "error": { "code": 429, "message": "You have exhausted your capacity on this model. Your quota will reset after 2s.", "errors": [ { "message": "You have exhausted your capacity on this model. Your quota will reset after 2s.", "domain": "global", "reason": "rateLimitExceeded" } ], "status": "RESOURCE_EXHAUSTED", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "RATE_LIMIT_EXCEEDED", "domain": "cloudcode-pa.googleapis.com", "metadata": { "uiMessage": "true", "model": "gemini-2.5-pro", "quotaResetDelay": "2.276662261s", "quotaResetTimeStamp": "2025-11-22T09:03:54Z" } }, { "@type": "type.googleapis.com/google.rpc.RetryInfo", "retryDelay": "2.276662261s" } ] } } ]] Possible quota limitations in place or slow response times detected. Switching to the gemini-2.5-flash model for the rest of this session.

Image

@StreetYo Thank you for your feedback. Your suggestion is very good. After our team discusses it, we will add this feature and notify you as soon as the version is released! If possible, you can also implement this feature and submit a PR to us to become one of our developers. We look forward to your joining!

kuishou68 avatar Nov 23 '25 06:11 kuishou68