Accept provider-prefixed model selection

This commit is contained in:
武阳
2026-05-08 11:59:46 +08:00
parent c8ea2bad6d
commit 12abc57fa7
2 changed files with 14 additions and 1 deletions
+10
View File
@@ -71,6 +71,16 @@ class GuiServerTests(unittest.TestCase):
self.assertTrue(data['allow_shell'])
self.assertEqual(data['model'], 'other-model')
def test_state_update_accepts_provider_prefixed_model(self) -> None:
with tempfile.TemporaryDirectory() as d:
client, _ = _build_client(Path(d))
updated = client.post(
'/api/state',
json={'model': 'azure_openai/gpt-4o-mini'},
)
self.assertEqual(updated.status_code, 200)
self.assertEqual(updated.json()['model'], 'azure_openai/gpt-4o-mini')
def test_state_snapshot_can_scope_to_account(self) -> None:
with tempfile.TemporaryDirectory() as d:
client, _ = _build_client(Path(d))