fix(agent-manager): inherit model and variant in tool sessions - #12073
Conversation
| const resolved = tasks.flatMap((task) => { | ||
| if (!task.model) return [] | ||
| const resolved = tasks.flatMap((task, index) => { | ||
| if (!params.tasks[index]?.model?.trim() || !task.model) return [] |
There was a problem hiding this comment.
SUGGESTION: Variant-only overrides aren't echoed in the "Resolved models" summary
This filter (!params.tasks[index]?.model?.trim() || !task.model) only echoes a resolution when the agent passed an explicit model override, matching the pre-existing behavior for named-model resolution. But with this PR, a task can also carry an explicit variant-only override that changes the effective reasoning variant while inheriting the model from the invoking turn (see the select() branch a few lines above returning { ...base, model: source.model, variant }). Since params.tasks[index]?.model is empty for that case, the variant override is silently applied without appearing in the "Resolved models:" output, so the agent/user has no confirmation that the variant was actually changed (as opposed to falling back to the inherited default).
Consider also echoing when params.tasks[index]?.variant?.trim() is set, not just model.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge (non-blocking) Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (7 files)
Verified: Fix these issues in Kilo Cloud Reviewed by claude-sonnet-5 · Input: 62 · Output: 22.6K · Cached: 1.9M Review guidance: REVIEW.md from base branch |
…r-default-model fix(agent-manager): inherit model and variant in tool sessions
Tool-started Agent Manager sessions currently omit model and reasoning state unless the agent supplies explicit overrides. A new session then resolves fresh defaults independently, which can send fan-out work to a recent or provider fallback model instead of the model selected for the invoking chat turn.
Prompted tasks now inherit the exact provider, model, and reasoning variant from the chronology-resolved invoking turn. The tool guidance tells agents to omit these fields by default and only provide overrides when explicitly requested. Variant-only overrides retain the inherited model, while explicit model resolution prefers the invoking provider and uses deterministic fallback ordering.
Prepared sessions without an initial prompt continue to use normal defaults.