Skip to content

Ollama + Qwen3-coder Error: does not support thinking #972

Description

@jiangsutx

I use Ollama on Macbook Pro, and tried qwen2.5-coder:1.5b, as well as modelscope.cn/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:latest.

The content in ~/.claude-code-router/config.json:

{
  "PORT": 3456,
  "Providers": [
    {
      "name": "ollama",
      "api_base_url": "http://localhost:11434/v1/chat/completions",
      "api_key": "ollama",
      "models": ["qwen2.5-coder:1.5b", "modelscope.cn/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:latest"]
    }
  ],
  "Router": {
    "default": "ollama,modelscope.cn/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:latest",
    "background": "ollama,modelscope.cn/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:latest",
    "think": "ollama,modelscope.cn/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:latest",
    "longContext": "ollama,modelscope.cn/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:latest",
    "longContextThreshold": 60000,
    "webSearch": "ollama,modelscope.cn/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:latest"
  }
}

And when start with ccr code and type my instructions:

API Error: 400 {"error":{"message":"Error from provider(ollama,qwen2.5-coder:1.5b: 400):
    {\"error\":{\"message\":\"\\\"qwen2.5-coder:1.5b\\\" does not support
    thinking\",\"type\":\"api_error\",\"param\":null,\"code\":null}}\nError: Error from provider(ollama,qwen2.5-coder:1.5b:
    400): {\"error\":{\"message\":\"\\\"qwen2.5-coder:1.5b\\\" does not support
    thinking\",\"type\":\"api_error\",\"param\":null,\"code\":null}}\n\n    at nt
    (/opt/homebrew/lib/node_modules/@musistudio/claude-code-router/dist/cli.js:79940:11)\n    at h0
    (/opt/homebrew/lib/node_modules/@musistudio/claude-code-router/dist/cli.js:79998:11)\n    at
    process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async l0 (/opt/homebrew/lib/node_modul
    es/@musistudio/claude-code-router/dist/cli.js:79965:96)","type":"api_error","code":"provider_response_error"}}

My question is:

  1. I already knew that I can press Tab and disable thinking mode, and it works.
  2. It is very slow on my M3 Macbook Pro, even for qwen2.5-coder:1.5B. It seems like to restart ollama for each claude code instruction?
  3. What is the best practice? What model is best suit for M3 Macbook Pro + Claude Code?

Thanks very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions