kilocode icon indicating copy to clipboard operation
kilocode copied to clipboard

How to set up Kilo Code CLI to use Ollama local? Only lets me select Ollama Cloud

Open cleong110 opened this issue 8 months ago • 11 comments

Question

https://kilo.ai/docs/ai-providers/ollama discusses how to set up Kilo Code in VS Code to use local models via Ollama. However, I am not sure how to get it to work with Kilo Code CLI. It only allows me to select "Ollama Cloud":

Image

I can confirm that ollama is installed and works. curl http://localhost:11434/api/version gives me {"version":"0.17.7"}(base), and ollama list works too:

ollama list
NAME                       ID              SIZE      MODIFIED
glm-4.7-flash:latest       d1a8a26252f1    19 GB     19 minutes ago
lfm2:latest                d6c816d74887    14 GB     18 hours ago
qwen3-coder:30b            06c1097efce0    18 GB     18 hours ago
gemma3:latest              a2af6cc3eb7f    3.3 GB    19 hours ago
nomic-embed-text:latest    0a109f422b47    274 MB    3 months ago
qwen2.5-coder:1.5b-base    02e0f2817a89    986 MB    3 months ago
llama3.1:8b                46e0c10c039e    4.9 GB    3 months ago

Versions:

kilo -v
7.0.41
ollama -v
ollama version is 0.17.7

cleong110 avatar Mar 10 '26 14:03 cleong110

The user is asking how to configure Kilo Code CLI to use a locally-running Ollama instance instead of 'Ollama Cloud'. They have Ollama installed and working locally but cannot find the option in the CLI.

This response was generated by Kilo Auto-Triage and may not be fully accurate. Please verify the information independently.

kilo-code-bot[bot] avatar Mar 10 '26 14:03 kilo-code-bot[bot]

You can check this document: https://opencode.ai/docs/providers/#ollama

Kilo code was built on top OpenCode

vkduy avatar Mar 14 '26 08:03 vkduy

@cleong110 you can set it up adding a custom provider pointing to your local Ollama (default http://localhost:11434/v1/), When you will be able to see your local model then you need to set the default model in Models setting. Kilo chat will be showing your model. Previously the configuration was a bit easier for custom local model indeed.

Image

glaucopater avatar Apr 03 '26 11:04 glaucopater

But why need for "custom"? I think ollama is used pretty much, and I thought it would be reasonable to expect it is as simple as to enter ip:port, and later to be able to choose model at any time like on previous version from some combo like box.

So, can local ollama also be included, please?

ljubomirb avatar Apr 04 '26 20:04 ljubomirb

I would like local ollama added too! But for now, @glaucopater's suggestion works.

dtaddis avatar Apr 10 '26 11:04 dtaddis

I don't see anything relevant here:

Image

stiv-yakovenko avatar Apr 19 '26 16:04 stiv-yakovenko

You need to add a provider after you setup Ollama locally, then you can set the default model (in this example Gemma4) and then finally you will be able to see the custom model in Kilo chat

Image Image Image

glaucopater avatar Apr 19 '26 19:04 glaucopater

I think they drop the ollama intentionally to force you to use cloud service.

hyh19962008 avatar Apr 23 '26 09:04 hyh19962008

+1 would be nice if this was easier and/or better documented. Local LLMs aren't the move for serious coding, but would be nice to be able to have this as an option for airplanes. (I wasn't able to get the CLI working with my local ollama setup).

DataDrivenAngel avatar Apr 28 '26 01:04 DataDrivenAngel

To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please reopen it or create a fresh new one.

github-actions[bot] avatar Jun 27 '26 07:06 github-actions[bot]

I spent hours struggling to get image support working for my local Ollama instance running qwen3.6:27b. As shown in the attached screenshot, the paid model clearly supports images.

However, simply adding "image" to the modalities caused crashes until I explicitly defined the limits. For anyone else running into this, I finally got it working by using the following configuration to allow the model to accept and "see" images: Image

      "models": {
        "qwen3.6:27b": {
          "name": "qwen3.6:27b",
          "attachment": true,
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "limit": {
            "context": 32768,
            "output": 8192
          },
          "reasoning": true
        }
      }

Regarding the official documentation at https://kilo.ai/docs/code-with-ai/agents/custom-models#modalities-(modalities, there is no indication that adding an image modality without specifying limits will cause the Kilo Code application to crash. It would be helpful if the documentation could clarify that limit parameters are effectively mandatory for multimodal local models to prevent these crashes.

Additionally, I have not found a way to include video support for this model. Simply adding "video" to the input modalities causes the system to crash. If anyone has successfully enabled video input for this setup, please share your configuration!

korkodinosd avatar Jul 06 '26 10:07 korkodinosd