gencay / vscode-chatgpt

An unofficial Visual Studio Code - OpenAI ChatGPT integration
ISC License
3.48k stars 761 forks source link

Update on 429 errors #192

Closed viking1304 closed 1 year ago

viking1304 commented 1 year ago

@gencay The free API trial is time-limited, and API will also return a 429 error if that trial expires, even if the user didn't spend the given credit.

Since my account was created more than 6 months ago, my API trial has expired (which is clearly written), but I didn't notice that info on my Account Usage page, blinded by the fact that I spent $0 of $18 credits.

People should carefully read what is written on their Account Usage page and API FAQ

I guess it would be good to add the info about expired API in the section about 429 errors of to https://github.com/gencay/vscode-chatgpt#troubleshooting page

I assume the Browser Auto-login method works because, in that case, it uses chat credit and not API credit, which is not the same. Also, people with a chatGTP Plus subscription should use the Browser Auto-login method since that subscription does not cover API usage.

gencay commented 1 year ago

@viking1304 thank you! That's correct ChatGPT on browser vs. ChatGPT via API Key is different and it's the beauty of this extension to have the flexibility to work in between depending on your use case. Can you share the error that extension printed on your vs-code about the expiration of your account? I never saw that but if you could give me the error message(JSON) I could update the readme to set the error expectation right. Thanks again for using the extension and engaging with the community here appreciated!

viking1304 commented 1 year ago

The main issue with expired trial API is that user gets a regular insufficient_quota error! 🤦🤦🤦

{

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

If the user doesn't carefully read what is written on their Account Usage page, they might think it is a problem with your extension (which works flawlessly so far for me).

I was focused on keys and their expiration dates:

Screenshot 2023-03-06 at 14 05 40

and I was blinded by the $0.00 / $18.00 credits spent that I didn't notice the expiration date below. 🤦

Screenshot 2023-03-06 at 14 02 25
gencay commented 1 year ago

Thanks @viking1304 it looks like the OpenAI throws a somewhat wrong exception. I understand the confusion, it's not very apparent whether your $18.00 credit expired. I will update the Readme accordingly.

viking1304 commented 1 year ago

It should be clear since it says that the pale red means expired, and the expiration date is clearly visible, but people who have never visited that page before might be confused (as I was) since they will be most focused on balance, especially if their usage is as low as mine. Thanks for your efforts!

gencay commented 1 year ago

The Readme along with the errors are more detailed now. Closing the issue.

poleguy commented 10 months ago

I still have the same confusion. The problem is that I come in thinking that I'm on the free tier, so I'm not thinking that having a balance of $0 should be a problem, since it is supposed to be free, right? Nowhere does it say that the API always costs money, even in the "free" tier, but that seems to be the case.

Why do they call it free?

I'm still not sure how to fix this problem. Is it asking me to pay something? How much?

Here is how it works in the real world, not in the contorted mind of "API web interface UX designer" :-) https://www.youtube.com/watch?v=p3dtrKoo89I

tl;dr add 5 bucks to the account and it'll work fine.