continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
18.88k stars 1.6k forks source link

model gpt-4-turbo-2024-04-09 not working in continue #1180

Closed namen3645 closed 4 months ago

namen3645 commented 6 months ago

Before submitting your bug report

Relevant environment info

- OS: Windows 10 Pro 22H2
- Continue: 
- IDE: vscode

Description

Error: HTTP 403 Forbidden from https://api.openai.com/v1/chat/completions { "error": { "message": "Project proj_4JtGMmfzA does not have access to model gpt-4-turbo-2024-04-09", "type": "invalid_request_error", "param": null, "code": "model_not_found" } }

Снимок

{ "models": [ { "model": "gpt-4-turbo-2024-04-09", "title": "GPT-4", "apiKey": "sk-proj-...3Wd0E", "completionOptions": {}, "provider": "openai" } ], "modelRoles": { "default": "GPT-4", "chat": "GPT-4", "edit": "GPT-4", "summarize": "GPT-4" }, "systemMessage": "", "completionOptions": { "temperature": 0.5 }, "allowAnonymousTelemetry": false, "contextProviders": [ { "name": "code", "params": {} }, { "name": "docs", "params": {} } ] }

To reproduce

  1. Go to continue config and replace gpt-4 to:

gpt-4-turbo gpt-4-turbo-2024-04-09 gpt-4-turbo-preview gpt-4-0125-preview gpt-4-1106-preview

or any other non-standard gpt-3 model

Log output

No response

sestinj commented 6 months ago

@namen3645 Do you have paid credits on your account? OpenAI recently switched to a model that requires pre-paying, and this may be a cause. Another might be that they simply haven't equally distributed access to the newer models.

Unless you are able to make the following curl request successfully with your API key, this seems likely to be an issue with OpenAI

curl https://api.openai.com/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ "model": "gpt-4-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Hello!" } ] }'

sestinj commented 5 months ago

Hi @namen3645, have you had a chance to look into this? Would love to know whether this ended up being the solution. I'll probably close the issue soon if I don't hear back

xtfer commented 2 months ago

I'm getting this issue, and call in https://github.com/continuedev/continue/issues/1180#issuecomment-2076302401 works for me. Turbo works but 4o does not.