fix: clear session-scoped model overrides during session reset

This commit is contained in:
Mikita Lisavets
2026-04-06 15:22:30 +02:00
committed by Teknium
parent 2c814d7b5d
commit 9afb9a6cb2
2 changed files with 130 additions and 0 deletions

View File

@@ -3264,6 +3264,10 @@ class GatewayRunner:
except Exception:
pass
# Clear any session-scoped model override so the next agent picks up
# the configured default instead of the previously switched model.
self._session_model_overrides.pop(session_key, None)
# Reset the session
new_entry = self.session_store.reset_session(session_key)