Repository: CopilotC-Nvim/CopilotChat.nvim

Issue #415: Expected value but found invalid token at character 1
Created: 2024-09-18T11:16:47Z
Hi there, I am trying to use CopilotChat.nvim.  I think maybe the main difference is I am using packer.nvim as my package manager.  I am installing Copilot chat like so:
  use {
    'CopilotC-Nvim/CopilotChat.nvim',
    branch = 'canary',
    requires = {
      'github/copilot.vim',
      'nvim-lua/plenary.nvim',
    }
  }

-- copilot chat
require("CopilotChat").setup({
   debug = true,
})
Then I run PackerSync and it looks like CopilotChat is installed correctly.  (PackerSync is also making sure that all other libraries / dependencies are up-to-date as well)
Here is the output of checkhealth CopilotChat:
CopilotChat: require("CopilotChat.health").check()

CopilotChat.nvim [core] ~
- OK nvim: NVIM v0.10.1
  Build type: Release
  LuaJIT 2.1.1725453128
  Run ":verbose version" for more info

CopilotChat.nvim [commands] ~
- OK curl: curl 8.9.1 (x86_64-pc-linux-gnu) libcurl/8.9.1 OpenSSL/3.3.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.63.0 nghttp3/1.5.0
  Release-Date: 2024-07-31
  Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
  Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
- OK git: git version 2.46.0

CopilotChat.nvim [dependencies] ~
- OK plenary: installed
- OK copilot: copilot.vim
- WARNING tiktoken_core: missing, optional for token counting. See README for installation instructions.
- OK treesitter[markdown]: installed
- OK treesitter[diff]: installed

However, if I try to enter a prompt into the window, or if I run CopilotChatExplain, I am getting the following error:
[CopilotChat.nvim] "Expected value but found invalid token at character 1
Any help to debug would be greatly appreciated.  Thanks!

Duplicate issue #436: Expected value but found invalid token at character 1
Created: 2024-10-29T22:15:34Z
My setup with CopilotChat worked for weeks until a few days ago when the error, Expected value but found invalid token at character 1 showed up. Lazy did two updates before the errors showed. Could this be related to #419 or #415?
The entire buffer was selected and :'<,'>CopilotChatFix check errors was executed that generated that error.  Similar CopilotChat commands showed the same error.
nvim's :messages command showed:
...
[CopilotChat.nvim]       TaskNode(
[CopilotChat.nvim]         id: Editor.createNodeId(),
[CopilotChat.nvim]         isComplete: true,
[CopilotChat.nvim]         text: AttributedText(
[CopilotChat.nvim]           'This is a completed task',
[CopilotChat.nvim]         ),
[CopilotChat.nvim]       ),
[CopilotChat.nvim]     ],
[CopilotChat.nvim]   );
[CopilotChat.nvim] }
[CopilotChat.nvim] [DEBUG 14:48:27] /Users/thomas/.local/share/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/copilot.lua:369: Model: gpt-4o-2024-05-13
[CopilotChat.nvim] [DEBUG 14:48:27] /Users/thomas/.local/share/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/copilot.lua:370: Temperature: 0.1
[CopilotChat.nvim] [ERROR 14:48:28] /Users/thomas/.local/share/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/copilot.lua:481: Failed parse response:
[CopilotChat.nvim] Unprocessable Entity
[CopilotChat.nvim] "Expected value but found invalid token at character 1"

The same error occurred using different models from the nvim command, :CopilotChatModels.
CopilotChat in IDE is enabled in my GitHub Copilot settings. This has not changed since I installed CopilotChat.
Removing /Users/thomas/.local/share/nvim/lazy/CopilotChat.nvim/ and having CopilotChat.nvim reinstalled didn't address the error.

Closing comment (2024-10-30T10:14:52Z): Actually first lets just unify the issues, duplicate of #415
Please dont open duplicates