Issues with qwen3:32b, llama4:16x17b, gpt-oss:20b #304

Open
opened 2026-02-15 16:29:47 -05:00 by yindo · 5 comments
Owner

Originally created by @wolframwi on GitHub (Nov 3, 2025).

Up until recently, the Ollama Python library worked with all models that I downloaded, but now I run into issues with some of the newer models:

For reference, here is how I call Ollama:

    response = ollama.generate(
        model=llm_engine,
        prompt=query,
        stream=False,
        format=response_model.model_json_schema(),
        options={"temperature": 0.0, "top_k": 1, "num_ctx": num_ctx},
        images=images,
    )

(1) Minor -- qwen3:32b responds only in "thinking" instead of "response":

Instead of just using response["response"], I now need to use

response_text = (response["response"] or response["thinking"] or "").strip()

since qwen3:32b consistently responds in response["thinking"] and leaves response["response"] blank.

(2) Major -- llama4:16x17b and gpt-oss:20b don't seem to provide any response:

Here is the response I got from invoking gpt-oss:20b:

model='gpt-oss:20b' created_at='2025-11-03T09:07:14.833064Z' done=True done_reason='stop' total_duration=11868059417 load_duration=3789110375 prompt_eval_count=2640 prompt_eval_duration=7464908083 eval_count=7 eval_duration=371895000 response='' thinking=None context=[...]

Apologies in advance if I'm doing something wrong.

Many thanks
Wolfram

I am running Ollama's Python client version 0.6.0 and Ollama version 0.12.9.

Originally created by @wolframwi on GitHub (Nov 3, 2025). Up until recently, the Ollama Python library worked with all models that I downloaded, but now I run into issues with some of the newer models: For reference, here is how I call Ollama: response = ollama.generate( model=llm_engine, prompt=query, stream=False, format=response_model.model_json_schema(), options={"temperature": 0.0, "top_k": 1, "num_ctx": num_ctx}, images=images, ) (1) Minor -- qwen3:32b responds only in "thinking" instead of "response": Instead of just using response["response"], I now need to use response_text = (response["response"] or response["thinking"] or "").strip() since qwen3:32b consistently responds in response["thinking"] and leaves response["response"] blank. (2) Major -- llama4:16x17b and gpt-oss:20b don't seem to provide any response: Here is the response I got from invoking gpt-oss:20b: model='gpt-oss:20b' created_at='2025-11-03T09:07:14.833064Z' done=True done_reason='stop' total_duration=11868059417 load_duration=3789110375 prompt_eval_count=2640 prompt_eval_duration=7464908083 eval_count=7 eval_duration=371895000 response='' thinking=None context=[...] Apologies in advance if I'm doing something wrong. Many thanks Wolfram I am running Ollama's Python client version 0.6.0 and Ollama version 0.12.9.
Author
Owner

@alisson-anjos commented on GitHub (Nov 10, 2025):

The same here

@alisson-anjos commented on GitHub (Nov 10, 2025): The same here
Author
Owner

@ParthSareen commented on GitHub (Nov 11, 2025):

Can you re-run with no options?

@ParthSareen commented on GitHub (Nov 11, 2025): Can you re-run with no `options`?
Author
Owner

@MightyPlaza commented on GitHub (Nov 21, 2025):

Can you re-run with no options?

from ollama import generate
from pydantic import BaseModel, field_validator

class Class(BaseModel):
    response: str

result = generate(model="qwen3-vl:8b", prompt="Say hi to the GitHub users.", format=Class.model_json_schema())
print("Thinking:\n", result.thinking, "\n")
print("Response:\n", result.response, "\n")

A simple example where all the output is in the thinking, running on the cpu (since this model refuses to use vulkan)

@MightyPlaza commented on GitHub (Nov 21, 2025): > Can you re-run with no `options`? ```py from ollama import generate from pydantic import BaseModel, field_validator class Class(BaseModel): response: str result = generate(model="qwen3-vl:8b", prompt="Say hi to the GitHub users.", format=Class.model_json_schema()) print("Thinking:\n", result.thinking, "\n") print("Response:\n", result.response, "\n") ``` A simple example where all the output is in the thinking, running on the cpu (since this model refuses to use vulkan)
Author
Owner

@MightyPlaza commented on GitHub (Nov 22, 2025):

Ok so using qwen3-vl:4b-instruct (no thinking, but has to be a separate model) works fine

@MightyPlaza commented on GitHub (Nov 22, 2025): Ok so using `qwen3-vl:4b-instruct` (no thinking, but has to be a separate model) works fine
Author
Owner

@wolframwi commented on GitHub (Feb 3, 2026):

Hi there

Thanks so much for your help, and apologies for the slow response. I ran your code on my computer (using qwen3-vl:32b), and the result that I get is:

Thinking:
 {
  "response": "Hi there! 😊 I'm here to help with any questions or issues you might have. How can I assist you today?"
} 

Response:
  

When I run the same code with gpt-oss:20b, I get:

Thinking:
 None 

Response:
  

I get these results both on MacOS 26.2 and Ubuntu 24.04.3 LTS.

Many thanks
Wolfram

@wolframwi commented on GitHub (Feb 3, 2026): Hi there Thanks so much for your help, and apologies for the slow response. I ran your code on my computer (using qwen3-vl:32b), and the result that I get is: ``` Thinking: { "response": "Hi there! 😊 I'm here to help with any questions or issues you might have. How can I assist you today?" } Response: ``` When I run the same code with gpt-oss:20b, I get: ``` Thinking: None Response: ``` I get these results both on MacOS 26.2 and Ubuntu 24.04.3 LTS. Many thanks Wolfram
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#304