feat(config): add global reasoning effort configuration with CLI, env, and shell-plugin support#2754
Open
tusharmath wants to merge 4 commits intomainfrom
Open
feat(config): add global reasoning effort configuration with CLI, env, and shell-plugin support#2754tusharmath wants to merge 4 commits intomainfrom
tusharmath wants to merge 4 commits intomainfrom
Conversation
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.
Summary
Add global reasoning configuration support, allowing users to set and persist a reasoning effort level (none/minimal/low/medium/high/xhigh) that applies to all agents, with agent-level settings taking priority.
Context
Previously, reasoning effort could only be configured per-agent or via ad-hoc environment variables, making it cumbersome to set a consistent reasoning level across an entire session or globally. This PR introduces a first-class
[reasoning]config block in~/.forge.toml, a CLIconfig get/set reasoningcommand, and a shell-plugin:reasoning/:reshortcut so users can quickly switch effort levels interactively.Changes
Effortenum (none,minimal,low,medium,high,xhigh) added toforge_configand exposed fromforge_domainReasoningConfigstruct added toforge_configwithenabledandeffortfields, serialisable to/from TOML/JSONForgeConfiggains a top-levelreasoningfield; schema (forge.schema.json) updated accordinglyEffortvariants to their respective native representations (token budgets / level enums)AppConfigService/APItrait extended withget_reasoning_config/set_reasoning_configmethodsforge_infraenv layer readsFORGE_REASONING__EFFORTto allow per-invocation overridesconfig get reasoningandconfig set reasoning <effort>subcommands; built-in commands JSON updated:reasoning(:re) session action and:config-reasoning(:cr) persistent-config action backed by an fzf picker;_forge_exec/_forge_exec_interactiveexportFORGE_REASONING__EFFORTwhen a session override is activegoogle-cloud-auth,insta,uuid,configcrate versions rolled back to resolve lock-file conflictsKey Implementation Details
The effort level flows through three priority layers, from highest to lowest:
reasoningblock in the workflow YAML:re(stored in_FORGE_SESSION_REASONING, exported asFORGE_REASONING__EFFORT)[reasoning]block in~/.forge.tomlEffort is mapped to provider-specific tokens/levels:
Use Cases
effort = "high"globally for a deep-dive debugging session, then drop back to"medium"for routine work via:cr:reto override reasoning effort for just the current shell session without touching the persistent configFORGE_REASONING__EFFORT=noneto completely disable reasoning tokens and reduce costTesting
Links