copilot-cmp icon indicating copy to clipboard operation
copilot-cmp copied to clipboard

Excessive rate limit violations

Open tpope opened this issue 1 year ago • 3 comments

Copilot.lua is responsible for a disproportionately large number of rate limited completions requests, with the culprit appearing to be copilot-cmp. Users of this combo are at risk of having their accounts flagged for abuse. Recommendations:

  • Use getCompletions, not getCompletionsCycling. Cycling completions are a resource intensive operation that should only be requested by explicit user action. Spamming it as the user types will exceed the rate limit.
  • ~~Upgrade Copilot.lua to the latest language server. This will mitigate the damage by recognizing a rate limited server response and backing off for a bit.~~ ✅

tpope avatar Aug 29 '24 19:08 tpope

Is this still an issue? Any reason why #118 is not merged?

azdanov avatar Oct 17 '24 06:10 azdanov

Can confirm it's still an issue.

tpope avatar Oct 18 '24 01:10 tpope

@zbirenbaum Could you provide some assistance or feedback please?

I'd like to avoid breaching copilot terms: https://docs.github.com/en/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot

I've read on reddit that some users of other neovim extensions which used copilot got warning emails due to excessive use.

azdanov avatar Oct 18 '24 03:10 azdanov

Apologies for missing this, I was out of commission for a bit. Lets definitely get this addressed.

Thank you for the heads up @tpope and the patch ~~@azdanov~~ @tris203

I merged #118 please let me know if that wasn't enough to fix it and will address asap.

In the past I tried using getCompletions instead of getCompletionsCycling and ran into some strange behaviors with cmp due to latency I believe, so there may be some followup required for functionality, but keeping users in compliance takes priority for sure.

zbirenbaum avatar Dec 11 '24 20:12 zbirenbaum

Thank you for your time! And thanks to @tris203 for the patch, I only posted in this thread :slightly_smiling_face:

azdanov avatar Dec 11 '24 20:12 azdanov

Thank you for your time! And thanks to @tris203 for the patch, I only posted in this thread :slightly_smiling_face:

Thanks @tris203!! Appreciate the contribution

zbirenbaum avatar Dec 11 '24 20:12 zbirenbaum

That should do the trick.

tpope avatar Dec 12 '24 04:12 tpope