Cody Autocomplete failing

Cody autocomplete has been failing for the past 10 days with this error.

█ CompletionLogger:onError: {“type”:“completion”,“endpoint”:“https://sourcegraph.com/.api/completions/code?client-name=vscode&client-version=1.18.2",“status”:“error”,“duration”:280,“err”:"error parsing CodeCompletionResponse: Error: {"error":"Expected to receive exactly one message with the prompt"}”}
█ getInlineCompletions:error: error parsing CodeCompletionResponse: Error: {“error”:“Expected to receive exactly one message with the prompt”} Error: error parsing CodeCompletionResponse: Error: {“error”:“Expected to receive exactly one message with the prompt”}
at /home/vi/.vscode-server/extensions/sourcegraph.cody-ai-1.18.2/dist/extension.node.js:196101:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async generatorWithTimeout (/home/vi/.vscode-server/extensions/sourcegraph.cody-ai-1.18.2/dist/extension.node.js:175528:31)
at async generatorWithErrorObserver (/home/vi/.vscode-server/extensions/sourcegraph.cody-ai-1.18.2/dist/extension.node.js:175505:21)
at async fetchAndProcessDynamicMultilineCompletions (/home/vi/.vscode-server/extensions/sourcegraph.cody-ai-1.18.2/dist/extension.node.js:194441:45)
at async Promise.all (index 0)
at async zipGenerators (/home/vi/.vscode-server/extensions/sourcegraph.cody-ai-1.18.2/dist/extension.node.js:175494:17)
at async generateCompletions (/home/vi/.vscode-server/extensions/sourcegraph.cody-ai-1.18.2/dist/extension.node.js:194830:26)

I’ve tried from different machines, new windows, uninstalled, reinstalled.

It also fails the same way whether I’m using vscode locally or remotely.

Please help me resolve this, because I’m not sure why I’m paying for Pro at this point.

Hey @ViWalkerDev

I was having a similar issue last week. Ended up being a misconfigured autocomplete setting.

Go to: @ext:sourcegraph.cody-ai autocomplete

Make sure the settings match below:

If that doesn’t work email support@sourcegraph.com so we can look at your account and make sure it doesn’t have any accidental limits set.

1 Like

I can confirm this solution worked for me. My provider was set to anthropic and after setting it to null, autocompletions started working again.

Thanks a bunch! Not sure why my provider was set to anthropic, but as soon as I corrected it things worked. :slight_smile:

1 Like

So that’s it? “anthropic” option is just not an option?

I would expect this actually works when set to “anthropic” and it did for some time. I guess there has been an API change on Anthropic’s end, and it hasn’t been a priority to fix it.