-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Bug
When a user runs /new to reset their session, the new session inherits the model from the old session instead of the current config default.
Steps to Reproduce
- Set
model: opusinconfig.json - Switch to sonnet via
/modelin a chat session - Run
/newto reset the session - Run
/status— it shows sonnet, not opus
Expected Behavior
/new should create a fresh session using the model from config.json (the current default), not from the previous session.
Root Cause
In orchestrator/core.py, method reset_active_provider_session:
async def reset_active_provider_session(self, key: SessionKey) -> str:
active = await self._sessions.get_active(key)
if active is not None:
provider = active.provider
model = active.model # <-- bug: copies from OLD session
else:
model, provider = self.resolve_runtime_target(self._config.model)When an active session exists, it takes active.model (e.g. sonnet) and passes it to the new session. The else branch correctly uses self._config.model, but it only runs when there is no previous session.
Suggested Fix
Always use the config default:
async def reset_active_provider_session(self, key: SessionKey) -> str:
model, provider = self.resolve_runtime_target(self._config.model)This way /new always returns to the configured default model, which is the expected "factory reset" behavior.
Workaround
After /new, manually run /model and re-select the desired model.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels