fix(runtime-host): ask auxiliary calls for the least reasoning each model accepts #5730
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.55) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.55 · 564 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.379
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #5730"
general
weight: 0.35
liugddx
Summary
Daily Review and next-prompt suggestions ask for no reasoning by setting
thinkingLevel: 'off'. On models that do not declareoff,resolveThinkingLeveldrops it, and the request then carries no effort at all. The provider falls back to its default reasoning: medium on GPT-5, o3 and GPT-6, and dynamic on Gemini 3.#5629 worked around this for suggestions by refusing every such model, so on those models suggestions never appear. That includes GPT-6 Sol, Luna and Astra, GPT-5, o3/o4-mini and Gemini 3.x.
This PR adds
leastReasoningThinkingLevelnext to the wire builders inmodel-factory.ts. It picks the level that asks a model for the least reasoning it accepts:'off'when the model declares it;'off'when the model declares no levels, or speaks Anthropic Messages, because there an omitted parameter already means no extended reasoning;minimal/low), which the wire builders then send explicitly.runHostAuxiliaryModelCallgainsreasoning: 'least', which resolves this against the target model. Daily Review and prompt suggestions use it.Suggestions no longer refuse reasoning-only models. When a model can't turn reasoning off, their output budget grows from 128 to 1,024 tokens, because reasoning tokens count against it.
Behaviour changes:
Fixes #5690
Verification
leastReasoningThinkingLevelis covered per provider, including the wire field it sends:-
gpt-5→minimal;o3,gpt-6-soland Codexgpt-6-astra→low;gemini-3.5-flash→minimal;-
gpt-5.5staysnoneandgemini-2.5-flashstays budget 0;- Anthropic effort models and undeclared models keep
off, sending noeffortorthinking.gpt-5sendsreasoning.effort: 'minimal'withmax_output_tokens: 1024, whileoff-capable models still sendnonewith 128.gpt-6-astra, three turns, thensession.prompt-suggestion.generateafter each:-
main:nonein about 0.4 s, and no request sent. The model is refused before the call.- This branch: a suggestion appears, e.g. "Yes, give me a checklist." (
success, 313 in / 11 out, 0 reasoning tokens atlow, 3.7 s).- With a 30 s deadline, all three calls came back in 3.2–8.3 s with 0–17 reasoning tokens.
runtimeandruntime-host:tsc --noEmitpasses,biome checkpasses on the changed files, and so do the touched suites (model-factory-thinking,prompt-suggestion, and the affectedexecution-model-compositioncases).rmto tolerateEBUSYfrom SQLite handles. That is a local test-harness issue and is not changed here.biome.cmdspawnSync→EINVAL), so I ran its steps manually.Review focus
gpt-6-astraatlow, with 0–17 reasoning tokens.AI use
Tool(s) and scope: Claude Code (Claude Opus) implemented the change and tests and ran the verification above; liugddx reviewed. The commit carries a
Generated-bytrailer.Checklist
Does this PR entail a change in behavior?
🤖 Generated with Claude Code