arbs-io/vscode-openai

Error when setting API Key. Seems like it just hangs when trying to configure provider.

Closed this issue · 4 comments

It worked before, and then suddenly stopped working. Tried resetting the config, etc. I get an error when setting the API key. It seems like it just hangs when trying to configure the provider. Also, it shows 'Enter the openai.com API Key' even though I have chosen Azure OpenAI. Tested directly with curl, and this works fine.

image

I have the same issue using the openai.azure.com variant. It used to be working fine.

The log output shows it tries to connect to api.openai.com instead of the azure instance URL while this is chosen in settings and using the setup the correct URL is provided.

To reproduce:

  • Click the vscode-openai button in the bottom bar to setup.

  • Click openai.azure.com:
    image

  • Enter instance URL and press enter
    image

  • Enter instance Key, I noticed it says openai.com instead of azure
    image

  • After entering the process hangs, this is shown in the logs. after hitting Esc the incorrect API key shows up:

2024-01-19 13:44:16.398 [error] Error: 500 status code (no body)
2024-01-19 13:44:16.399 [error] TypeError: Cannot read properties of undefined (reading 'status')
2024-01-19 13:47:21.072 [error] Error: 401 Incorrect API key provided: ********************. You can find your API key at https://platform.openai.com/account/api-keys.
2024-01-19 13:47:21.075 [info] setting_configuration - event properties
{
"vscode_version": "1.85.1",
"vscode_ui_kind": "desktop",
"vscode_language": "en",
"extension_version": "1.5.7",
"service_provider": "OpenAI",
"host": "api.openai.com",
"base_url": "https://api.openai.com/v1",
"inference_model": "setup-required",
"inference_deploy": "setup-required",
"embeddings_model": "setup-required",
"embeddings_deploy": "setup-required",
"az_api_version": "2023-05-15"
}
2024-01-19 13:47:56.133 [error] Error: 500 status code (no body)
2024-01-19 13:47:56.134 [error] TypeError: Cannot read properties of undefined (reading 'status')

hi @JorievSantvoort
sorry for the delayed response. i've changed country recently and that's taken up most of my time.
Are you still having issues? could you run the "reset..." and re-try the setup. I can replicate the issue your having with any of the services.

@arbs-io A couple days after posting this issue the problem seems to have resolved itself, I'm not sure if there was a update on this extension or some other inconsistency with vscode or update that fixed it. I don't seems to have the problem anymore, unfortunately I don't know what fixed it.

Ok, thanks. There were some bug fixes in the previous release. Will close the issue. But let me know if there are any other issues