Ollama documentation sugests bad provider ID #8938

Open
opened 2026-02-16 18:11:13 -05:00 by yindo · 0 comments
Owner

Originally created by @FlorinAndrei on GitHub (Feb 9, 2026).

Originally assigned to: @jayair on GitHub.

Description

Reading this page: https://opencode.ai/docs/providers/#ollama

Quote:

ollama is the custom provider ID. This can be any string you want.

Actually, you're not free to pick any name you want. The names must be distinct. For example, this does not work, there is no way to switch between providers:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama (spark)",
      "options": {
        "baseURL": "http://192.168.200.10:11434/v1"
      },
      "models": {
        "qwen3-coder-next": {
          "name": "Qwen3 Coder Next"
        }
      }
    },
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama (media)",
      "options": {
        "baseURL": "http://192.168.200.20:11434/v1"
      },
      "models": {
        "qwen3-coder-next-256k": {
          "name": "Qwen3 Coder Next 256k"
        }
      }
    }
  }
}

But this works, and I can switch between providers and models:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "ollama-spark": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama (spark)",
      "options": {
        "baseURL": "http://192.168.200.10:11434/v1"
      },
      "models": {
        "qwen3-coder-next": {
          "name": "Qwen3 Coder Next"
        }
      }
    },
    "ollama-media": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama (media)",
      "options": {
        "baseURL": "http://192.168.200.20:11434/v1"
      },
      "models": {
        "qwen3-coder-next-256k": {
          "name": "Qwen3 Coder Next 256k"
        }
      }
    }
  }
}

In other words, that name must be unique.

Plugins

No response

OpenCode version

1.1.53

Steps to reproduce

see description

Screenshot and/or share link

No response

Operating System

macOS 15.7.3

Terminal

macOS Terminal

Originally created by @FlorinAndrei on GitHub (Feb 9, 2026). Originally assigned to: @jayair on GitHub. ### Description Reading this page: https://opencode.ai/docs/providers/#ollama Quote: > `ollama` is the custom provider ID. This can be any string you want. Actually, you're not free to pick any name you want. The names must be distinct. For example, this does not work, there is no way to switch between providers: ```json { "$schema": "https://opencode.ai/config.json", "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (spark)", "options": { "baseURL": "http://192.168.200.10:11434/v1" }, "models": { "qwen3-coder-next": { "name": "Qwen3 Coder Next" } } }, "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (media)", "options": { "baseURL": "http://192.168.200.20:11434/v1" }, "models": { "qwen3-coder-next-256k": { "name": "Qwen3 Coder Next 256k" } } } } } ``` But this works, and I can switch between providers and models: ```json { "$schema": "https://opencode.ai/config.json", "provider": { "ollama-spark": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (spark)", "options": { "baseURL": "http://192.168.200.10:11434/v1" }, "models": { "qwen3-coder-next": { "name": "Qwen3 Coder Next" } } }, "ollama-media": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (media)", "options": { "baseURL": "http://192.168.200.20:11434/v1" }, "models": { "qwen3-coder-next-256k": { "name": "Qwen3 Coder Next 256k" } } } } } ``` In other words, that name must be unique. ### Plugins _No response_ ### OpenCode version 1.1.53 ### Steps to reproduce see description ### Screenshot and/or share link _No response_ ### Operating System macOS 15.7.3 ### Terminal macOS Terminal
yindo added the bugdocs labels 2026-02-16 18:11:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8938