Add Support to Enable/Disable "Thinking" Indicator for Ollama Models #922
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a feature that allows users to toggle the "thinking" indicator when using Ollama models.
✨ What's New
Added a value to enable or disable the "think" in config behavior when generating responses with Ollama models. See example below
Updated relevant logic to respect this flag.
Maintained backward compatibility by keeping the default behavior unchanged (i.e., "thinking" remains enabled unless explicitly turned off).
📚 Why This Is Useful
When we use thinking model in ollama such as (qwen, deepseek) so it generates thinking content as well that make difficult to parse the json from the response. Now we can turn it off so we will get only the message content from ollama response.
🧪 Testing
Verified that the feature works correctly with the Ollama backend.
Tested both enabled and disabled states to ensure expected behavior.
No impact on non-Ollama models.
required ollama version >= 0.5.0