feat(config): reasoning_effort to disable thinking on any reasoning model#22
Merged
Conversation
…odel Add a global `reasoning_effort` config (and Session plumbing) sent as the OpenAI-standard "reasoning_effort" field on every request, via cogito's new OpenAIOptions.ReasoningEffort. Why: `metadata.enable_thinking:false` only silences models whose chat template honors that flag. Reasoning models whose GGUF template has no enable_thinking toggle (e.g. LFM2.5) ignore it and keep emitting <think> blocks — but they DO honor `reasoning_effort:"none"`. This gives a reliable, model-agnostic way to turn thinking off. Empty leaves it unset (no behavior change). - types.Config.ReasoningEffort (yaml: reasoning_effort), wired into the main session and the per-agent LLM factory. - bumps cogito to the commit adding OpenAIOptions.ReasoningEffort. - test: the configured reasoning_effort reaches the wire; README documented. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds a global
reasoning_effortconfig, sent as the OpenAI-standardreasoning_effortfield on every request (main session + per-agent factory), via cogito's newOpenAIOptions.ReasoningEffort.Why
metadata.enable_thinking:falseonly silences models whose chat template honors that flag. Reasoning models whose GGUF template has noenable_thinkingtoggle — e.g. LFM2.5 — ignore it and keep emitting<think>blocks. Those models do honorreasoning_effort:"none".Verified against a live LocalAI + LFM2.5:
metadata.enable_thinking:falsereasoning_budget:0/thinking:falsereasoning_effort:"none"Changes
types.Config.ReasoningEffort(yaml: reasoning_effort), wired into the main session and the per-agent LLM factory.github.com/mudler/cogitoto the commit addingOpenAIOptions.ReasoningEffort.reasoning_effortreaches the wire (fake OpenAI server, stream + non-stream). README documented next tometadata.Depends on
mudler/cogito#57 (adds
OpenAIOptions.ReasoningEffort). The go.mod here pins the cogito branch commit; re-pin to the merged commit once #57 lands.🤖 Generated with Claude Code