Update implementation to make it cleaner

This commit is contained in:
IAvecilla
2026-06-12 11:03:44 -07:00
committed by Teknium
parent c61815232a
commit 8c3c08c50b
3 changed files with 51 additions and 37 deletions
+15
View File
@@ -1091,6 +1091,21 @@ def test_config_sync_switches_unpinned_session(monkeypatch):
assert session["config_model_seen"] == ("new/model", "nous")
def test_config_sync_treats_auto_provider_as_unset(monkeypatch):
_patch_config_model(monkeypatch, "new/model", provider="auto")
session = _sync_test_session(config_model_seen=("old/model", ""))
calls = []
monkeypatch.setattr(
server,
"_apply_model_switch",
lambda sid, sess, raw, **kw: calls.append(raw),
)
server._sync_agent_model_with_config("sid", session)
assert calls == ["new/model"]
def test_config_sync_skips_session_pinned_by_model_command(monkeypatch):
_patch_config_model(monkeypatch, "new/model")
session = _sync_test_session(