[GH-ISSUE #12780] Missing tools in new model created from qwen3-coder:30b #8477

Closed
opened 2026-04-12 21:10:06 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @somera on GitHub (Oct 25, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12780

What is the issue?

Hi,

I created this

$ more Modelfile-qwen3-coder-30b-32k
FROM qwen3-coder:30b
PARAMETER num_ctx 32768

modelfile.

And I'm wondertind, that the new model has no tools.

Original:

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

  Capabilities
    completion
    tools

  Parameters
    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
    ...

New model:

$ 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

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

  License
    Apache License
    Version 2.0, January 2004
    ...

Should the new model has Tools to? Cause I'm overriding only num_ctx?

And is this, what I did same with the ollama start parameter OLLAMA_CONTEXT_LENGTH=32768?

I know OLLAMA_CONTEXT_LENGTH=32768 will be activated for each model and each request.

Relevant log output


OS

Linux

GPU

Nvidia

CPU

AMD

Ollama version

0.12.6

Originally created by @somera on GitHub (Oct 25, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12780 ### What is the issue? Hi, I created this ``` $ more Modelfile-qwen3-coder-30b-32k FROM qwen3-coder:30b PARAMETER num_ctx 32768 ``` modelfile. And I'm wondertind, that the new model has no tools. Original: ``` $ ollama show qwen3-coder:30b Model architecture qwen3moe parameters 30.5B context length 262144 embedding length 2048 quantization Q4_K_M Capabilities completion tools Parameters 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 ... ``` New model: ``` $ 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 Parameters temperature 0.7 top_k 20 top_p 0.8 num_ctx 32768 repeat_penalty 1.05 stop "<|im_start|>" stop "<|im_end|>" stop "<|endoftext|>" License Apache License Version 2.0, January 2004 ... ``` Should the new model has Tools to? Cause I'm overriding only `num_ctx`? And is this, what I did same with the ollama start parameter `OLLAMA_CONTEXT_LENGTH=32768`? I know `OLLAMA_CONTEXT_LENGTH=32768` will be activated for each model and each request. ### Relevant log output ```shell ``` ### OS Linux ### GPU Nvidia ### CPU AMD ### Ollama version 0.12.6
GiteaMirror added the bug label 2026-04-12 21:10:06 -05:00
Author
Owner

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

ok, 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 the 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
    ...

But I have open question.

And is this, what I did same with the ollama start parameter OLLAMA_CONTEXT_LENGTH=32768?
I know OLLAMA_CONTEXT_LENGTH=32768 will be activated for each model and each request.

<!-- gh-comment-id:3446838065 --> @somera commented on GitHub (Oct 25, 2025): ok, 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 the `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 ... ``` But I have open question. And is this, what I did same with the ollama start parameter `OLLAMA_CONTEXT_LENGTH=32768`? I know `OLLAMA_CONTEXT_LENGTH=32768` will be activated for each model and each request.
Author
Owner

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

I'm testing opencode (https://opencode.ai/) with ollama and qwen3-coder:30b. opencode is working fine wih ollama (OpenAI API) and the model (cause tools are needed). But I try to understand the difference.

When I start my ollama with OLLAMA_CONTEXT_LENGTH=32768 (or higher) it works fine.

But I can't run ollama with this context whole time. I created a new model:

FROM qwen3-coder:30b

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

# your tweak
PARAMETER num_ctx 32768

But than opencode is not working. The tools want work.

What is the difference here? Work's num_ctx=32768 only when the client is using the ollama api? Cause opencode uses the compatible OpenAI api.

How can I solve it?

<!-- gh-comment-id:3447230826 --> @somera commented on GitHub (Oct 25, 2025): I'm testing opencode (https://opencode.ai/) with ollama and `qwen3-coder:30b`. opencode is working fine wih ollama (OpenAI API) and the model (cause tools are needed). But I try to understand the difference. When I start my ollama with `OLLAMA_CONTEXT_LENGTH=32768` (or higher) it works fine. But I can't run ollama with this context whole time. I created a new model: ``` FROM qwen3-coder:30b # keep Qwen3-Coder’s chat & tool formatting RENDERER qwen3-coder PARSER qwen3-coder # your tweak PARAMETER num_ctx 32768 ``` But than opencode is not working. The tools want work. What is the difference here? Work's `num_ctx=32768` only when the client is using the ollama api? Cause opencode uses the compatible OpenAI api. How can I solve it?
Author
Owner

@rick-github commented on GitHub (Oct 26, 2025):

PARAMETER num_ctx 32768 should work for either API endpoint. You can check the size of the context of the loaded model by running ollama ps.

<!-- gh-comment-id:3447890530 --> @rick-github commented on GitHub (Oct 26, 2025): `PARAMETER num_ctx 32768` should work for either API endpoint. You can check the size of the context of the loaded model by running `ollama ps`.
Author
Owner

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

With ollama ps I see the size. I need to check the whole setup.

<!-- gh-comment-id:3448118873 --> @somera commented on GitHub (Oct 26, 2025): With `ollama ps` I see the size. I need to check the whole setup.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#8477