ai-genie / chatgpt-vscode

Your best AI pair programmer in VS Code
https://marketplace.visualstudio.com/items?itemName=genieai.chatgpt-vscode
ISC License
1.12k stars 71 forks source link

ChatGPT Error 429: Too many requests #25

Open ScottBeeson opened 1 year ago

ScottBeeson commented 1 year ago

Verify it's not a duplicate bug report

Describe the Bug

I just installed the extension. I added an API key. I immediately get the following error. I am a ChatGPT plus subscriber. Is this indicating I can't do ANY API calls for free? Even for personal use in a tool like VSCode? Or am I missing something? Or is this a bug?

An error occured. ChatGPT error 429: { "error": { "message": "You exceeded your current quota, please check your plan and billing details.", "type": "insufficient_quota", "param": null, "code": null } }

Please tell us if you have customized any of the extension settings or whether you are using the defaults.

Initially when I got the error I was using the defaults. I have since made some changes trying to troubleshoot.

Additional context

No response

genieai-info commented 1 year ago

The HTTP Error 429 is about your account/request frequency. There could be multiple reasons but OpenAI tells you that you have insufficient_quota in their response. Check if you have enough credit, non-expired account. If your account is expired you will see this

You could also try making a Curl request to see if you have enough credits, following the troubleshooting guide here: https://github.com/gencay/vscode-chatgpt/issues/192

viking1304 commented 1 year ago

I really do not understand those downvotes. You got clear instructions on checking if your API access is expired.

It is clearly written in the FAQ that OpenAI API is not part of the ChatGPT Plus subscription

Is the ChatGPT API included in the ChatGPT Plus subscription?

No, the ChatGPT API and ChatGPT Plus subscription are billed separately. The API has its own pricing, which can be found at https://openai.com/pricing. The ChatGPT Plus subscription covers usage on chat.openai.com only and costs $20/month.
ScottBeeson commented 1 year ago

Are you attempting to imply that the answers to my questions are as follows?

Is this indicating I can't do ANY API calls for free? YES Even for personal use in a tool like VSCode? CORRECT Or am I missing something? NO Or is this a bug? NO

viking1304 commented 1 year ago

I am just stating the facts.

Is this indicating I can't do ANY API calls for free?

Chat GPT Plus subscription and OpenAI API are two separate products, which is obviously not clear to most Chat GPT Plus subscribers. To use Open AI API, you need to pay for it separately. You can open a new trial account with a different email and get some free API calls.

As you can see in this screenshot, I got $18 as a free trial credit, but I lost everything without even using it since my trial expired. I was very confused since I was unaware that API returns a 429 error, even when your trial API is expired.

Even for personal use in a tool like VSCode?

Unfortunately, that is correct.

Or am I missing something?

You were not aware that API is not part of your subscription, but it should be clear now.

Or is this a bug?

This is not a bug, and you will get the same results with any other software that uses OpenAI API. That's why you were instructed to try cURL to see if you will get the same error.

genieai-info commented 1 year ago

Hi @ScottBeeson - I was thinking of my earlier post as an answer to all of your questions. Sorry if that wasn't clear enough. The problem being about your account, I still believe, answers all of them. And I was asking you to verify your account/API Key and then we could build on top of that and thus I kept the issue open with a question label. If you were able to verify it's not related to your account, and you are indeed able to make a request with the same API Key, let us know and we could investigate further.

We try to be as verbose as possible in the extension about errors, so you know what you could do to troubleshoot and mitigate them when you face them.

We will add the Q&A for ChatGPT Plus subscription being different than OpenAI's API pricing in the Readme. Also please let us know if you have any ideas how to improve our documentation apart from that.

veb commented 1 year ago

For those of you who added an API key before you subscribed to OpenAI, it will return the 429 error as well. It wasn't until I made another API key after subscribing to OpenAI - I admit I was confused at first as I am a chatgpt subscriber too, so I was very confused.

Came to this thread and realised I'd done everything right in the end - but why was I still getting the error? Then I thought, hmm maybe it does need a new API key (I made one about an hour ago, but I wasn't subscribed then).

Hope this helps anyone else.

genieai-info commented 1 year ago

Updated our readme with more questions from this thread. for future reference please confirm that your account is active and usable with OpenAI APIs

ghost commented 1 year ago

Since 2-3 days I have a similar issue. I can only use ChatGPT on my phone, which again uses the same public IP addresses as my Desktop PC, as they are using both the same router. On my Desktop I always get back 429 error on my phone it's working like a charm. No idea what the problem is, I already tried using a different internet connection, a different Desktop/Laptop computer etc. etc. The only device I can use ChatGPT with is my Android phone ... What's going on here? Screenshot 2023-04-30 170710

ghost commented 1 year ago

I even created a new ChatGPT account and still have the same issue going on

m0ezk commented 1 year ago

Since 2-3 days I have a similar issue. I can only use ChatGPT on my phone, which again uses the same public IP addresses as my Desktop PC, as they are using both the same router. On my Desktop I always get back 429 error on my phone it's working like a charm. No idea what the problem is, I already tried using a different internet connection, a different Desktop/Laptop computer etc. etc. The only device I can use ChatGPT with is my Android phone ... What's going on here? Screenshot 2023-04-30 170710

had the same issue, now i've disabled ipv6 and it's working

ghost commented 1 year ago

@m0ezk Did you disable it on router side or did you simply disable the ipv6 functionality at your system's interface settings?

raflisb commented 1 year ago

same here, i got this issue on MY PC, but on my android phone its working fine, i also do all @venomone do , and nothing works too

ghost commented 1 year ago

Even If I fully switch Off ipv6 I have no luck :(

raflisb commented 1 year ago

i assume our MAC address get BLOCKED ?

m0ezk commented 1 year ago

@m0ezk Did you disable it on router side or did you simply disable the ipv6 functionality at your system's interface settings?

I disabled ipv6 in grub parameters, so yeah, system wide

m0ezk commented 1 year ago

Even If I fully switch Off ipv6 I have no luck :(

What OS and browser are you using and did u try all standard browsers already?

ghost commented 1 year ago

Now Things loose even more logic. I tried it using Linux, Windows 11 and OSX all with the same outcome, I even tried a different Internet Connection, also a VPN, still same result. This makes no sense at all.

Whats funny, I tried my Windows 11 VPS using RDP I can now again use ChatGPT... What the hell.

From my understanding, this must have Something to do with cloudflare.