Skip to main content
Watch: I Built an AI App Without Leaving Databricks

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

  1. Step 1.

    Install Copilot CLI (npm, all platforms).

    Terminal
    npm install -g @github/copilot
  2. Step 2.

    Quick setup through Ollama.

    Terminal
    ollama launch copilot
  3. Step 3.

    Run directly with a model.

    Terminal
    ollama launch copilot --model kimi-k2.5:cloud
  4. Step 4.

    Headless mode for Docker, CI/CD or scripts (--yes auto-pulls the model and requires --model).

    Terminal
    ollama launch copilot --model kimi-k2.5:cloud --yes -- -p "how does this repository work?"
  5. Step 5.

    Manual setup per Ollama's docs: set the environment variables, then run copilot.

    Terminal
    export 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
  6. Step 6.

    Manual setup per GitHub's docs (OpenAI-compatible provider, the default type).

    Terminal
    export COPILOT_PROVIDER_BASE_URL=http://localhost:11434
    export COPILOT_MODEL=YOUR-MODEL-NAME
    copilot
  7. Step 7.

    Optional offline mode so the CLI talks only to your local provider.

    Terminal
    export 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/v1 with COPILOT_PROVIDER_WIRE_API=responses, while GitHub's example uses http://localhost:11434 with 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.

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.

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.