FeatureFuel
29

Wait/retry when agent hits rate limits (don't just error)

Source: zed-industries/zed#31531 · opened by @notpeter
Summary

When a user encounters a recoverable rate-limit error when bringing their own API Key (Anthropic/OpenAI) instead of erroring, wait. Use hints in the response headers.

Description

For example, the current error message for OpenAI is:
> Failed to connect to OpenAI API: Rate limit reached for gpt4.1 in organization org-<myorg> on tokens per min (TPM): Limit 30000, Used 25292, Requested 10584. Please try again in 11.75s. Visit to learn more

Anthropic header is retry-after (seconds: 59)
OpenAI is x-ratelimit-reset-requests / x-ratelimit-reset-tokens (1m30s)

Docs:
• [OpenAI Rate Limits](
• [Anthropic Rate Limits](


I have not been able to find reference to response headers in the [Google Gemini Rate Limit docs]( or for Copilot Chat which specify rate limits.

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests