Github Copilot - Too Many Requests with Claude #311

Closed
opened 2026-02-16 17:26:09 -05:00 by yindo · 14 comments
Owner

Originally created by @JonBoyleCoding on GitHub (Jun 26, 2025).

Originally assigned to: @thdxr on GitHub.

After using for a number of things this evening with github copilot, I get the following error:

AI_RetryError: Failed after 3 attempts. Last error: Too Many Requests

This is with using Claude Sonnet 4 through copilot. When switching to another model, it seems to work fine. I presume I've just been using it too heavily? If so - maybe there might be a better error message that could suggest to try a different model?

Originally created by @JonBoyleCoding on GitHub (Jun 26, 2025). Originally assigned to: @thdxr on GitHub. After using for a number of things this evening with github copilot, I get the following error: ``` AI_RetryError: Failed after 3 attempts. Last error: Too Many Requests ``` This is with using Claude Sonnet 4 through copilot. When switching to another model, it seems to work fine. I presume I've just been using it too heavily? If so - maybe there might be a better error message that could suggest to try a different model?
yindo closed this issue 2026-02-16 17:26:09 -05:00
Author
Owner

@JonBoyleCoding commented on GitHub (Jun 26, 2025):

Interestingly it's more than that. gpt-4o works, but not much else.

@JonBoyleCoding commented on GitHub (Jun 26, 2025): Interestingly it's more than that. gpt-4o works, but not much else.
Author
Owner

@JonBoyleCoding commented on GitHub (Jun 26, 2025):

I can confirm I reached a limit of some kind, on PRs I get the following message:

You're out of premium requests 
You have reached your monthly limit for premium requests for Copilot code review.

I guess I'll just have to wait then! I'll try experimenting with local models in the mean time.

@JonBoyleCoding commented on GitHub (Jun 26, 2025): I can confirm I reached a limit of some kind, on PRs I get the following message: ``` You're out of premium requests You have reached your monthly limit for premium requests for Copilot code review. ``` I guess I'll just have to wait then! I'll try experimenting with local models in the mean time.
Author
Owner

@nielsjaspers commented on GitHub (Jun 26, 2025):

The Claude models and other available models, except for GPT-4.1 and GPT-4o, fall under the category of ‘Premium Models’ on GitHub Copilot.

GitHub Copilot has specific limitations in place for using these models: Copilot Usage per Plan.

Each 'Premium Model' has a different multiplier
e.g.

  • Claude Sonnet 4 has a multiplier of 1, meaning that one prompt == to one premium request.
  • Gemini 2.0 Flash has a multiplier of 0.25, meaning that four prompts == to one premium request.

GPT-4o and GPT-4.1 are the base models and are considered ‘unlimited’ in terms of usage. However, there are rate limits in place for high usage and during periods of high demand.

@nielsjaspers commented on GitHub (Jun 26, 2025): The Claude models and other available models, except for GPT-4.1 and GPT-4o, fall under the category of ‘Premium Models’ on GitHub Copilot. GitHub Copilot has specific limitations in place for using these models: [Copilot Usage per Plan](https://docs.github.com/en/copilot/get-started/plans-for-github-copilot#comparing-copilot-plans). Each 'Premium Model' has a different [multiplier](https://docs.github.com/en/copilot/concepts/copilot-billing/understanding-and-managing-requests-in-copilot#model-multipliers) e.g. - Claude Sonnet 4 has a multiplier of 1, meaning that one prompt == to one premium request. - Gemini 2.0 Flash has a multiplier of 0.25, meaning that four prompts == to one premium request. GPT-4o and GPT-4.1 are the base models and are considered ‘unlimited’ in terms of usage. However, there are rate limits in place for high usage and during periods of high demand.
Author
Owner

@joshgermon commented on GitHub (Jun 26, 2025):

I hit my limit on copilot and got this too. GPT 4.1 seems incredibly dumb, worse than OpenAI's agent with it, anyone else experienced the same? Is it a prompt issue?

@joshgermon commented on GitHub (Jun 26, 2025): I hit my limit on copilot and got this too. GPT 4.1 seems incredibly dumb, worse than OpenAI's agent with it, anyone else experienced the same? Is it a prompt issue?
Author
Owner

@JonBoyleCoding commented on GitHub (Jun 26, 2025):

I hit my limit on copilot and got this too. GPT 4.1 seems incredibly dumb, worse than OpenAI's agent with it, anyone else experienced the same? Is it a prompt issue?

Both the GPT models seemed pretty poor to me. They kept doing only one thing at a time and then asked if I wanted it to do the next thing. When it actually did something it was rather poor and did things wrong. Claude seemed amazing. Never got a chance to test Gemini.

@JonBoyleCoding commented on GitHub (Jun 26, 2025): > I hit my limit on copilot and got this too. GPT 4.1 seems incredibly dumb, worse than OpenAI's agent with it, anyone else experienced the same? Is it a prompt issue? Both the GPT models seemed pretty poor to me. They kept doing only one thing at a time and then asked if I wanted it to do the next thing. When it actually did something it was rather poor and did things wrong. Claude seemed amazing. Never got a chance to test Gemini.
Author
Owner

@danriedl commented on GitHub (Jun 27, 2025):

I did also hit the wall after using the Claude 3.7 with AI_RetryError: Failed after 3 attempts. Last error: Too Many Requests. Switching to GPT-4o works.
Is it a opencode issue or just a cost/usage topic as @nielsjaspers stated?

@danriedl commented on GitHub (Jun 27, 2025): I did also hit the wall after using the Claude 3.7 with `AI_RetryError: Failed after 3 attempts. Last error: Too Many Requests`. Switching to `GPT-4o` works. Is it a opencode issue or just a cost/usage topic as @nielsjaspers stated?
Author
Owner

@douglascamata commented on GitHub (Jun 27, 2025):

To check if you used your limit of premium request on Github Copilot, just open VSCode with it configured, then click on the Copilot icon in the bottom right corner:

Image
@douglascamata commented on GitHub (Jun 27, 2025): To check if you used your limit of premium request on Github Copilot, just open VSCode with it configured, then click on the Copilot icon in the bottom right corner: <img width="350" alt="Image" src="https://github.com/user-attachments/assets/09e833e8-d714-4262-af6c-87a779b2c0a0" />
Author
Owner

@nielsjaspers commented on GitHub (Jun 27, 2025):

I did also hit the wall after using the Claude 3.7 with AI_RetryError: Failed after 3 attempts. Last error: Too Many Requests. Switching to GPT-4o works.
Is it a opencode issue or just a cost/usage topic as @nielsjaspers stated?

This is also because GitHub Copilot limits premium models very hard. Has nothing to do with OpenCode

@nielsjaspers commented on GitHub (Jun 27, 2025): > I did also hit the wall after using the Claude 3.7 with `AI_RetryError: Failed after 3 attempts. Last error: Too Many Requests`. Switching to `GPT-4o` works. > Is it a opencode issue or just a cost/usage topic as [@nielsjaspers](https://github.com/nielsjaspers) stated? This is also because GitHub Copilot limits premium models very hard. Has nothing to do with OpenCode
Author
Owner

@JonBoyleCoding commented on GitHub (Jun 27, 2025):

I suppose then the feature request here is that rather than just reporting too many requests, to somehow determine when the limits have been reached and present when the allowance resets.

@JonBoyleCoding commented on GitHub (Jun 27, 2025): I suppose then the feature request here is that rather than just reporting too many requests, to somehow determine when the limits have been reached and present when the allowance resets.
Author
Owner

@mozbz commented on GitHub (Jun 30, 2025):

Codecompanion nvim recently fixed this by setting X-Initiator header to be agent for every request other than the initial prompt. Then each agent call is not counted as premium request. Opencode should also add this.

@mozbz commented on GitHub (Jun 30, 2025): Codecompanion nvim recently fixed this by setting X-Initiator header to be agent for every request other than the initial prompt. Then each agent call is not counted as premium request. Opencode should also add this.
Author
Owner

@wykwit commented on GitHub (Jul 1, 2025):

Some great ideas above, but I think it would also be great if we could preview remaining quota (or usage) for premium interactions just like with other Copilot extensions. Maybe display it in the bottom bar next to cost whenever a premium model is selected? The endpoint others use for this is: https://api.github.com/copilot_internal/user (requires passing Bearer token in Authorization header).

@wykwit commented on GitHub (Jul 1, 2025): Some great ideas above, but I think it would also be great if we could preview remaining quota (or usage) for premium interactions just like with other Copilot extensions. Maybe display it in the bottom bar next to cost whenever a premium model is selected? The endpoint others use for this is: https://api.github.com/copilot_internal/user (requires passing Bearer token in Authorization header).
Author
Owner

@mhuggins7278 commented on GitHub (Jul 1, 2025):

I also notice today that asking the same question/task in opencode uses significantly more of my quota than doing the same thing in VSCode directly. I'm sure there are a whole bunch of optimizations they are doing in VSCode but given the billing/usage is request based now it would be great if there some things opencode could do minimize the # of requests.

@mhuggins7278 commented on GitHub (Jul 1, 2025): I also notice today that asking the same question/task in opencode uses significantly more of my quota than doing the same thing in VSCode directly. I'm sure there are a whole bunch of optimizations they are doing in VSCode but given the billing/usage is request based now it would be great if there some things opencode could do minimize the # of requests.
Author
Owner

@graemefolk commented on GitHub (Jul 2, 2025):

I tried the fix in the latest version, it is much better, but it looks like it's still possibly double counting. I have 300 requests per month, and my first request put me up to 0.7% used, and my second request put me up to 1.3% used. This would mean that my quota is essentially 150, but is it possible that it's sending an extra request somewhere?

@graemefolk commented on GitHub (Jul 2, 2025): I tried the fix in the latest version, it is much better, but it looks like it's still possibly double counting. I have 300 requests per month, and my first request put me up to 0.7% used, and my second request put me up to 1.3% used. This would mean that my quota is essentially 150, but is it possible that it's sending an extra request somewhere?
Author
Owner

@thdxr commented on GitHub (Jul 2, 2025):

we send one request to generate the title for the session - we need to tweak this to use a cheaper model but haven't structured that yet

@thdxr commented on GitHub (Jul 2, 2025): we send one request to generate the title for the session - we need to tweak this to use a cheaper model but haven't structured that yet
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#311