fix(codex-link): keep subscription models untouched, append bridge models after them
sirala_codex re-sorted the whole list and rewrote every priority, which pushed the native subscription models to the bottom and put same-named AITURK copies (GPT-6-Astra) above them. Native models now keep their own order, priority and name; bridge models are appended after them and a copy that shares a native name is shown with an (AITURK) suffix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8ee676d7c6
commit
ce49d6d1cc
2 files changed
+40
-8
No files matched your search
@@ -55,8 +55,26 @@ class MemberCatalog(unittest.TestCase):
|
||||
for m in models if m["slug"].startswith("ide/")]
|
||||
c.sirala_codex(models, extras)
|
||||
self.assertEqual([m["slug"] for m in models],
|
||||
["ide/A-Team", "ide/Z-Team", "ide/bekci-kurnaz", "ide/9router-cc-opus", "gpt-z"])
|
||||
self.assertEqual([m["priority"] for m in models], list(range(5)))
|
||||
["gpt-z", "ide/A-Team", "ide/Z-Team", "ide/bekci-kurnaz", "ide/9router-cc-opus"])
|
||||
self.assertEqual([m["priority"] for m in models], [1, 2, 3, 4, 5])
|
||||
|
||||
def test_subscription_models_keep_their_own_order_priority_and_name(self):
|
||||
models = [{"slug": "ide/GPT-6-Astra", "display_name": "GPT-6-Astra", "priority": 3},
|
||||
{"slug": "gpt-6-astra", "display_name": "GPT-6-Astra", "priority": 2},
|
||||
{"slug": "ide/A-Team", "display_name": "A-Team", "priority": 0},
|
||||
{"slug": "gpt-6.1-sol", "display_name": "GPT-6.1-Sol", "priority": 1},
|
||||
{"slug": "codex-auto-review", "display_name": "Codex Auto Review", "priority": 43}]
|
||||
models.append({"slug": "ide/GPT-6-1-Sol", "display_name": "GPT-6-1-Sol", "priority": 2})
|
||||
extras = [{"slug": "ide/GPT-6-Astra", "kind": "combo"}, {"slug": "ide/A-Team", "kind": "combo"},
|
||||
{"slug": "ide/GPT-6-1-Sol", "kind": "combo"}]
|
||||
originals = [dict(m) for m in models if not m["slug"].startswith("ide/")]
|
||||
c.sirala_codex(models, extras)
|
||||
self.assertEqual([m for m in models if not m["slug"].startswith("ide/")], originals)
|
||||
self.assertEqual([m["slug"] for m in models],
|
||||
["gpt-6-astra", "gpt-6.1-sol", "codex-auto-review", "ide/A-Team", "ide/GPT-6-1-Sol",
|
||||
"ide/GPT-6-Astra"])
|
||||
self.assertEqual([m["priority"] for m in models[3:]], [44, 45, 46])
|
||||
self.assertEqual([m["display_name"] for m in models[4:]], ["GPT-6-1-Sol (AITURK)", "GPT-6-Astra (AITURK)"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in new issue
Block a user