Skip to content

feat(ollama): add OCO_OLLAMA_THINK config to control thinking mode#550

Open
keith666666 wants to merge 1 commit intodi-sukharev:masterfrom
keith666666:master
Open

feat(ollama): add OCO_OLLAMA_THINK config to control thinking mode#550
keith666666 wants to merge 1 commit intodi-sukharev:masterfrom
keith666666:master

Conversation

@keith666666
Copy link
Copy Markdown
Contributor

Summary

  • Adds OCO_OLLAMA_THINK config key to control Ollama's think parameter
  • When set, passes think: true/false as a top-level field in the /api/chat request body
  • Omitted by default so existing behavior is unchanged
  • Useful for reasoning models like qwen3.5 where thinking can be disabled for faster commits

Usage

oco config set OCO_OLLAMA_THINK=false

This is equivalent to ollama run qwen3.5 --think=false.

Test plan

  • Unit tests added in test/unit/ollama.test.ts
    • sends think=false when configured — verifies think: false appears in POST body
    • omits think when not configured — verifies think is absent when not set
  • Manual test: run oco with qwen3.5:2b model with and without OCO_OLLAMA_THINK=false and observe response time

🤖 Generated with Claude Code

Adds support for passing the `think` param to Ollama's /api/chat endpoint,
allowing users to disable reasoning blocks on models like qwen3.5 via
`oco config set OCO_OLLAMA_THINK=false`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant