Skip to content

fix(vscode): preserve cached reasoning variants - #13174

Merged
marius-kilocode merged 1 commit into
mainfrom
fix-variant-caching-default-reasoning
Aug 17, 2026
Merged

fix(vscode): preserve cached reasoning variants#13174
marius-kilocode merged 1 commit into
mainfrom
fix-variant-caching-default-reasoning

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Summary

Default reasoning support introduced a sentinel value for explicit model-default selections. Model changes also pass through the variant carry path, where an absent current value was persisted as that sentinel. Because session resolution gives the session/model key precedence over the agent/model cache, new sessions could lose the previously selected reasoning effort.

This changes the carry path to leave the cache untouched when there is no concrete variant to carry. Explicit user selection of Default continues to persist the sentinel through the select path. Regression coverage covers both global new-session state and session-scoped state.

The introducing change was PR #13063.

@kilo-code-bot

kilo-code-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Minimal, correct fix. The removed sentinel write in carry only affected the value === undefined branch, and both model-selector call sites always pass deps.variant(session), which already resolves the sentinel to undefined via getVariant — so explicit user Default selections remain unaffected (still persisted through select). Session-scoped resolution now correctly falls back to the agent-level cache instead of being shadowed by the imported sentinel. Regression tests cover both the global and session-scoped carry paths, and the changeset is patch-scoped with user-facing wording.

Files Reviewed (3 files)
  • packages/kilo-vscode/webview-ui/src/context/session-variants.ts
  • packages/kilo-vscode/tests/unit/session-variants.test.ts
  • .changeset/quiet-variants-cache.md

Reviewed by kimi-k3 · Input: 95K · Output: 8.6K · Cached: 405.4K

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit a7ccd20 into main Aug 17, 2026
24 checks passed
@marius-kilocode
marius-kilocode deleted the fix-variant-caching-default-reasoning branch August 17, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants