Skip to content
This repository was archived by the owner on Mar 29, 2026. It is now read-only.
yzprofilePublic archive

About

Use Ollama as Copilot backend

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readme

Use Ollama as Copilot backend

I’ve tested almost all of the shitty solutions, this one is THE SHIT!

Only models that support the “Suffix” field can optimally integrate with Copilot. AFAIK, currently deepseek-coder-v2, starcoder2, and qwen2.5-coder support inline completion/infill.

Launch ollama

OLLAMA_HOST=0.0.0.0 ollama serve

Launch copilot-ollama proxy

./copilot-ollama --listen_addr 0.0.0.0:11435 --ollama_host http://127.0.0.1:11434 --model deepseek-coder-v2 --verbose

Visual Studio Code

modify copilot config in settings.json and restart

"github.copilot.advanced": {
    "debug.overrideCAPIUrl": "http://127.0.0.1:11435/v1",
    "debug.testOverrideProxyUrl": "http://127.0.0.1:11435",
    "debug.overrideProxyUrl": "http://127.0.0.1:11435",
    "debug.chatOverrideProxyUrl": "http://127.0.0.1:11435/v1/chat/completions"
}

Doom Emacs

  • packages.el
(package! copilot :recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")))
  • config.el
(use-package! copilot
  :hook (prog-mode . copilot-mode)
  :bind (:map copilot-completion-map
              ("<tab>" . 'copilot-accept-completion)
              ("M-f" . 'copilot-accept-completion-by-word)
              ("M-h" . 'copilot-next-completion)
              ("M-l" . 'copilot-previous-completion))
  :config
  (setq copilot-indent-offset-warning-disable t)
  (setq copilot-max-char -1)
  (setq copilot-idle-delay 0.1)
  (setenv "AGENT_DEBUG_OVERRIDE_CAPI_URL" "http://127.0.0.1:11435/v1")
  (setenv "AGENT_DEBUG_OVERRIDE_PROXY_URL" "http://127.0.0.1:11435")
  (setenv "AGENT_DEBUG_CHAT_OVERRIDE_PROXY_URL" "http://127.0.0.1:11435")
  (setenv "AGENT_DEBUG_USE_EDITOR_FETCHER" "true")
  (setenv "AGENT_DEBUG_OVERRIDE_RELATED_FILES" "true")
  (setenv "AGENT_DEBUG_OVERRIDE_ENGINE" "copilot-codex")
)

About

Use Ollama as Copilot backend

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages