Skip to content

model/parsers: honor think value when initializing the qwen3-vl parser - #16953

Closed
tenderdeve wants to merge 1 commit into
ollama:mainfrom
tenderdeve:fix/16945-qwen3vl-nothink
Closed

tenderdeve wants to merge 1 commit into
ollama:mainfrom
tenderdeve:fix/16945-qwen3vl-nothink

Conversation

@tenderdeve

Copy link
Copy Markdown

Fixes #16945

The qwen3-vl parser always started in the thinking-collection state whenever the model supported thinking, ignoring the request's think value. With think: false the model emits an answer directly without a </think> tag, so the parser kept treating every token as reasoning, never emitted content, and the stream ended with finish_reason: length.

setInitialState now receives the think value and starts in the content state when thinking is disabled, matching how the qwen3.5 and deepseek3 parsers already behave. Thinking stays on by default when no value is passed, so existing behavior is unchanged.

Added cases to TestQwen3VLParserState covering think=false, think=true, and think="high".

The qwen3-vl parser always started in the thinking-collection state when
the model supported thinking, ignoring the request's think value. With
think=false the model emits an answer directly with no </think> tag, so
the parser kept treating every token as reasoning and never produced
content, ending in finish_reason=length.

Pass the think value through to setInitialState and start in the content
state when thinking is disabled, matching the qwen3.5 and deepseek3
parsers.

Fixes ollama#16945
@rick-github rick-github closed this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qwen3-vl:8b ignores think=false and /set nothink, streaming never emits content

2 participants