From f281581354364ed86ed8deea67de222c7b5ed934 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Wed, 29 Jul 2026 01:31:24 +0000 Subject: [PATCH] Point the parallel-slots contract at the shared config signature main added nParallel to sidebar-model-config.tsx's own configSignature while this branch moved that helper into config-signature.ts so the hub, the sidebar and the model config page key one editor instance the same way. The behaviour is unchanged, so the assertion follows the expression to where it now lives and pins the sidebar to the shared key. --- tests/studio/test_model_picker_contracts.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/studio/test_model_picker_contracts.py b/tests/studio/test_model_picker_contracts.py index 9b4ba27397..45a90fad8d 100644 --- a/tests/studio/test_model_picker_contracts.py +++ b/tests/studio/test_model_picker_contracts.py @@ -684,9 +684,15 @@ def test_parallel_slots_setting_wired_end_to_end(): # the control would pin a blank "server default" to a number. assert "loadedNParallel: status.requested_parallel_slots," in status assert "nParallel: status.requested_parallel_slots," not in status - sidebar = _read("features/model-picker/components/sidebar-model-config.tsx") - # The sidebar form remounts when an external change lands. - assert 'config.nParallel ?? "",' in sidebar + # The sidebar form remounts when an external change lands. The signature it + # keys on is shared with the hub and the model config page now, so the slot + # count has to be in that one definition rather than the sidebar's own copy. + signature = _read("features/model-picker/model-config/config-signature.ts") + assert 'config.nParallel ?? "",' in signature + sidebar = " ".join( + _read("features/model-picker/components/sidebar-model-config.tsx").split() + ) + assert "key={modelConfigInstanceKey(modelId, ggufVariant, loadedConfig)}" in sidebar def test_parallel_slots_control_cleared_when_the_load_never_sent_them():