Open-Source AI Coding Assistants: What Actually Runs Locally

The phrase "open-source AI coding assistant" gets used for at least four different arrangements, and the difference between them is the difference between your code staying on your machine and your code being sent to someone else's server on every keystroke. Two projects can both describe themselves accurately as open source and behave nothing alike.
This page is about mechanics, not rankings. Model quality changes every few months; the layer structure below does not. Once you can name which layer a project actually opens, most of the marketing claims become easy to check.
Four things get called "open source"
A coding assistant is not one program. It is a model, a runtime that executes the model, a client that talks to your editor, and a protocol that connects the client to tools. Any of those can be open, and the rest can be closed.
| Layer | What it is | If this is the only open layer |
|---|---|---|
| Weights | The trained model file | You can run offline, but you supply the runtime |
| Runtime | The inference engine that executes weights | You can run other models locally, not this one |
| Client | The editor extension or CLI | You can inspect the UI, still call a hosted model |
| Protocol | The interface between client and tools or models | You can swap providers, not remove the provider |
The common pattern is a closed weights layer with an open client. That is a real and useful kind of open — you can audit what the extension does, fork the interface, point it at a different backend. It is not local execution, and the repo's license will tell you which it is within about thirty seconds if you look for the model download rather than the star count.
What the weights layer decides
The weights layer sets three things that no amount of tooling fixes: how much context the model can hold, how reliably it emits well-formed tool calls, and how much hardware it needs. A 7B model quantized to four bits fits in laptop memory and will occasionally produce an edit that misses the surrounding code; a much larger model used through a hosted endpoint holds more of the repository but costs per token and requires the network.
This is why "local" and "capable" trade against each other rather than stacking. The honest version of the trade is: local gets you the guarantee, hosted gets you the headroom. Pick which one your task actually needs before picking a tool.
How local indexing works
Retrieval is the part that makes a coding assistant feel like it knows your repository, and it works the same way whether the model runs locally or remotely.
- Chunk. Source files are split into overlapping windows, usually by function or class boundary rather than fixed line counts, because a half-function has no meaning.
- Embed. Each chunk is turned into a vector. This step needs a model too — an embedding model, which is small and can run locally even when the chatting model cannot.
- Store and search. Vectors go into a local index. When you type, the query is embedded and the nearest chunks are retrieved.
- Assemble. Retrieved chunks, your open file, and your instruction are packed into one prompt, in an order the model weights towards.
Two failure modes live here. If the chunks are cut badly, the model receives a function without its callers and confidently changes the wrong signature. If the index goes stale — you edited files and the index did not update — the model reasons about code that no longer exists. Neither is a model problem, and neither is fixed by a bigger model.
What running locally buys you
- No per-token cost. Once the hardware exists, a long session is free at the margin. That changes behaviour: you stop rationing context and start pasting the whole file.
- No code leaving the machine on the requests you route locally. This is a real guarantee, with the caveat that it covers only those requests.
- A pinned model. A hosted model can be updated under you and start behaving differently on the same prompt. A local weight file behaves the same in a year.
Those three are worth real money in regulated work, in proprietary codebases, and anywhere an audit trail matters more than peak capability.
What it doesn't buy you
- Privacy by itself. The assistant can still send telemetry, check for updates, or load a plugin that calls a hosted endpoint. The guarantee comes from the outbound traffic, not the license.
- Correct code. Local models make the same class of mistake as hosted ones — plausible edits that compile and do the wrong thing. Review is still the control.
- Freedom from maintenance. Running inference is an operations job: drivers, quantization formats, memory limits, context windows. You are trading a subscription for an on-call rotation of one.
Where hosted still wins
Long-context repository work, multi-file refactors, and anything where the model must hold a whole design in view at once. The gap here is memory, and memory is the thing you cannot download. Hosted assistants also win on tool reliability: if a model calls a tool in the wrong shape ten percent of the time, an agent loop built on top of it fails in a way that looks like a workflow bug.
A workable split, and the one most teams land on, is local for completion, small edits, and anything touching regulated data; hosted for planning and cross-file changes. The cost of that split is remembering which mode you are in, which is why the tooling that survives tends to make the boundary visible instead of hiding it.
How to check one in 30 minutes
Five checks, in this order. Each one has a failure mode you can see without benchmark scores.
- Find the model file. Search the repo for a download link or a weights reference. No weights, no local execution — no matter what the README says.
- Disconnect the network and try one edit. If it still works, the request path is local. If it errors, something in the chain is hosted, and now you know where the boundary is.
- Change a function signature and watch the index. Edit a file the assistant has indexed, then ask about it immediately. A stale answer means the index does not watch the filesystem, and every long session will drift.
- Ask for a tool call that should fail. Point it at a file that does not exist. A good loop reports the failure and stops; a weak one invents the file contents.
- Watch outbound traffic for five minutes. Idle, then one completion. Whatever leaves the machine during that window is your actual privacy posture.
Notice that none of these require knowing which model is inside. Model choice matters, but layer and boundary questions decide whether the tool is usable for your constraint at all, and they are checkable in minutes.
Bottom line
"Open source" on a coding assistant tells you which layer is visible, not where your code goes. The useful question is narrower: which layer is open, and does the request path terminate on hardware you control. Answer those two and the rest — model quality, editor fit, cost — becomes a normal shopping decision instead of a trust exercise.
If you want the loop that sits on top of the model rather than the model itself, start with what an AI agent actually is and the developer-facing walkthrough.
FAQ
Is an open-source coding assistant the same as a local one?
No. A project can publish its client and still call a hosted model, which means your code leaves the machine on every request. Running locally requires the weights layer to be downloadable and the inference runtime to run on your hardware. Those are separate facts, and a repo can be honest about being open while still requiring a network connection to do anything useful.
Do I need a GPU to run one locally?
For small models in the 7B class, a recent laptop with enough unified or video memory can run quantized weights at usable speed for completion and short edits. Larger models and long-context repository work scale with memory, not with cleverness. The practical question is not whether it runs but whether it returns a first token fast enough that you keep using it, which is why the same model can feel fine in a chat window and unbearable inside an editor.
Is local indexing the same as fine-tuning?
No. Indexing is retrieval: the assistant embeds chunks of your repository, stores the vectors, and puts the most relevant chunks into the prompt at request time. Fine-tuning changes the model weights. Retrieval changes what the model can see right now, is reversible, and updates as the code changes. Treating them as the same thing leads to expensive fine-tuning runs that fix nothing a better retrieval step would not have fixed.
Does a local assistant stop my code from leaking?
It stops the requests you route locally from leaving the machine. It does not stop telemetry, crash reports, update checks, or a plugin that quietly calls a hosted endpoint. If the requirement is that no code leaves the network, the check is on outbound traffic and on every extension the tool loads, not on the marketing page.
how do AI agents work — return to the complete AI agent architecture guide.
Was this helpful?
Your feedback stays on this page — no tracking.