Commit 3af6e63
fix: update sessionEntry.contextTokens on model switch
When switching models via inline directive, applyModelOverrideToSessionEntry
updated the model/provider override but left contextTokens unchanged.
This caused contextTokens to get stuck at a lower value after switching
to a model with a smaller context window and back.
Now persistInlineDirectives explicitly updates sessionEntry.contextTokens
to match the new model's context window, keeping session state consistent.
Fixes #35372
Co-Authored-By: Claude Opus 4.6 <[email protected]>1 parent cc5dad8 commit 3af6e63
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
176 | 184 | | |
177 | 185 | | |
178 | 186 | | |
| |||
0 commit comments