Uh oh!
There was an error while loading. Please reload this page.
Commit 245526b
committed
Fix stale model override after session restart for unsupported switch
When sessionModelSwitch is 'unsupported' and the user explicitly requests a
model change, ensureSessionForThread restarts the session. However, the
modelForTurn logic also matched 'unsupported' and unconditionally overrode
the model with activeSession.model (the stale, pre-restart model).
Fix: when sessionModelSwitch is 'unsupported' and an explicit model selection
was provided (input.modelSelection), pass it through directly instead of
overriding it with the session's model. The session-model fallback is now only
used when no explicit model was requested (subsequent turns without a model
change).1 parent 1753bc6 commit 245526b
1 file changed
Lines changed: 8 additions & 6 deletions
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
437 | 439 | | |
438 | 440 | | |
439 | 441 | | |
| |||
0 commit comments