zbirenbaum / zbirenbaum/copilot.lua
Error while trying out the NES feature
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.1k
- Forks
- 161
- Avg merge
- 11h 54m
- Merged PRs (30d)
- 13
Description
Hi all, I am trying out the new NES feature and after updating the plugin and enabling it, I am getting the following errors:
2025-10-17 15:27:09.142 [212] [ERROR]: LSP message: [Error: Failed to load from BPE encoder file stream: Error: ENOENT: no such file or directory, open '/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/js/o200k_base.tiktoken'
at loadTikTokenBpe (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@microsoft/tiktokenizer/dist/tikTokenizer.js:23:15)
at new TikTokenizer (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@microsoft/tiktokenizer/dist/tikTokenizer.js:72:69)
at createTokenizer (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@microsoft/tiktokenizer/dist/tokenizerBuilder.js:259:26)
at t.init (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@vscode/chat-lib/src/_internal/platform/tokenizer/node/tikTokenizerImpl.ts:37:21)
at W1e.doInitTokenizer (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@vscode/chat-lib/src/_internal/platform/tokenizer/node/tokenizer.ts:274:41)
at W1e.ensureTokenizer (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@vscode/chat-lib/src/_internal/platform/tokenizer/node/tokenizer.ts:265:28)
at W1e.tokenize (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@vscode/chat-lib/src/_internal/platform/tokenizer/node/tokenizer.ts:130:22)
at W1e._textTokenLength (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@vscode/chat-lib/src/_internal/platform/tokenizer/node/tokenizer.ts:170:29)
at W1e.tokenLength (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@vscode/chat-lib/src/_internal/platform/tokenizer/node/tokenizer.ts:140:16)
at W1e.countMessageObjectTokens (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@vscode/chat-lib/src/_internal/platform/tokenizer/node/tokenizer.ts:212:29): Error on conversation request]
2025-10-17 15:27:09.145 [213] [ERROR]: LSP message: [lsp] Request textDocument/copilotInlineEdit: Error: An unexpected error occurred: {"type":"failed","reason":"Error on conversation request. Check the log for more details.","requestId":"7fd175bf-8805-45c7-b208-35d53c5d16ab"}
at Object.fromUnknown (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@vscode/chat-lib/src/_internal/util/common/errors.ts:17:9)
at Function.mapChatFetcherErrorToNoNextEditReason (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@vscode/chat-lib/src/_internal/extension/xtab/node/xtabProvider.ts:842:53)
at Eze.streamEdits (/home/ilex/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@vscode/chat-lib/src/_internal/extension/xtab/node/xtabProvider.ts:532:39)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
My configuration for copilot.lsp:
return {
"zbirenbaum/copilot.lua",
dependencies = {
"copilotlsp-nvim/copilot-lsp", -- (optional) for NES functionality
},
cmd = "Copilot",
event = "InsertEnter",
config = function()
require("copilot").setup({
nes = {
enabled = true, -- requires copilot-lsp as a dependency
auto_trigger = true,
keymap = {
accept_and_goto = "<M-j>",
accept = false,
dismiss = "<Esc>",
},
},
suggestion = {
enabled = true,
auto_trigger = true,
hide_during_completion = true,
debounce = 75,
trigger_on_accept = true,
keymap = {
accept = "<C-c>",
accept_word = "<C-x>",
accept_line = "<C-v>",
next = "<M-v>",
prev = "<M-x>",
dismiss = "<C-]>",
},
},
})
end,
}
I am not sure what causes this error, but the file it is trying to access really does not exist. I assume this might be a misconfiguration somewhere, but I tried to remove and reinstall the plugin, no luck there. Any ideas what I might be doing wrong? And btw thanks for the amazing plugin!
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by reproducing the error with the shown copilot.lua NES configuration and inspect the installed copilot.lua/copilot-lsp contents around copilot/js/o200k_base.tiktoken. Use the reported tokenizer and textDocument/copilotInlineEdit log entries to trace the missing file. Done means NES no longer reports the missing encoder and inline edits work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100