fix(state): use COALESCE(?, model) so mid-session model switches are persisted - #49682
fix(state): use COALESCE(?, model) so mid-session model switches are persisted#49682uzunkuyruk wants to merge 1 commit into
Conversation
|
Thanks for the report and the digging, @uzunkuyruk — but this is already fixed on Already fixed: Issue #34850 was closed as completed on May 30 via merged PR #35256, which added a dedicated Why the swap is the wrong fix: The Closing as already-resolved. The model-persistence path you want lives in |
Fixes #34850
Problem
update_token_counts()usesmodel = COALESCE(model, ?)in both theabsolute=Trueandabsolute=FalseSQL paths. Once a session's modelcolumn is set at creation, any subsequent call with a new model value is
silently discarded —
/modelswitches never reach the database.Fix
Swap argument order to
COALESCE(?, model): the provided value takespriority when non-NULL; falls back to the existing column value otherwise.
Test