fix(chat): persist default thinking variant selection (#492)

Treat selecting Default as an explicit variant clear across send-time persistence, stream metadata sync, and historical session analysis so stale non-default variants are not reapplied.
This commit is contained in:
Iuliia Ivashko
2026-02-24 03:29:01 +02:00
committed by GitHub
parent d2358c2c03
commit de99b55a14
3 changed files with 20 additions and 26 deletions
+12 -16
View File
@@ -397,14 +397,12 @@ export const useSessionStore = create<SessionStore>()(
// ignored
}
if (variant !== undefined) {
try {
useContextStore
.getState()
.saveAgentModelVariantForSession(created.id, effectiveDraftAgent, draftProviderId, draftModelId, variant);
} catch {
// ignored
}
try {
useContextStore
.getState()
.saveAgentModelVariantForSession(created.id, effectiveDraftAgent, draftProviderId, draftModelId, variant);
} catch {
// ignored
}
}
}
@@ -461,14 +459,12 @@ export const useSessionStore = create<SessionStore>()(
// ignored
}
if (variant !== undefined) {
try {
useContextStore
.getState()
.saveAgentModelVariantForSession(currentSessionId, effectiveAgent, providerID, modelID, variant);
} catch {
// ignored
}
try {
useContextStore
.getState()
.saveAgentModelVariantForSession(currentSessionId, effectiveAgent, providerID, modelID, variant);
} catch {
// ignored
}
}