Skip to content

Misleading error reporting when token not available: Error reported to user as "model not found" #1179

@simchri

Description

@simchri

When the plugin encounters an authentication issue, this may be shown to the user as "Model not found ". Only opening the logs shows the real issue - Example:

[WARN  Fr 04 Jul 2025 11:39:24 CEST] /home/masssmde/.local/share/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/client.lua:396: Failed to authenticate with copilot: ...zy/CopilotChat.nvim/lua/CopilotChat/config/providers.lua:67: Failed to find GitHub token
[WARN  Fr 04 Jul 2025 11:39:24 CEST] /home/masssmde/.local/share/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/client.lua:354: Failed to authenticate with copilot: ...zy/CopilotChat.nvim/lua/CopilotChat/config/providers.lua:67: Failed to find GitHub token
[WARN  Fr 04 Jul 2025 11:39:24 CEST] /home/masssmde/.local/share/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/client.lua:354: Failed to authenticate with github_models: ...zy/CopilotChat.nvim/lua/CopilotChat/config/providers.lua:67: Failed to find GitHub token
[ERROR Fr 04 Jul 2025 11:39:24 CEST] /home/masssmde/.local/share/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/init.lua:913: ...re/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/client.lua:440: Model not found: o3-mini
[ERROR Fr 04 Jul 2025 11:39:32 CEST] /home/masssmde/.local/share/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/init.lua:913: ...re/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/client.lua:440: Model not found: o3-mini

Consider elevating "token not found" warning to an error?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions