continuedev / continuedev/continue
0.9.244: "message":"Unauthorized" when using codestral autocomplete default configuration
@RomneyDa is already working on this.
Since Dec 14, 2024.
- Dominant language
- TypeScript
- Stars
- 36k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Before submitting your bug report
- I believe this is a bug. I'll try to join the Continue Discord for questions
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Linux
- Continue version: 0.9.244
- IDE version: VSCode 1.95.3
- Model: Claude Sonnet 3.5
- config.json:
{
"models": [
{
"model": "claude-3-5-sonnet-latest",
"provider": "anthropic",
"apiKey": "XXX",
"title": "Claude 3.5 Sonnet"
}
],
"tabAutocompleteModel": {
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest",
"apiKey": "XXX"
},
"contextProviders": [
{
"name": "code",
"params": {}
},
{
"name": "docs",
"params": {}
},
{
"name": "diff",
"params": {}
},
{
"name": "terminal",
"params": {}
},
{
"name": "problems",
"params": {}
},
{
"name": "folder",
"params": {}
},
{
"name": "codebase",
"params": {}
}
],
"slashCommands": [
{
"name": "share",
"description": "Export the current chat session to markdown"
},
{
"name": "cmd",
"description": "Generate a shell command"
},
{
"name": "commit",
"description": "Generate a git commit message"
}
]
}
Description
By using default config.json with a codestral API key (not the general one), I get an error popup: "message":"Unauthorized" on each completion attempt:
This can be fixed by adding: "apiBase": "https://codestral.mistral.ai/v1" to the tabAutocompleteModel
But according to documentation (https://docs.continue.dev/autocomplete/model-setup), I understand that i should set apiBase only when using the general API.
Here i understand that https://codestral.mistral.ai/v1 is the default value when using codestral:
https://github.com/continuedev/continue/blob/main/core/llm/llms/Mistral.ts#L23
But somehow, this does not seems to be taken into account.
I do not know if the code should be fixed to use it as default apiBase, or if the documentation should be modified to be more explicit about setting apiBase when using codestral
This make the default configuration not working out of the box.
This issue is not present in 0.9.241 and was introduced in 0.9.242.
(with 0.9.241, there is no need to set apiBase in tabAutocompleteModel)
To reproduce
- Install continue >= 0.9.242
- rm ~/.continue/config.json to force a default config
- set your codestral apiKey
- ask for completion by writing code
Log output
Extension Host] Error generating autocompletion: Error: {
"message":"Unauthorized",
"request_id":"f63aed38b328bb35e6895f0da2714b59"
}
at streamResponse (/home/bergamote/.vscode/extensions/continue.continue-0.9.244-linux-x64/out/extension.js:72163:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async streamSse (/home/bergamote/.vscode/extensions/continue.continue-0.9.244-linux-x64/out/extension.js:72208:20)
at async OpenAIApi.fimStream (/home/bergamote/.vscode/extensions/continue.continue-0.9.244-linux-x64/out/extension.js:96555:26)
at async _Mistral.streamFim (/home/bergamote/.vscode/extensions/continue.continue-0.9.244-linux-x64/out/extension.js:108340:28)
at async ListenableGenerator._start (/home/bergamote/.vscode/extensions/continue.continue-0.9.244-linux-x64/out/extension.js:113738:28)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.