Commit fbfbeee
committed
fix(thinking): keep explicit session thinkingLevel when runtime downgrades (#87740)
When a session's stored thinkingLevel is unsupported by the active model, the
runtime fell back to a supported level for the turn AND wrote that fallback back
onto the persisted session override. Because the persistence condition fired
exactly when the stored value was the explicit override, the user's explicit
choice (e.g. "high") was permanently reset to the supported level (e.g. "off")
after every turn — re-setting it just got clobbered again next turn.
Downgrade only the level used for the current turn; never persist the support
fallback onto the stored override. The explicit override is the user's intent
and must survive turns (so it re-applies if a supporting model is used later).
Both the reply path (get-reply-run) and the agent-command path carried the same
duplicated write-back; both are fixed.
Reported by @TitanBob2026.1 parent 2e042fb commit fbfbeee
3 files changed
Lines changed: 46 additions & 50 deletions
File tree
- src
- agents
- auto-reply/reply
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | | - | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
157 | | - | |
| 159 | + | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| |||
771 | 774 | | |
772 | 775 | | |
773 | 776 | | |
| 777 | + | |
| 778 | + | |
774 | 779 | | |
775 | 780 | | |
776 | 781 | | |
| |||
942 | 947 | | |
943 | 948 | | |
944 | 949 | | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
945 | 981 | | |
946 | 982 | | |
947 | 983 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1197 | 1197 | | |
1198 | 1198 | | |
1199 | 1199 | | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
1221 | 1204 | | |
1222 | 1205 | | |
1223 | 1206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | 314 | | |
318 | 315 | | |
319 | 316 | | |
| |||
327 | 324 | | |
328 | 325 | | |
329 | 326 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | 327 | | |
335 | 328 | | |
336 | 329 | | |
| |||
880 | 873 | | |
881 | 874 | | |
882 | 875 | | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
903 | 880 | | |
904 | 881 | | |
905 | 882 | | |
| |||
0 commit comments