feat(agent): wire optional reasoningEffort through session and strategy - #91
Merged
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.
Adds optional
reasoningEfforttoAgentSessionConfigandStrategyRunInputin@inbrowser/agent, allowing callers to configure Gemini thinking levels and stream thought summaries without infinite reasoning loops.Risk
reasoningEffortto model endpoints that do not support thinking (such as legacy Gemini 1.5 models or non-reasoning OpenRouter endpoints) may result in upstream provider rejection if the underlying adapter does not strip unsupported reasoning configurations.Session configuration forwards reasoning effort directly into strategy run inputs
When
reasoningEffortis present onAgentSessionConfig,session.tsattaches the value to theStrategyRunInputobject handed toconfig.strategy.run().ReAct loop strategy attaches reasoning effort to chat and critique requests
createReactLoopStrategy()checksinput.reasoningEffortand attaches it to both the primarychatRequestand any post-turncritiqueRequestsent toinput.llm.Implementation notes and verification
? :), nullish coalescing (??), or unnamed boolean conditions inifstatements.packages/modelandpackages/agent(bun test packages/model/test packages/agent/test/*.test.ts): 341 passed, 0 failed across 40 files in 4.84s.packages/model, preserving the explicit test contract (it('omits thought summaries when reasoningEffort is omitted')).