Skip to content

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

Closed as not planned
Closed as not planned

Description

@yizhishang

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

Activity

  1. github-actions commented on Jan 24, 2026

    @github-actions
    Contributor

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

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

  2. yizhishang commented on Jan 24, 2026

    @yizhishang
    Author
    {
      "$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"] }
            }
          }
        }
      }
    }
  3. KLee1248 commented on Feb 9, 2026

    @KLee1248

    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

  4. noelbautista91 commented on Feb 13, 2026

    @noelbautista91

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

  5. cfournel commented on Mar 14, 2026

    @cfournel

    any update on this ?

  6. github-actions commented on Jul 6, 2026

    @github-actions
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions