mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-04 07:31:28 +00:00
fix(sessions): copy modelProvider on session reset to prevent stale provider cross-contamination
When a session is reset (via /new or /reset), the previous entry's model field was copied to the new entry but modelProvider was not. This left the new entry in a state where resolveSessionModelRef would fall back to the config default_model provider (e.g. google-gemini-cli) when the stored model string has no provider prefix — producing a wrong display like 'google-gemini-cli/claude-sonnet-4-6' in the TUI status bar. Fixes the root cause for issue #25408 alongside the defensive fix in session-utils.ts.
This commit is contained in:
committed by
Gustavo Madeira Santana
parent
d846a28c98
commit
c8fce062a5
@@ -387,6 +387,7 @@ export const sessionsHandlers: GatewayRequestHandlers = {
|
||||
reasoningLevel: entry?.reasoningLevel,
|
||||
responseUsage: entry?.responseUsage,
|
||||
model: entry?.model,
|
||||
modelProvider: entry?.modelProvider,
|
||||
contextTokens: entry?.contextTokens,
|
||||
sendPolicy: entry?.sendPolicy,
|
||||
label: entry?.label,
|
||||
|
||||
Reference in New Issue
Block a user