zed icon indicating copy to clipboard operation
zed copied to clipboard

AI: '429 Too Many Requests rate limit exceeded' when using GitHub Copilot's models in Agent Panel

Open arggh opened this issue 6 months ago • 5 comments

Summary

After a short period of working using Zed Agent panel and GitHub Copilot's Claude Sonnet 3.7 or Sonnet 4, I get a 429 Too Many Requests error.

Description

Steps to trigger the problem:

  1. Enable GitHub Copilot and select Sonne 4 as the model to use
  2. Work like you normally would for 30 minutes - 2 hours
  3. Voilá

Actual Behavior:

Github's Copilot stops working in Zed Agent panel, throwing this:

Error interacting with language model
Failed to connect to API: 429 Too Many Requests rate limit exceeded

There was a similar issue related to Copilot's rate limits and "Vision" feature, but that was closed as fixed. This is not related to Vision.

Expected Behavior:

I'd expect the Zed editor to consider any rate limits in GitHub Copilot when doing it's magic, so that I could work for more than a few hours per day using AI and Zed.

Model Provider Details

  • Provider: Copilot Chat
  • Model Name: Sonnet 4
  • Mode: Agent Panel
  • MCP Servers in-use: -
  • Other Details: -

Zed Version and System Specs

Zed: v0.189.3 (Zed Preview) OS: macOS 15.2.0 Memory: 16 GiB Architecture: aarch64

arggh avatar Jun 01 '25 08:06 arggh

Duplicate of this: https://github.com/zed-industries/zed/issues/31531

imumesh18 avatar Jun 01 '25 08:06 imumesh18

Duplicate of this: #31531

The suspension with Zed + GitHub Copilot isn't "seconds" that can be just waited out. It's more in line with "try again tomorrow", in my experience.

arggh avatar Jun 01 '25 09:06 arggh

For example, after ~2 hours of waiting, my access was restored, only to be blocked again after just one prompt, which resulted in 15 Read file... and Search files for regex... operations in Zed Agent panel.

arggh avatar Jun 01 '25 10:06 arggh

I disabled many of the tools for the default write profile to easily see what the agent is doing. While trying to accomplish a relatively easy and minimal request, it has now managed to read the same file over and over again multiple times, without making any meaningful progress. The output:

The user is letting me know that config.yaml has changed since I last read it. I should re-read the file to see what changes were made, as this might affect the logic I just implemented for handling the main sensor clearing.

...

I see the config.yaml has been updated. Let me check what changes were made and if they affect the main sensor clearing logic I just implemented.

...

Thanks for letting me know the config.yaml has changed! Let me re-read it to see the current state:

...

Thanks for letting me know the config.yaml has changed! Let me re-read it to see the current state:

...without me implying anything about config.yaml, it's repeatedly requesting permission to run cat config.yaml.

I haven't yet figured out if all of these actually create a request for the Copilot API, but if they do, I can understand why the rate limiter is being hit so easily when the agent has all the tools at it's disposal.

arggh avatar Jun 01 '25 13:06 arggh

Zed's agentic editing has become completely usable for me due to these errors occuring more and more often. I'm not even on a big codebase, it's ~6000 lines over 80 files. However, there is just no prompt I can give which will not instantly result in an obscure error code and if I'm unlucky, getting rate limited for an hour.

poly2it avatar Jun 01 '25 22:06 poly2it

Closing as duplicate of:

  • https://github.com/zed-industries/zed/issues/31531

FYI, I expect your experience will change in two days (Wednesday 2025-06-03) when GitHub rolls out enforcement of their new request limits / premium requests system:

  • https://github.blog/changelog/2025-05-07-enforcement-of-copilot-premium-request-limits-moved-to-june-4-2025

notpeter avatar Jun 02 '25 13:06 notpeter

Closing as duplicate of:

FYI, I expect your experience will change in two days (Wednesday 2025-06-03) when GitHub rolls out enforcement of their new request limits / premium requests system:

  • https://github.blog/changelog/2025-05-07-enforcement-of-copilot-premium-request-limits-moved-to-june-4-2025

I am getting similar rate limit of input tokens and request per minute errors on gemini even though gemini has a pretty big context and generous limit on free tier.

Surya-Git-hub avatar Jun 06 '25 07:06 Surya-Git-hub

Closing as duplicate of:

FYI, I expect your experience will change in two days (Wednesday 2025-06-03) when GitHub rolls out enforcement of their new request limits / premium requests system:

  • https://github.blog/changelog/2025-05-07-enforcement-of-copilot-premium-request-limits-moved-to-june-4-2025

FWIW, I don't think this is a duplicate. I'm running into the same issue on github + Gemini 2.5 right now. It's very frustrating and from the above thread it looks like some bug is causing request spam and burning through the request limits.

JPBarringer avatar Jun 18 '25 22:06 JPBarringer

Also see

  • https://github.com/zed-industries/zed/issues/32747
  • https://github.com/zed-industries/zed/issues/32405

I don't think any of these bug reports are directly related to the idea of waiting and retrying when an error is hit (it's a nice enhancement though).

The issue seems to be unexpectedly high API use on certain models (Sonnet 3.7 / 4) and/or providers (github)

I burned through some anthropic API credits pretty quickly yesterday and am now wondering if this is partly why. (Could just have been usage though.)

JPBarringer avatar Jun 18 '25 22:06 JPBarringer

FWIW, after testing yesterday side by side between the same model

  • Claude Sonnet 4 - Github Copilot
  • Claude Sonnet 4 - Zed

with similar context window and similar tasks given, I got rate limited on github very quickly (roughly about the time I would go through 1-2 Zed "prompt" usages, even when I haven't used copilot for 24h before).

Please excuse the crude measurement methodology; it might be all caused by GitHub, but it was nonetheless surprising to be rate limited so quickly.

klochowicz avatar Jun 19 '25 00:06 klochowicz

FWIW, after testing yesterday side by side between the same model

  • Claude Sonnet 4 - Github Copilot
  • Claude Sonnet 4 - Zed

with similar context window and similar tasks given, I got rate limited on github very quickly (roughly about the time I would go through 1-2 Zed "prompt" usages, even when I haven't used copilot for 24h before).

Please excuse the crude measurement methodology; it might be all caused by GitHub, but it was nonetheless surprising to be rate limited so quickly.

im finding very similar experiences also with claude sonnet 4, in 2-3 prompts i got rate limited and somehow all my premium requests are gone. kind of disappointing, also even though have used all my requests its still giving me the rate limit 429 error around 20 hours later. :((

undivisible avatar Jul 09 '25 04:07 undivisible

in 2-3 prompts i got rate limited and somehow all my premium requests are gone

I also had to switch to VS Code with Copilot. It's not really useful to spend the entire subscription for 2 prompts with Zed editor.

arggh avatar Jul 09 '25 07:07 arggh

This may be improved in Zed v0.195.x (today's preview) which includes:

  • https://github.com/zed-industries/zed/pull/33895

notpeter avatar Jul 10 '25 03:07 notpeter

This may be improved in Zed v0.195.x (today's preview) which includes:

* [copilot: Indicate whether a request is initiated by an agent to Copilot API #33895](https://github.com/zed-industries/zed/pull/33895)

I don't think so:

Image

junque1r4 avatar Jul 12 '25 16:07 junque1r4

Same here!

Image

alejodelosrios avatar Jul 16 '25 21:07 alejodelosrios

Go to https://github.com/settings/copilot/features and check the "Premium requests"

If it's maxed out you're restricted to the base model (GPT 4.1 I think?) until the 1st of next month

Image

dharmab avatar Jul 17 '25 18:07 dharmab

@dharmab Thank you for the information. However, in my case, I have a GitHub Copilot Business account. While the Exceed quota may apply to the personal account, why isn't my business plan being recognized?

alejodelosrios avatar Jul 17 '25 21:07 alejodelosrios

As a GitHub Copilot user, the error doesn't happen when using Claude models but it happens in the case of Gemini models.

mal1k-me avatar Jul 25 '25 17:07 mal1k-me

It happens to me as well with Copilot + Zed + Claude, and now sadly have to switch to VScode.

1moeses avatar Jul 28 '25 09:07 1moeses

Image

stil

k5602 avatar Aug 31 '25 13:08 k5602