Archive for the 'AI' Category

Opencode using a local LLM

Saturday, March 14th, 2026

I have been running a local LLM and been using it as a Gemini/ChatGPT replacement. I was looking for a much better coding experience so turned to OpenCode – https://opencode.ai/ . In order to use the locally hosted LLM, the following config file allows me to connect to my own server and keep my data safe.

One note when using OpenCode that I had an issue with was updating the context by extending the num_ctx for the Ollama model. When the context was too small it was unable to open files and complained about not haivng access to todolist.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama (local)",
      "options": {
        "baseURL": "http://10.0.0.222:11434/v1"
      },
      "models": {
        "qwen3-coder:30b": {
          "name": "qwen3-coder:30b"
        }
      }
    }
  }
}

VS Code: Continue – Configure self hosted ollama

Monday, January 5th, 2026

Over the holiday break I decided to setup my own Ollama server on a Linux server I keep running for my own testing and as a media server. It was surprisingly simple to use the Ollama site to pick out an agent and get a functioning LLM running. Then I turned to my VS code editor. I wanted to see what the process was for hooking up to my qwen3-coder LLM running on my server.

The file /home/<username>/.continue/config.yaml holds the config for any models that you are trying to connect to your editor. I added the model below to point to my local server.

name: Local Config
version: 1.0.0
schema: v1
models:
  - name: qwen3-coder
    provider: ollama
    model: qwen3-coder
    apiBase: http://<your server IP or name>:11434
    roles:
      - chat
      - edit
      - apply
      - embed
      - autocomplete

On the mac, I had to make sure that the Security and Privacy allowed access to local servers. But other than that all the functionality was available to use my server for privacy and not needing to pay for any services.