sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.11k stars 1.29k forks source link

Cody Autocomplete Doesn't work #62751

Open DataDavD opened 5 months ago

DataDavD commented 5 months ago

Installation information

GoLand 2024.1.1 Build #GO-241.15989.157, built on April 29, 2024 Licensed to David Dansby Subscription is active until April 1, 2025. Runtime version: 17.0.10+1-b1207.14 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 14.4.1 GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 10 Metal Rendering is ON Registry: debugger.watches.in.variables=false ide.completion.variant.limit=500 suggest.all.run.configurations.from.context=TRUE ide.experimental.ui=true terminal.new.ui=true Non-Bundled Plugins: cn.haojiyou.CodeGlance3 (2.1.1-2021.1.3) AWSCloudFormation (241.14494.150) com.markskelton.one-dark-theme (5.10.0) net.sjrx.intellij.plugins.systemdunitfiles (223.240127.136) com.intellij.javafx (1.0.4) com.github.zzehring.intellijjsonnet (0.2.1) com.wakatime.intellij.plugin (14.3.13) com.jetbrains.space (241.15989.9) com.intellij.kubernetes (241.15989.102) com.atlassian.bitbucket.references (2023.1.282) com.sourcegraph.jetbrains (5.5.10) com.crunch42.openapi (1.83) izhangzhihao.rainbow.brackets (2024.2.3-241) ru.adelf.idea.dotenv (2024.1) net.ashald.envfile (3.4.2) zielu.gittoolbox (500.2.7+233)

(optional) Error message or idea.log output

Request: {"error":"model \"fireworks/accounts/sourcegraph/models/codecompletion-m-mixtral-rb-rs-m-go-400k-25e\" is not allowed, allowed: [fireworks/starcoder, fireworks/accounts/sourcegraph/models/starcoder2-15b, fireworks/accounts/sourcegraph/models/starcoder2-7b, fireworks/accounts/fireworks/models/llama-v2-13b-code, fireworks/accounts/sourcegraph/models/codecompletion-mixtral-rust-152k-005e]"} Error: Request to https://cody-gateway.sourcegraph.com/v1/completions/fireworks failed with 400 Bad Request: {"error":"model \"fireworks/accounts/sourcegraph/models/codecompletion-m-mixtral-rb-rs-m-go-400k-25e\" is not allowed, allowed: [fireworks/starcoder, fireworks/accounts/sourcegraph/models/starcoder2-15b, fireworks/accounts/sourcegraph/models/starcoder2-7b, fireworks/accounts/fireworks/models/llama-v2-13b-code, fireworks/accounts/sourcegraph/models/codecompletion-mixtral-rust-152k-005e]"}

at /Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:183144:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async generatorWithTimeout (/Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:124082:31)
at async fetchAndProcessDynamicMultilineCompletions (/Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:181047:45)
at async Promise.all (index 0)
at async zipGenerators (/Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:124048:17)
at async generateCompletions (/Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:181524:30)

2024-05-16 23:29:58,257 [ 249189] WARN - #com.sourcegraph.cody.agent.CodyAgent - autocomplete failed NetworkError: Request to https://cody-gateway.sourcegraph.com/v1/completions/fireworks failed with 400 Bad Request: {"error":"model \"fireworks/accounts/sourcegraph/models/codecompletion-m-mixtral-rb-rs-m-go-400k-25e\" is not allowed, allowed: [fireworks/starcoder, fireworks/accounts/sourcegraph/models/starcoder2-15b, fireworks/accounts/sourcegraph/models/starcoder2-7b, fireworks/accounts/fireworks/models/llama-v2-13b-code, fireworks/accounts/sourcegraph/models/codecompletion-mixtral-rust-152k-005e]"} 2024-05-16 23:29:58,257 [ 249189] WARN - #com.sourcegraph.cody.agent.CodyAgentClient - Cody by Sourcegraph: █ getInlineCompletions:error: Request to https://cody-gateway.sourcegraph.com/v1/completions/fireworks failed with 400 Bad Request: {"error":"model \"fireworks/accounts/sourcegraph/models/codecompletion-m-mixtral-rb-rs-m-go-400k-25e\" is not allowed, allowed: [fireworks/starcoder, fireworks/accounts/sourcegraph/models/starcoder2-15b, fireworks/accounts/sourcegraph/models/starcoder2-7b, fireworks/accounts/fireworks/models/llama-v2-13b-code, fireworks/accounts/sourcegraph/models/codecompletion-mixtral-rust-152k-005e]"} Error: Request to https://cody-gateway.sourcegraph.com/v1/completions/fireworks failed with 400 Bad Request: {"error":"model \"fireworks/accounts/sourcegraph/models/codecompletion-m-mixtral-rb-rs-m-go-400k-25e\" is not allowed, allowed: [fireworks/starcoder, fireworks/accounts/sourcegraph/models/starcoder2-15b, fireworks/accounts/sourcegraph/models/starcoder2-7b, fireworks/accounts/fireworks/models/llama-v2-13b-code, fireworks/accounts/sourcegraph/models/codecompletion-mixtral-rust-152k-005e]"}

at /Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:183144:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async generatorWithTimeout (/Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:124082:31)
at async fetchAndProcessDynamicMultilineCompletions (/Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:181047:45)
at async Promise.all (index 0)
at async zipGenerators (/Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:124048:17)
at async generateCompletions (/Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:181524:30)

2024-05-16 23:29:58,258 [ 249190] WARN - #com.sourcegraph.cody.agent.CodyAgent - 2024-05-16 23:29:58,258 [ 249190] WARN - #com.sourcegraph.cody.agent.CodyAgent - at /Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:183144:17 2024-05-16 23:29:58,258 [ 249190] WARN - #com.sourcegraph.cody.agent.CodyAgent - at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2024-05-16 23:29:58,258 [ 249190] WARN - #com.sourcegraph.cody.agent.CodyAgent - at async generatorWithTimeout (/Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:124082:31) 2024-05-16 23:29:58,258 [ 249190] WARN - #com.sourcegraph.cody.agent.CodyAgent - at async fetchAndProcessDynamicMultilineCompletions (/Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:181047:45) 2024-05-16 23:29:58,258 [ 249190] WARN - #com.sourcegraph.cody.agent.CodyAgent - at async Promise.all (index 0) 2024-05-16 23:29:58,258 [ 249190] WARN - #com.sourcegraph.cody.agent.CodyAgent - at async zipGenerators (/Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:124048:17) 2024-05-16 23:29:58,258 [ 249190] WARN - #com.sourcegraph.cody.agent.CodyAgent - at async generateCompletions (/Users/daviddansby/Library/Application Support/JetBrains/GoLand2024.1/plugins/Sourcegraph/agent/index.js:181524:30) { 2024-05-16 23:29:58,258 [ 249190] WARN - #com.sourcegraph.cody.agent.CodyAgent - status: 400, 2024-05-16 23:29:58,258 [ 249190] WARN - #com.sourcegraph.cody.agent.CodyAgent - traceId: '4e603f8be80c1787728513a9b51bb25f' 2024-05-16 23:29:58,258 [ 249190] WARN - #com.sourcegraph.cody.agent.CodyAgent - } 2024-05-16 23:29:59,622 [ 250554] INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.SdkEntity to files 2024-05-16 23:29:59,622 [ 250554] INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.LibraryEntity to files 2024-05-16 23:30:20,091 [ 271023] WARN - #com.sourcegraph.cody.agent.CodyAgentClient - Cody by Sourcegraph: █ SimpleChatPanelProvider: postContextStatusToWebView [{"displayName":"weaviate","providers":[{"kind":"search","type":"local","state":"ready"}]}]

Steps to reproduce

  1. Try to autocomplete -> no op
  2. Restart Cody Agent
  3. Try to autocomplete again -> no op
  4. See logs

Expected behavior

Expect that autocomplete works. I also noticed that show diff doesn't work that I made another ticket for (here)

For reference, I had no issue with autocomplete yesterday.

jafin commented 5 months ago

Same issue as OP, but in Rider for windows. Autocomplete has stopped working. Tried both stable and nightly as at 2024-05-20

enriquegh commented 5 months ago

Related to https://github.com/sourcegraph/cody/issues/3973

DataDavD commented 5 months ago

Yea I noticed that issue prior to making this issue. Tried various methods besides "signing in/out" which is not analogous on JetBrains, so I'm not sure what you mean by log in/out tbh (maybe I missed something though?). This is what I tried daily to get it to fix itself, but it never worked: disable/renable Cody plugin, restart agent, turn on/off computer, change JetBrains IDE versions (GoLand and PyCharm), update computer. None of those actions worked. I've tried all those past couple days every day. Oddly enough I did none of that today and only re-enabled the plugin to try again today (was using Copilot in meantime) and it finally works.

For reference the one account related option for Cody I see in JetBrains is "manage account" button but all that does is take you to your Sourcegraph billing web page.

When the issue happens again I'll let y'a know if I notice anything different.

@jafin what all did you try? Curious if I missed something as it relates to "sign in/out of account" although I don't believe so since I spent to long trying various methods trying to get it working again on JetBrains IDE.

jafin commented 5 months ago

I've tried the following:

Nothing fixes autocomplete to start working.

In the idea.log I see many of the following types of errors:

2024-05-22 08:16:03,339 [  48061]   WARN - #com.sourcegraph.cody.agent.CodyAgentClient - Cody by Sourcegraph: █ Agent: autocomplete/execute No document found for file path file://D:/Data/<file>

Cody chat works ok and references files in context.

DataDavD commented 5 months ago

Hey @enriquegh I think I figured out (sorry I'm dumb lol) what you were referring to with regards to signing in/out of the account (tools -> Soucegraph & Cody -> remove account -> re-add account), is that what you were referring to? I did not do that, but somehow got it working today.

@jafin have you tried this:

jafin commented 5 months ago

@DataDavD just tried as you suggested (sign in /sign out).
I still receive the same error logs as reported above, and no autocomplete.

WARN - #com.sourcegraph.cody.agent.CodyAgentClient - Cody by Sourcegraph: █ Agent: autocomplete/execute No document found for file path file://D:/Data/<file>

Perhaps my issue is not exactly similar to your reported issue.

DataDavD commented 5 months ago

Yea unfortunately :/ I think it may different. I don't recall my error being that (or similar).