CopilotC-Nvim / CopilotChat.nvim

Chat with GitHub Copilot in Neovim
https://copilotc-nvim.github.io/CopilotChat.nvim/
GNU General Public License v3.0
1.44k stars 67 forks source link

Allow runtime selection of models with `:CopilotChatModels` #368

Closed gptlang closed 1 month ago

gptlang commented 1 month ago

CC @deathbeam & CC @jellydn

I haven't touched Lua in a while and don't really know how the codebase works anymore. Could you guys check if I did anything wrong

Tentatively closes #366

pidgeon777 commented 1 month ago

So, to clarify, it will be possible to dynamically choose which model to use for any given request?

gptlang commented 1 month ago

Well, you'll have to specify it. It's not automagic like vscode. It's currently a bit slow due to fetching the models on each request. We might want to cache it per session (edit: done)

gptlang commented 1 month ago

But the point is to make discovery of available models easier, for example to check if gpt-4o is available to you

jellydn commented 1 month ago

Hi, @gptlang What if we save the selected model and use that config for next time? It's similar to what Copilot Auth does. So we don't need to call models every time. What do you think?

gptlang commented 1 month ago

I don't want to touch init.lua and would rather have that be followed by default. If you want to use a model by default, set it there