Skip to content

Github Copilot - Too Many Requests with Claude #430

Closed

Description

@JonBoyleCoding

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?

Activity

  1. JonBoyleCoding commented on Jun 26, 2025

    @JonBoyleCoding
    Author

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

  2. self-assigned this
    on Jun 26, 2025
  3. JonBoyleCoding commented on Jun 26, 2025

    @JonBoyleCoding
    Author

    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.

  4. nielsjaspers commented on Jun 26, 2025

    @nielsjaspers

    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.

  5. joshgermon commented on Jun 27, 2025

    @joshgermon

    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?

  6. JonBoyleCoding commented on Jun 27, 2025

    @JonBoyleCoding
    Author

    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.

  7. danriedl commented on Jun 27, 2025

    @danriedl

    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?

  8. douglascamata commented on Jun 27, 2025

    @douglascamata

    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
  9. nielsjaspers commented on Jun 27, 2025

    @nielsjaspers

    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

  10. JonBoyleCoding commented on Jun 27, 2025

    @JonBoyleCoding
    Author

    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.

  11. mozbz commented on Jun 30, 2025

    @mozbz

    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.

  12. wykwit commented on Jul 1, 2025

    @wykwit

    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).

  13. mhuggins7278 commented on Jul 1, 2025

    @mhuggins7278
    Contributor

    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.

  14. added a commit that references this issue on Jul 2, 2025
    0e99a07
  15. graemefolk commented on Jul 3, 2025

    @graemefolk

    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?

  16. thdxr commented on Jul 3, 2025

    @thdxr
    Member

    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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions