continue
continue copied to clipboard
Autocompletion does not work with local config without authorization in continue.dev
Before submitting your bug report
- [x] I believe this is a bug. I'll try to join the Continue Discord for questions
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows
- Continue version: 1.1.48
- IDE version: 1.101.0
- Model: codestral-latest
- config.yaml:
name: xengee
version: 1.0.15
schema: v1
models:
- name: "[Mistral API] Codestral"
provider: mistral
model: codestral-latest
apiKey: ${{ secrets.CODESTRAL_API_KEY }} # in .env file
apiBase: https://codestral.mistral.ai/v1
roles:
- autocomplete
...
- .env:
secrets:
CODESTRAL_API_KEY: mykey
- Error Message: `Continue Autocomplete Error: HTTP 401 Unauthorized from https://api.continue.dev/model-proxy/v1/fim/completions {"message":"Unauthorized"}`
Description
When I want to use autocomplete code, the following error occurs: Continue Autocomplete Error: HTTP 401 Unauthorized from https://api.continue.dev/model-proxy/v1/fim/completions {"message": "Unauthorized"}
I believe the error is that Continue is accessing https://api.continue.dev/model-proxy/v1, even though I explicitly specified https://codestral.mistral.ai/v1
In config.yaml:
- name: "[Mistral API] Codestral"
provider: mistral
model: codestral-latest
apiKey: ${{ secrets.CODESTRAL_API_KEY }}
apiBase: https://codestral.mistral.ai/v1
roles:
- autocomplete
However: when I log in to my account in Continue.dev - the error goes away. When I log out of my account, I get this problem again.
UPD: if you specify apiKey directly instead of via .env file - everything works
To reproduce
- Configure the local config to use Codestral
- To try and start writing some code
Log output
## DevTools
[Extension Host] Error: HTTP 401 Unauthorized from https://api.continue.dev/model-proxy/v1/fim/completions
{"message":"Unauthorized"}
at customFetch2 (c:\Users\rge\.vscode\extensions\continue.continue-1.1.48-win32-x64\out\extension.js:135231:21)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at withExponentialBackoff (c:\Users\rge\.vscode\extensions\continue.continue-1.1.48-win32-x64\out\extension.js:130913:27)
at ContinueProxy._streamFim (c:\Users\rge\.vscode\extensions\continue.continue-1.1.48-win32-x64\out\extension.js:136084:22)
at ContinueProxy.streamFim (c:\Users\rge\.vscode\extensions\continue.continue-1.1.48-win32-x64\out\extension.js:135351:30)
at stopAfterMaxProcessingTime (c:\Users\rge\.vscode\extensions\continue.continue-1.1.48-win32-x64\out\extension.js:140984:20)
at ListenableGenerator._start (c:\Users\rge\.vscode\extensions\continue.continue-1.1.48-win32-x64\out\extension.js:140859:28)
console.ts:137 [Extension Host] Error generating autocompletion: Error: HTTP 401 Unauthorized from https://api.continue.dev/model-proxy/v1/fim/completions
{"message":"Unauthorized"}
at customFetch2 (c:\Users\rge\.vscode\extensions\continue.continue-1.1.48-win32-x64\out\extension.js:135231:21)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at withExponentialBackoff (c:\Users\rge\.vscode\extensions\continue.continue-1.1.48-win32-x64\out\extension.js:130913:27)
at ContinueProxy._streamFim (c:\Users\rge\.vscode\extensions\continue.continue-1.1.48-win32-x64\out\extension.js:136084:22)
at ContinueProxy.streamFim (c:\Users\rge\.vscode\extensions\continue.continue-1.1.48-win32-x64\out\extension.js:135351:30)
at stopAfterMaxProcessingTime (c:\Users\rge\.vscode\extensions\continue.continue-1.1.48-win32-x64\out\extension.js:140984:20)
at ListenableGenerator._start (c:\Users\rge\.vscode\extensions\continue.continue-1.1.48-win32-x64\out\extension.js:140859:28)
J1s @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
B @ event.ts:1219
fire @ event.ts:1250
fire @ ipc.net.ts:652
l.onmessage @ localProcessExtensionHost.ts:382
notificationsAlerts.ts:42 Continue Autocomplete Error: HTTP 401 Unauthorized from https://api.continue.dev/model-proxy/v1/fim/completions {"message":"Unauthorized"}