feat: support subagent reasoning overrides - #11184
Conversation
| if (choice.direct) { | ||
| const value = override(choice.model) | ||
| if (!value) return { model: choice.model, variant: choice.variant } | ||
| const full = yield* input.provider.getModel(choice.model.providerID, choice.model.modelID) |
There was a problem hiding this comment.
WARNING: getModel is called here without a ProviderModelNotFoundError handler, unlike the adjacent non-direct path (lines 153–164) and the parent fallback path (lines 177–179).
If an agent has model hard-coded in its config and the provider later removes or renames that model, and the user has set a subagent_variant_override for it, this call will propagate an unhandled ProviderModelNotFoundError rather than gracefully falling back to choice.variant.
The fix mirrors the parent fallback:
const full = yield* input.provider
.getModel(choice.model.providerID, choice.model.modelID)
.pipe(Effect.catchTag("ProviderModelNotFoundError", () => Effect.succeed(undefined)))
const variant = full?.variants?.[value] ? value : choice.variant
return { model: choice.model, variant }Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Other Observations (not in diff)SDK type narrower than runtime: No test for Files Reviewed (8 files)
Fix these issues in Kilo Cloud Reviewed by claude-4.6-sonnet-20260217 · 1,568,548 tokens Review guidance: REVIEW.md from base branch |
feat: support subagent reasoning overrides
The global subagent model setting previously coupled reasoning effort to a single legacy variant value, which could become invalid when models changed and could not safely account for custom subagents using different models.
This adds model-specific subagent variant overrides while keeping the settings UI focused on one model and one matching reasoning selector. The general subagent receives the selected model and reasoning effort, while custom subagents retain their own model and only receive an override when one exists and is valid for that exact model. Stale or incompatible variants fall back to the agent's resolved variant instead of crossing model boundaries.
The settings controls also constrain long model labels to their input column so names truncate rather than overlap adjacent content.