Skip to content

We need the think parameter of ollama to allow users to decide whether to turn on or off think. Currently, we cannot control the model to stop thinking #4781

@shuanggegege

Description

@shuanggegege

In the process of using SpringAi to dock with Ollama, there is no parameter that controls think. Taking the qwen3:1.7b model as an example, there are the following issues:

  1. It cannot be controlled whether it thinks or not, it defaults to thinking.
  2. The beginning and end of the thought process are not marked with thetag, but with the 'thinking...' field, which may cause SpringAi to not receive the thought content, resulting in a long wait for a response after sending the request

Previously, I saw that the 'think' parameter was added to version 1.1.0-M4, but upon checking the source code, this field was not present

The following is an example of a request from the Olama official website, which requires carrying the think parameter to control whether the model is thinking or not

curl http://localhost:11434/api/chat -d '{
"model": "qwen3",
"messages": [{
"role": "user",
"content": "How many letter r are in strawberry?"
}],
"think": true,
"stream": false
}'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions