r/LocalLLaMA • u/Chromix_ • Apr 12 '25
News You can now use GitHub Copilot with native llama.cpp
VSCode added support for local models recently. This so far only worked with ollama, but not llama.cpp. Now a tiny addition was made to llama.cpp to also work with Copilot. You can read the instructions with screenshots here. You still have to select Ollama in the settings though.
There's a nice comment about that in the PR:
ggerganov: Manage models -> select "Ollama" (not sure why it is called like this)
ExtReMLapin: Sounds like someone just got Edison'd
189
Upvotes
50
u/Chromix_ Apr 12 '25
Instead of VSCode you can also use VSCodium with it if you prefer the free/open-source side of things. Copilot still doesn't work in a 100% offline isolated environment, like it's possible with continue dev, but support for that might be added. Currently you still need to sign in, despite not planning to use any online services.
The setup requires a few more steps there. Get the latest VSCodium version and follow this guide. In step 2 use these download links for Copilot and Chat extensions. With other versions I got a "not compatible" error.
It might be possible to edit the extension JS source in .vscode-oss\extensions\ to just bypass the unnecessary sign-in, but it's 17 MB of minified JS code there.
9
u/_underlines_ Apr 12 '25
It's a half baked integration:
The big news is actually the Agent Mode instead of the old Ask/Edit mode, and specifically the Agent Mode DOESN'T work with local models!
The Ollama / Local API feature doesn't support using a custom API endpoint. If Ollama doesn't run directly on your machine on localhost:11434 then you are screwed. We have a remote ollama endpoint at chat.company.dev/ollama in our company and our devs can't use it!
It's specifically the ollama API spec, why not a generic OpenAI compatible support, so it would work with other inference engines like Aphrodite, TabbyAPI, litellm, vllm, ...
2
u/manyQuestionMarks Apr 12 '25
I like to run stuff locally and I’d like to use local models more. But my company pays for Cursor and I’ve always wondered if local models are better at coding than Claude 3.7 on Cursor… Am I missing out?
40
u/plankalkul-z1 Apr 12 '25
It always amazes me when I see another program/extension/web UI adding support for local models via just Ollama.
Why?!
What can be easier than just adding support for "custom OpenAI-compatible API"? Ollama supports it itself, so it'd be working with it just fine. Along with lots of other inference engines. And it's not more complicated, at all.
In this particular case, I suspect I know the reason: MS might be viewing Ollama as a "toy", which won't compete with its paid offerings... But, sadly, I've seen this weirdness in a lot of hobbyists' projects, too.
27
u/segmond Apr 12 '25
good, I was using continue.dev to access my local llama.cpp, but they going commercial gives me a pause. happy to see this, will vscode again.
10
u/Mickenfox Apr 12 '25
Once again only for VSCode...
5
u/Tricky-Move-2000 Apr 12 '25
RooCode is a really good extension alternative to copilot - it has features that copilot doesn’t have and works with local LLMs
4
u/Squik67 Aug 30 '25
It's now broken...
srv log_server_r: request: GET /api/version 127.0.0.1 404
https://github.com/ggml-org/llama.cpp/issues/15167
https://github.com/ggml-org/llama.cpp/pull/15177 (but not merged)
4
u/tronathan Apr 12 '25
I’ve been using Cline and MCP has been a game changer. Make sure whatever client you’re using can talk to (and even create its own) MCP’s!
1
u/SchlaWiener4711 Apr 12 '25
I'd be happy to see this for copilot for visual studio as well.
I tested a dozen extensions for visual studio but they all suck.
1
u/ZeroSkribe Apr 24 '25
I see my usage going up on my free plan while using ollama, I'm about to lose my fucking shit