Error getting context items from codebase: Error: `local_files_only=true` or `env.allowRemoteModels=false` and file was not found locally at "C:\snapshot\continue\binary\models/all-MiniLM-L6-v2/tokenizer.json".
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 11
- Continue version: 0.0.75
- IDE version: JetBrains Rider v2024.2.8 build #RD-242.23339.62, built on October 8, 2024
- Model: Azure OpenAi, Mistral
- config.json:
{
"models": [
{
"title": "Azure OpenAI 4o",
"provider": "openai",
"model": "gpt-4o",
"apiBase": "[REDACTED]",
"engine": "gpt-4o",
"apiVersion": "2024-05-01-preview",
"apiType": "azure",
"apiKey": "[REDACTED]"
}
],
"tabAutocompleteModel": {
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest",
"apiKey": "[REDACTED]"
},
"customCommands": [
{
"name": "test",
"prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
"description": "Write unit tests for highlighted code"
}
],
"contextProviders": [
{
"name": "diff",
"params": {}
},
{
"name": "folder",
"params": {}
},
{
"name": "codebase",
"params": {}
}
],
"slashCommands": [
{
"name": "edit",
"description": "Edit selected code"
},
{
"name": "comment",
"description": "Write comments for the selected code"
},
{
"name": "share",
"description": "Export the current chat session to markdown"
},
{
"name": "commit",
"description": "Generate a git commit message"
}
]
}
Description
After installing the Continue plugin and configuring the Azure OpenAI and Mistral settings, tab completion does not work and also @codebase command shows errors and also does not work.
Rider IDE shows this error, in a popup, when using @codebase command:
Error getting context items from codebase: Error: local_files_only=trueorenv.allowRemoteModels=false and file was not found locally at "C:\snapshot\continue\binary\models/all-MiniLM-L6-v2/tokenizer.json".
To reproduce
- Install Continue plugin
- Add Azure OpenAi chat model and Mistral API key
- See errors in log file
Log output
[info] Starting Continue core...
[2024-10-15T10:22:37] [info] Starting Continue core...
[2024-10-15T10:22:37] Setup
[2024-10-15T10:22:37] Core started
[2024-10-15T10:22:37] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
[2024-10-15T10:22:37] Could not load config.ts as absolute path, retrying as file url ...
[2024-10-15T10:22:48] Error parsing line: {"messageId":"eb66ab98-5711-41b5-b64a-3395a994912b","messageType":"readFile","data":"/* *\r\n *\r\n ...rColor: \u0027#666\u0027\r\n }\r\n};\r\n// Apply the theme\r\nsetOptions(Highcharts.theme);\r\n"} SyntaxError: Unexpected token { in JSON at position 8193
[2024-10-15T10:24:27] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
[2024-10-15T10:24:27] Could not load config.ts as absolute path, retrying as file url ...
[2024-10-15T10:24:28] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
[2024-10-15T10:24:28] Could not load config.ts as absolute path, retrying as file url ...
[2024-10-15T10:24:33] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
[2024-10-15T10:24:33] Could not load config.ts as absolute path, retrying as file url ...
[2024-10-15T10:24:33] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
[2024-10-15T10:24:33] Could not load config.ts as absolute path, retrying as file url ...
[2024-10-15T10:27:00] (node:21300) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `continue-binary --trace-warnings ...` to show where the warning was created)
[2024-10-15T10:29:45] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
[2024-10-15T10:29:45] Could not load config.ts as absolute path, retrying as file url ...
[2024-10-15T10:29:45] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
[2024-10-15T10:29:45] Could not load config.ts as absolute path, retrying as file url ...
[2024-10-15T10:33:04] Error retrieving from FTS: Error: SQLITE_ERROR: no such table: fts
[2024-10-15T10:34:50] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
[2024-10-15T10:34:50] Could not load config.ts as absolute path, retrying as file url ...
[2024-10-15T10:34:50] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
[2024-10-15T10:34:50] Could not load config.ts as absolute path, retrying as file url ...
[2024-10-15T10:36:37] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
[2024-10-15T10:36:37] Could not load config.ts as absolute path, retrying as file url ...
[2024-10-15T10:36:38] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
[2024-10-15T10:36:38] Could not load config.ts as absolute path, retrying as file url ...
[2024-10-15T10:37:48] Error retrieving from FTS: Error: SQLITE_ERROR: no such table: fts
Reproduced on MacOS Rubymine.
- OS: MacOS 14.6.1
- Continue version: 0.0.75
- IDE version: RubyMine 2024.2.3 JBuild #RM-242.23339.18, built on September 25, 2024
- Model: OpenAI 4o
[2024-10-15T17:07:20] (node:89332) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `continue-binary --trace-warnings ...` to show where the warning was created)
[2024-10-15T17:07:27] error when indexing: Error: Failed to generate embeddings for 1277 chunks with provider: _TransformersJsEmbeddingsProvider::all-MiniLM-L6-v2: Error: `local_files_only=true` or `env.allowRemoteModels=false` and file was not found locally at "/snapshot/continue/binary/models/all-MiniLM-L6-v2/tokenizer.json".
[2024-10-15T17:07:27] Indexing failed with error: Error: Failed to generate embeddings for 1277 chunks with provider: _TransformersJsEmbeddingsProvider::all-MiniLM-L6-v2: Error: `local_files_only=true` or `env.allowRemoteModels=false` and file was not found locally at "/snapshot/continue/binary/models/all-MiniLM-L6-v2/tokenizer.json". LanceDbIndex.getEmbeddings, process.processTicksAndRejections, async LanceDbIndex.computeRows, async LanceDbIndex.update, async CodebaseIndexer.indexFiles, async CodebaseIndexer.refresh, async Core.refreshCodebaseIndex
[2024-10-15T17:08:14] Error retrieving from FTS: Error: SQLITE_ERROR: no such table: fts
I was having the same error.
You need to set a custom embeddings provider. https://docs.continue.dev/customize/model-types/embeddings
There is a default embeddings provider that only works on vscode and not IntelliJ ides.
Thanks for the solution here @Lash-L. We've got a backlog of improvements to make to the JetBrains plugin and I've made note of this issue.
Thanks for the solution here @Lash-L. We've got a backlog of improvements to make to the JetBrains plugin and I've made note of this issue.
Happy I could help!
If you're making a list of improvements to the jetbrains plugin, this one is pretty big imo: #2061 - not using the the (newish) jetbrains api ends up causing jetbrain code-completion to be completely disabled.
Just figured I'd share!
Appreciate the feedback!
Are there any particular scenarios where you'd like to keep Continue installed but be able to still use the JetBrains code completion?
Are there any particular scenarios where you'd like to keep Continue installed but be able to still use the JetBrains code completion?
Jetbrains code completion has significantly improved recently, it's able to run fully local with some great results (better than copilot gave me in the past) with very little resource drain. It's a basically free option.
Second, we have been looking into using continue at our company for all of the devs to have a means to use a llm for coding. So we were able to spin up some llms in vertexai, then use litellm to have a proxy server so we can communicate with vertexai via openai api endpoints.
I got embedding + chat working great. However, code completion has been proving very very difficult to get working(with codey aka code-gecko) - I put forth 2 PRs that help improve it, but there have still been some issues. I have been putting some thought into adding support for code-gecko via the new vertexai llm model that was added a couple days ago and seeing if I can figure something out to consistently work - but that's besides the point
But just the idea of - I'm having issues, let me just enable this basic one that works pretty well and is built in to my ide- is a great comfort for me. Or our litellm server goes down and the devs can't hit our code completion model - they would still have a backup to be able to still get code completion directly through their ide and they don't have to spin up any model on their machine
Good context @Lash-L, that all makes sense.
Regarding the original issue on this thread, it should be resolved in https://github.com/continuedev/continue/pull/2723
Eventually we will get around to shipping transformers.js (or a better model) in JetBrains, but for now, that PR will allow JetBrains users to still use a simpler version of @Codebase that doesn't use embeddings.
Note that this means you'll still need to configure an embeddings provider other than transformers.js in order to get codebase indexing to work properly.
cc @mradamh @Seany84
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!