registry.ollama.ai/library/qwen3-coder-30b-32k:latest does not support tools #2276

Closed
opened 2026-02-16 17:34:56 -05:00 by yindo · 2 comments
Owner

Originally created by @somera on GitHub (Oct 25, 2025).

Description

I'm using opencode v0.15.17 with ollama.

I can't run my ollama instance with OLLAMA_CONTEXT_LENGTH=32768. Now I created this:

$ more Modelfile-qwen3-coder-30b-32k*
::::::::::::::
Modelfile-qwen3-coder-30b-32k
::::::::::::::
FROM qwen3-coder:30b
PARAMETER num_ctx 32768
::::::::::::::
Modelfile-qwen3-coder-30b-32k.sh
::::::::::::::
#!/bin/bash

ollama create qwen3-coder-30b-32k -f Modelfile-qwen3-coder-30b-32k

and when I will use this model with opencode I get this:

registry.ollama.ai/library/qwen3-coder-30b-32k:latest does not support tools
Image

Possible solution should be to check for the parent_model:

curl http://localhost:11434/api/show -d '{"model": "qwen3-coder-30b-32k:latest"}'

{
  "license": "...",
  "modelfile": "...",
  "parameters": "...",
  "template": "{{ .Prompt }}",
  "details": {
    "parent_model": "qwen3-coder:30b",
    "format": "gguf",
    "family": "qwen3moe",
    "families": [
      "qwen3moe"
    ],
    "parameter_size": "30.5B",
    "quantization_level": "Q4_K_M"
  },
...

OpenCode version

0.15.17

Originally created by @somera on GitHub (Oct 25, 2025). ### Description I'm using opencode v0.15.17 with ollama. I can't run my ollama instance with `OLLAMA_CONTEXT_LENGTH=32768`. Now I created this: ``` $ more Modelfile-qwen3-coder-30b-32k* :::::::::::::: Modelfile-qwen3-coder-30b-32k :::::::::::::: FROM qwen3-coder:30b PARAMETER num_ctx 32768 :::::::::::::: Modelfile-qwen3-coder-30b-32k.sh :::::::::::::: #!/bin/bash ollama create qwen3-coder-30b-32k -f Modelfile-qwen3-coder-30b-32k ``` and when I will use this model with opencode I get this: ``` registry.ollama.ai/library/qwen3-coder-30b-32k:latest does not support tools ``` <img width="1358" height="390" alt="Image" src="https://github.com/user-attachments/assets/dae89592-1781-42f8-b4d4-b0fa645be76c" /> Possible solution should be to check for the `parent_model`: ``` curl http://localhost:11434/api/show -d '{"model": "qwen3-coder-30b-32k:latest"}' { "license": "...", "modelfile": "...", "parameters": "...", "template": "{{ .Prompt }}", "details": { "parent_model": "qwen3-coder:30b", "format": "gguf", "family": "qwen3moe", "families": [ "qwen3moe" ], "parameter_size": "30.5B", "quantization_level": "Q4_K_M" }, ... ``` ### OpenCode version 0.15.17
yindo added the bug label 2026-02-16 17:34:56 -05:00
yindo closed this issue 2026-02-16 17:34:56 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 25, 2025):

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

  • #1619: Very similar issue with qwen3-coder:latest not supporting tools (same base model)
  • #303: Same error pattern with llama2 - "registry.ollama.ai/library/[model] does not support tools"
  • #1068: General tool use problems with Ollama models, discusses configuration approaches
  • #2728: Cannot use tools with qwen2.5-coder and Ollama (related Qwen model family)

The suggested solution in your issue (checking parent_model) appears to be a valid approach that hasn't been implemented yet. Feel free to ignore if none of these address your specific case with custom Modelfile configurations.

@github-actions[bot] commented on GitHub (Oct 25, 2025): This issue might be a duplicate of existing issues. Please check: - #1619: Very similar issue with qwen3-coder:latest not supporting tools (same base model) - #303: Same error pattern with llama2 - "registry.ollama.ai/library/[model] does not support tools" - #1068: General tool use problems with Ollama models, discusses configuration approaches - #2728: Cannot use tools with qwen2.5-coder and Ollama (related Qwen model family) The suggested solution in your issue (checking parent_model) appears to be a valid approach that hasn't been implemented yet. Feel free to ignore if none of these address your specific case with custom Modelfile configurations.
Author
Owner

@somera commented on GitHub (Oct 25, 2025):

I think, the problem is om "my" side.

With this

FROM qwen3-coder:30b

# keep Qwen3-Coder’s chat & tool formatting
RENDERER qwen3-coder
PARSER   qwen3-coder

# your tweak
PARAMETER num_ctx 32768

Modelfile tools are back.

$ ollama show qwen3-coder-30b-32k:latest
  Model
    architecture        qwen3moe
    parameters          30.5B
    context length      262144
    embedding length    2048
    quantization        Q4_K_M

  Capabilities
    completion
    tools

  Parameters
    num_ctx           32768
    repeat_penalty    1.05
    stop              "<|im_start|>"
    stop              "<|im_end|>"
    stop              "<|endoftext|>"
    temperature       0.7
    top_k             20
    top_p             0.8

  License
    Apache License
    Version 2.0, January 2004
    ...
@somera commented on GitHub (Oct 25, 2025): I think, the problem is om "my" side. With this ``` FROM qwen3-coder:30b # keep Qwen3-Coder’s chat & tool formatting RENDERER qwen3-coder PARSER qwen3-coder # your tweak PARAMETER num_ctx 32768 ``` Modelfile `tools` are back. ``` $ ollama show qwen3-coder-30b-32k:latest Model architecture qwen3moe parameters 30.5B context length 262144 embedding length 2048 quantization Q4_K_M Capabilities completion tools Parameters num_ctx 32768 repeat_penalty 1.05 stop "<|im_start|>" stop "<|im_end|>" stop "<|endoftext|>" temperature 0.7 top_k 20 top_p 0.8 License Apache License Version 2.0, January 2004 ... ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2276