Setup guide - From Ollama and GitHub Copilot docs
Use Ollama in GitHub Copilot
GitHub Copilot CLI supports bring-your-own-model providers through COPILOT_PROVIDER_* environment variables, and both GitHub and Ollama document pointing it at a local Ollama server. Ollama also offers ollama launch copilot.
Last verified 7 steps4 official sources
Steps
- Step 1.
Install Copilot CLI (npm, all platforms).
Terminalnpm install -g @github/copilot - Step 2.
Quick setup through Ollama.
Terminalollama launch copilot - Step 3.
Run directly with a model.
Terminalollama launch copilot --model kimi-k2.5:cloud - Step 4.
Headless mode for Docker, CI/CD or scripts (
--yesauto-pulls the model and requires--model).Terminalollama launch copilot --model kimi-k2.5:cloud --yes -- -p "how does this repository work?" - Step 5.
Manual setup per Ollama's docs: set the environment variables, then run copilot.
Terminalexport COPILOT_PROVIDER_BASE_URL=http://localhost:11434/v1 export COPILOT_PROVIDER_API_KEY= export COPILOT_PROVIDER_WIRE_API=responses export COPILOT_MODEL=qwen3.5 copilot - Step 6.
Manual setup per GitHub's docs (OpenAI-compatible provider, the default type).
Terminalexport COPILOT_PROVIDER_BASE_URL=http://localhost:11434 export COPILOT_MODEL=YOUR-MODEL-NAME copilot - Step 7.
Optional offline mode so the CLI talks only to your local provider.
Terminalexport COPILOT_OFFLINE=true
Caveats
- This covers GitHub Copilot CLI, not the Copilot editor extensions.
- The two official pages differ: Ollama's uses
http://localhost:11434/v1with COPILOT_PROVIDER_WIRE_API=responses, while GitHub's example useshttp://localhost:11434with no wire API set. Both are copied verbatim. - GitHub requires models that support tool calling and streaming, and recommends a context window of at least 128k tokens; Ollama recommends at least 64k.
- Separately, Ollama documents a VS Code extension (Ollama.ollama, VS Code 1.127 or newer) that adds Ollama models to the VS Code Chat model picker; that page does not mention Copilot by name.
More setup guides
Same tool, other providers
Related reading
- GitHub Copilot CLI With Ollama: Local Models and the New SandboxCopilot CLI 1.0.94 finds local Ollama models from /model and ships an OS-level sandbox. Setup, the 4k context trap, and why local is not offline.
- GitHub Copilot for JetBrains Gains Persistent Memory and Ollama BYOKGitHub Copilot for JetBrains adds memory across chat sessions, Ollama as a BYOK provider, and enterprise settings for MCP access. What each feature does.
- Ollama Decision Models: Run Nimble Locally with --askOllama 0.40.4 runs decision models locally: ollama run nimble --ask answers yes/no, label and score questions with probabilities. Commands and limits.
- Ollama 0.40 on Mac: MLX by Default, Disk Space DoubledOllama 0.40 runs supported models on MLX on Apple Silicon and keeps a backup copy of each model you load. What it costs in disk, what is fixed, and the cleanup.
- Hermes Agent Guide (2026): What It Is, Local Setup With Ollama, Skills, and Hermes vs OpenClawHermes Agent is Nous Research's open-source, self-improving AI agent. Run it locally with Ollama, see how its skills system works, and compare it with OpenClaw.
- What Is OpenClaw? Setup, Skills, MCP Server, Claude Code, and Ollama (2026 Guide)What is OpenClaw? A self-hosted personal AI agent you reach through chat apps. Install, skills and ClawHub, its MCP server, Claude Code use, and Ollama models.
FAQ
How do I use Ollama in GitHub Copilot?
GitHub Copilot CLI supports bring-your-own-model providers through COPILOT_PROVIDER_* environment variables, and both GitHub and Ollama document pointing it at a local Ollama server. Ollama also offers ollama launch copilot.
Which Ollama model ids work in GitHub Copilot?
The official docs read for this guide list qwen3.5, kimi-k2.5:cloud, glm-5:cloud, glm-5.3:cloud and kimi-k3:cloud. Requests go to http://localhost:11434/v1.
Is this an official Ollama and GitHub Copilot setup?
The steps draw on both Ollama's and GitHub Copilot's docs. It was last checked against 4 official pages on October 17, 2026.
Sources
Last verified against 4 official pages.
- docs.ollama.comhttps://docs.ollama.com/integrations/copilot-cli
- raw.githubusercontent.comhttps://raw.githubusercontent.com/ollama/ollama/main/docs/integrations/copilot-cli.mdx
- docs.github.comhttps://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models
- docs.ollama.comhttps://docs.ollama.com/integrations/vscode
Newsletter
New models, set up the day they ship
One email per week. New model releases, the coding tools that support them and how to wire them up.