not compatible to ollama/qwen2.5-coder:7b #7447

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

Originally created by @yizhishang on GitHub (Jan 24, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Image Image

Plugins

local ollama

OpenCode version

1.1.34

Steps to reproduce

add config in "C:\Users\pc.config\opencode\opencode.json"
"ollama": {
"npm": "@ai-sdk/openai-compatible",
"name": "Ollama (local)",
"options": {
"baseURL": "http://localhost:11434/v1"
},
"models": {
"qwen2.5-coder:7b": {
"name": "qwen2.5 coder 7b",
"limit": { "context": 200000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
}
}
}

Screenshot and/or share link

No response

Operating System

window 11

Terminal

Window Ternimal + vscode

Originally created by @yizhishang on GitHub (Jan 24, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description <img width="920" height="714" alt="Image" src="https://github.com/user-attachments/assets/986482c5-f6c8-488b-8e3a-15044fa55efe" /> <img width="873" height="220" alt="Image" src="https://github.com/user-attachments/assets/f8e3cc8f-1411-45e7-9c42-2201a8aaf7bd" /> ### Plugins local ollama ### OpenCode version 1.1.34 ### Steps to reproduce add config in "C:\Users\pc\.config\opencode\opencode.json" "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (local)", "options": { "baseURL": "http://localhost:11434/v1" }, "models": { "qwen2.5-coder:7b": { "name": "qwen2.5 coder 7b", "limit": { "context": 200000, "output": 64000 }, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] } } } } ### Screenshot and/or share link _No response_ ### Operating System window 11 ### Terminal Window Ternimal + vscode
yindo added the windowsbug labels 2026-02-16 18:07:11 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 24, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7083: Using local Ollama models doesnt return any results (mentions qwen2.5-coder:7b and qwen2.5-coder:32b with same configuration)
  • #6223: Model not returning the answers (mentions qwen2.5-coder:14b with Ollama, tool calling issues)
  • #5187: Ollama: User message content arrives as empty array - model cannot see user input (qwen2.5-coder:14b, Ollama configuration issue)
  • #6649: Weird error with toolcalling on local model (local model via OpenAI-compatible endpoint, similar configuration)
  • #8950: Ollama custom provider error: agent configured model is not valid (custom Ollama models configuration)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 24, 2026): This issue might be a duplicate of existing issues. Please check: - #7083: Using local Ollama models doesnt return any results (mentions qwen2.5-coder:7b and qwen2.5-coder:32b with same configuration) - #6223: Model not returning the answers (mentions qwen2.5-coder:14b with Ollama, tool calling issues) - #5187: Ollama: User message content arrives as empty array - model cannot see user input (qwen2.5-coder:14b, Ollama configuration issue) - #6649: Weird error with toolcalling on local model (local model via OpenAI-compatible endpoint, similar configuration) - #8950: Ollama custom provider error: agent configured model is not valid (custom Ollama models configuration) Feel free to ignore if none of these address your specific case.
Author
Owner

@yizhishang commented on GitHub (Jan 24, 2026):

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-antigravity-auth@latest"],
  "provider": {
    "google": {
      "models": {
        "antigravity-gemini-3-pro": {
          "name": "Gemini 3 Pro (Antigravity)",
          "limit": { "context": 1048576, "output": 65535 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
          "variants": {
            "low": { "thinkingLevel": "low" },
            "high": { "thinkingLevel": "high" }
          }
        },
        "antigravity-gemini-3-flash": {
          "name": "Gemini 3 Flash (Antigravity)",
          "limit": { "context": 1048576, "output": 65536 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
          "variants": {
            "minimal": { "thinkingLevel": "minimal" },
            "low": { "thinkingLevel": "low" },
            "medium": { "thinkingLevel": "medium" },
            "high": { "thinkingLevel": "high" }
          }
        },
        "antigravity-claude-sonnet-4-5": {
          "name": "Claude Sonnet 4.5 (Antigravity)",
          "limit": { "context": 200000, "output": 64000 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
        },
        "antigravity-claude-sonnet-4-5-thinking": {
          "name": "Claude Sonnet 4.5 Thinking (Antigravity)",
          "limit": { "context": 200000, "output": 64000 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
          "variants": {
            "low": { "thinkingConfig": { "thinkingBudget": 8192 } },
            "max": { "thinkingConfig": { "thinkingBudget": 32768 } }
          }
        },
        "antigravity-claude-opus-4-5-thinking": {
          "name": "Claude Opus 4.5 Thinking (Antigravity)",
          "limit": { "context": 200000, "output": 64000 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
          "variants": {
            "low": { "thinkingConfig": { "thinkingBudget": 8192 } },
            "max": { "thinkingConfig": { "thinkingBudget": 32768 } }
          }
        },
        "gemini-2.5-flash": {
          "name": "Gemini 2.5 Flash (Gemini CLI)",
          "limit": { "context": 1048576, "output": 65536 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
        },
        "gemini-2.5-pro": {
          "name": "Gemini 2.5 Pro (Gemini CLI)",
          "limit": { "context": 1048576, "output": 65536 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
        },
        "gemini-3-flash-preview": {
          "name": "Gemini 3 Flash Preview (Gemini CLI)",
          "limit": { "context": 1048576, "output": 65536 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
        },
        "gemini-3-pro-preview": {
          "name": "Gemini 3 Pro Preview (Gemini CLI)",
          "limit": { "context": 1048576, "output": 65535 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
        }
      }
    },
// add local ollama config
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama (local)",
      "options": {
        "baseURL": "http://localhost:11434/v1"
      },
      "models": {
        "qwen2.5-coder:7b": {
          "name": "qwen2.5 coder 7b",
          "limit": { "context": 200000, "output": 64000 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
        }
      }
    }
  }
}
@yizhishang commented on GitHub (Jan 24, 2026): ```json { "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-antigravity-auth@latest"], "provider": { "google": { "models": { "antigravity-gemini-3-pro": { "name": "Gemini 3 Pro (Antigravity)", "limit": { "context": 1048576, "output": 65535 }, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }, "variants": { "low": { "thinkingLevel": "low" }, "high": { "thinkingLevel": "high" } } }, "antigravity-gemini-3-flash": { "name": "Gemini 3 Flash (Antigravity)", "limit": { "context": 1048576, "output": 65536 }, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }, "variants": { "minimal": { "thinkingLevel": "minimal" }, "low": { "thinkingLevel": "low" }, "medium": { "thinkingLevel": "medium" }, "high": { "thinkingLevel": "high" } } }, "antigravity-claude-sonnet-4-5": { "name": "Claude Sonnet 4.5 (Antigravity)", "limit": { "context": 200000, "output": 64000 }, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] } }, "antigravity-claude-sonnet-4-5-thinking": { "name": "Claude Sonnet 4.5 Thinking (Antigravity)", "limit": { "context": 200000, "output": 64000 }, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }, "variants": { "low": { "thinkingConfig": { "thinkingBudget": 8192 } }, "max": { "thinkingConfig": { "thinkingBudget": 32768 } } } }, "antigravity-claude-opus-4-5-thinking": { "name": "Claude Opus 4.5 Thinking (Antigravity)", "limit": { "context": 200000, "output": 64000 }, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }, "variants": { "low": { "thinkingConfig": { "thinkingBudget": 8192 } }, "max": { "thinkingConfig": { "thinkingBudget": 32768 } } } }, "gemini-2.5-flash": { "name": "Gemini 2.5 Flash (Gemini CLI)", "limit": { "context": 1048576, "output": 65536 }, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] } }, "gemini-2.5-pro": { "name": "Gemini 2.5 Pro (Gemini CLI)", "limit": { "context": 1048576, "output": 65536 }, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] } }, "gemini-3-flash-preview": { "name": "Gemini 3 Flash Preview (Gemini CLI)", "limit": { "context": 1048576, "output": 65536 }, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] } }, "gemini-3-pro-preview": { "name": "Gemini 3 Pro Preview (Gemini CLI)", "limit": { "context": 1048576, "output": 65535 }, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] } } } }, // add local ollama config "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (local)", "options": { "baseURL": "http://localhost:11434/v1" }, "models": { "qwen2.5-coder:7b": { "name": "qwen2.5 coder 7b", "limit": { "context": 200000, "output": 64000 }, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] } } } } } } ```
Author
Owner

@KLee1248 commented on GitHub (Feb 9, 2026):

I'm having the same issue, where the output seems to be the intended usage of the tool, but then the tool doesn't actually get used.

I can replicate this with qwen2.5-coder, but it seems to be working for qwen3 (I'm trying to use qwen2.5 because it fits on my GPU and qwen3 does not).

Example input (via OpenCode UI):

Use the provided tools to create a new file named "todo.md" and put a string that says "hello" in it.

Example output:

{"name": "write", "arguments": {"content": "hello\n", "filePath": "/C:/Code/SimpleTester/todo.md"}}

Opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "ollama": {
      "models": {
        "qwen2.5-coder-16k": {
          "_launch": true,
          "name": "qwen2.5-coder-16k"
        },
        "qwen3:4b": {
          "_launch": true,
          "name": "qwen3:4b"
        },
        "qwen3:8b": {
          "tools": true
        }
      },
      "name": "Ollama (local)",
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "http://127.0.0.1:11434/v1"
      }
    }
  }
}

ollama ps result:

NAME                        ID              SIZE      PROCESSOR    CONTEXT    UNTIL
qwen2.5-coder-16k:latest    209ec794ab47    6.3 GB    100% GPU     16384      4 minutes from now

Note: Everything seems to work appropriately using qwen3:8b (albeit very slowly), so I'm guessing that it's something related to this specific model.

Here is the result form "ollama show qwen2.5-coder-16k"

  Model
    architecture        qwen2
    parameters          7.6B
    context length      32768
    embedding length    3584
    quantization        Q4_K_M

  Capabilities
    completion
    tools
    insert

  Parameters
    num_ctx    16384

  System
    You are Qwen, created by Alibaba Cloud. You are a helpful assistant.

  License
    Apache License
    Version 2.0, January 2004
    ...

OpenCode Desktop v1.1.53
Ollama version: 0.15.6
Windows 11 10.0.26200

@KLee1248 commented on GitHub (Feb 9, 2026): I'm having the same issue, where the output seems to be the intended usage of the tool, but then the tool doesn't actually get used. I can replicate this with qwen2.5-coder, but it seems to be working for qwen3 (I'm trying to use qwen2.5 because it fits on my GPU and qwen3 does not). Example input (via OpenCode UI): ``` Use the provided tools to create a new file named "todo.md" and put a string that says "hello" in it. ``` Example output: ``` {"name": "write", "arguments": {"content": "hello\n", "filePath": "/C:/Code/SimpleTester/todo.md"}} ``` Opencode.json ``` { "$schema": "https://opencode.ai/config.json", "provider": { "ollama": { "models": { "qwen2.5-coder-16k": { "_launch": true, "name": "qwen2.5-coder-16k" }, "qwen3:4b": { "_launch": true, "name": "qwen3:4b" }, "qwen3:8b": { "tools": true } }, "name": "Ollama (local)", "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "http://127.0.0.1:11434/v1" } } } } ``` `ollama ps` result: ``` NAME ID SIZE PROCESSOR CONTEXT UNTIL qwen2.5-coder-16k:latest 209ec794ab47 6.3 GB 100% GPU 16384 4 minutes from now ``` Note: Everything seems to work appropriately using `qwen3:8b` (albeit very slowly), so I'm guessing that it's something related to this specific model. Here is the result form "ollama show qwen2.5-coder-16k" ``` Model architecture qwen2 parameters 7.6B context length 32768 embedding length 3584 quantization Q4_K_M Capabilities completion tools insert Parameters num_ctx 16384 System You are Qwen, created by Alibaba Cloud. You are a helpful assistant. License Apache License Version 2.0, January 2004 ... ``` OpenCode Desktop v1.1.53 Ollama version: 0.15.6 Windows 11 10.0.26200
Author
Owner

@noelbautista91 commented on GitHub (Feb 13, 2026):

FWIW, only unsloth's qwen3 30B coder model worked for me, tool calling and all.

@noelbautista91 commented on GitHub (Feb 13, 2026): FWIW, only unsloth's qwen3 30B coder model worked for me, tool calling and all.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7447