Before you compare these two, check whether you can actually buy one of them. Sourcegraph ended Cody Free and Cody Pro on July 23, 2025, and removed Cody from the Enterprise Starter plan the same day. The Cody docs now open with a single eligibility line: supported on Sourcegraph Enterprise. Sourcegraph's pricing page lists one plan, starting at $16K on a minimum annual contract.
GitHub Copilot starts at zero and tops out at $39 per seat for Enterprise.
So for most people reading a "Cody vs Copilot" comparison, this isn't a choice. It's a migration question, or a renewal question, and the useful comparison is what each tool does with your code rather than which one wins on features.
TL;DR
Cody is Sourcegraph Enterprise only since July 2025, starting at $16K a year. Copilot runs from free to $39 per seat. Neither keeps your code on your hardware by default: Sourcegraph's own FAQ says self-hosted Cody ships snippets of up to 28 KB per request to Anthropic or OpenAI and needs internet access to work, and GitHub states Copilot is not available for GitHub Enterprise Server at all. The controls that actually differ are where the retrieval layer runs and whether your exclusions survive agent mode.
What changed since most comparisons were written
Three vendor changes landed after the bulk of the "Cody vs Copilot" articles on the internet were published, and each one breaks a claim those articles make.
Cody stopped being available to individuals. Sourcegraph's announcement is direct about it: as of July 23, 2025, Cody Free and Cody Pro are no longer available, and the Enterprise Starter plan no longer includes Cody. The Cody FAQ adds that the change "will not impact Cody Enterprise customers."
Copilot stopped being an OpenAI-only product. GitHub's supported models reference now lists models from OpenAI, Anthropic, Google, Microsoft, Moonshot AI, and xAI. Model choice was the standard argument for Cody in every older comparison, this one included. It's gone.
Sourcegraph and Amp are different companies. When the free plans ended, Sourcegraph pointed individual developers at Amp. Then on December 2, 2025, the two split, with Dan Adler taking over as CEO of Sourcegraph and co-founders Quinn Slack and Beyang Liu launching Amp Inc.
If your developers moved from Cody to Amp, your vendor review is pointed at the wrong company. The DPA, the security questionnaire, and the risk register all say Sourcegraph. Amp is a separate legal entity now. That's a new vendor intake, not a renewal.
The self-hosting claim, corrected
This is the part that older comparisons get wrong most often, and the reason this page needed a rewrite rather than a retitle. Earlier versions of this article said self-hosted Cody means "code never leaves your network." That isn't what Sourcegraph says.
From the Cody FAQ, on running Cody with self-hosted Sourcegraph:
Cody operates by sending code snippets (up to 28 KB per request) to a third-party cloud service. By default, this service is Anthropic but can also be OpenAI. To use Cody effectively, your self-hosted Sourcegraph instance must have internet access for these interactions with external services.
Read that twice if you've been telling your security team otherwise. Self-hosting Sourcegraph moves the code graph in-house. It does not move the inference. Your repository index, your permissions, and your search layer sit on your hardware; the snippets that get retrieved still go out over the internet to somebody else's model.
There is a configuration where the air-gap argument holds, and it's narrower than "self-hosted." Sourcegraph states it does not collect or have access to prompts and responses for enterprise customers who bring their own LLM API key on a self-hosted deployment. That removes Sourcegraph from the data path. It does not remove the model provider, unless the endpoint that key points at is one you run yourself. Air-gapped Cody means self-hosted Sourcegraph plus an inference endpoint inside your own network, and that's a project, not a checkbox.
Do not buy either tool on an air-gap promise you haven't tested. If your compliance posture depends on code never reaching a third party, the thing to verify is the egress, not the marketing page. Point the instance at a test repo with a canary string in it and watch what leaves the network.
Where the code actually goes
| Sourcegraph Cody | GitHub Copilot | |
|---|---|---|
| Availability | Sourcegraph Enterprise only, since July 23, 2025 | Free, Pro $10, Pro+ $39, Max $100, Business $19, Enterprise $39 per seat |
| On-premises option | Sourcegraph instance yes, inference no | None. Not available for GitHub Enterprise Server |
| Where retrieval runs | Your instance, if self-hosted | GitHub infrastructure |
| Where inference runs | Anthropic or OpenAI by default, or your own endpoint with BYOK | GitHub infrastructure |
| Snippet size per request | Up to 28 KB, per Sourcegraph's FAQ | Not published as a fixed figure |
| Model providers | Multiple, configurable on Enterprise | OpenAI, Anthropic, Google, Microsoft, Moonshot AI, xAI |
| Training on your code | No, for Enterprise customers | No, for Business and Enterprise |
| File exclusions | Permission-scoped via Sourcegraph search | Content exclusions, with an agent-mode gap |
The row that matters most for a security review is the second one, and it reads the same for both tools once you're honest about it. Neither vendor gives you a deployment where the model never sees your code, unless you supply the model yourself.
The Copilot exclusion gap
Content exclusions are Copilot's main answer to "keep this file away from the AI." You list paths, GitHub stops sending them. It works, with two documented limits that most teams never read.
From GitHub's content exclusion documentation:
- Agent mode in Copilot Chat in IDEs does not support content exclusion.
- Changes can take up to 30 minutes to take effect in editors that already have their settings loaded.
The first one is the real problem. Teams add .env, secrets.json, and /config/** to their exclusion list, tell the auditor secrets are excluded, and then the same developers run agent mode, which reads the working tree and doesn't honour the list. The exclusion is real in completions and chat. It's absent in exactly the mode that touches the most files.
The fix is upstream of the tool. An exclusion list is a control on what the assistant reads. It isn't a control on what's in the repository. If a live credential sits in a tracked file, every exclusion gap, every new IDE mode, and every future feature is another chance for it to leave. Remove the secret; don't route around it.
We see the downstream shape of this constantly in scans: hardcoded keys in files whose authors assumed some tool-level setting was keeping them private. The setting usually was doing its job. The file was the problem.
Choosing between them in 2026
Cody still makes sense if you already have a Sourcegraph Enterprise contract and a large multi-repo codebase where the code graph earns its keep. The retrieval quality across repositories is genuinely the thing Sourcegraph is good at, and running the index on your own hardware with permission-scoped retrieval is a real control. Budget for the $16K floor and for a BYOK inference endpoint if air-gapping is the point.
Copilot is the default for everyone else, which now includes every individual developer and every team without a Sourcegraph contract. Buy Business or Enterprise rather than Pro for anything commercial: that's the tier where the no-training and no-retention commitments apply. Then treat content exclusions as partial coverage and close the agent-mode gap with repository hygiene instead.
The honest summary is that the privacy comparison has narrowed. Copilot picked up model choice. Cody priced out everyone below enterprise. What's left is a retrieval-architecture difference and a cost difference, and neither tool will keep your code on your own hardware unless you build that part yourself.
What to check before either tool touches your repo
Both assistants read whatever's in the working tree. That makes the repository, not the vendor, the first thing to secure.
Can I still get Sourcegraph Cody?
Only on a Sourcegraph Enterprise contract. Cody Free and Cody Pro ended on July 23, 2025, and Enterprise Starter stopped including Cody the same day. The Cody docs now open with one eligibility line: supported on Sourcegraph Enterprise. Sourcegraph's pricing page lists a single Enterprise plan starting at $16K with a minimum annual contract.
Does self-hosted Cody keep my code inside my network?
No, not on a default install. Sourcegraph's Cody FAQ says Cody sends code snippets of up to 28 KB per request to a third-party cloud service, Anthropic by default and optionally OpenAI, and that your self-hosted instance must have internet access for those calls. Self-hosting moves the code graph in-house, not the inference. Bringing your own LLM API key removes Sourcegraph from the data path, but the model endpoint has to be yours before anything resembling an air gap exists.
Does GitHub Copilot only use OpenAI models?
Not anymore. GitHub's supported-models reference lists models from OpenAI, Anthropic, Google, Microsoft, Moonshot AI, and xAI. Model choice used to be the standard argument for Cody, and it isn't one now. Check which provider your team has actually selected before you write it into a vendor review.
Can I run GitHub Copilot on-premises?
No. GitHub's plans documentation states that Copilot is not currently available for GitHub Enterprise Server. Every plan is a cloud service on GitHub's infrastructure.
Do Copilot content exclusions cover everything?
No. GitHub documents that agent mode in Copilot Chat in IDEs does not support content exclusion, and that changes take up to 30 minutes to reach editors with settings already loaded. If your policy is "secrets are excluded," agent mode is the hole in it.
Check What Your Assistant Can Read
Exclusion lists only help if there's nothing dangerous left to exclude. CheckYourVibe scans your deployed app for hardcoded keys and exposed config, so the files Cody and Copilot read aren't the ones that hurt you.