Add GPT-5.5 Pro preset
Some checks failed
ci / test (push) Has been cancelled

This commit is contained in:
2026-05-21 20:18:30 +01:00
parent 85bdb27a08
commit cbd4da272b
5 changed files with 35 additions and 7 deletions

View File

@@ -2,7 +2,12 @@ from __future__ import annotations
import unittest
from chatmock.model_registry import allowed_efforts_for_model, list_public_models, normalize_model_name
from chatmock.model_registry import (
allowed_efforts_for_model,
extract_reasoning_from_model_name,
list_public_models,
normalize_model_name,
)
class ModelRegistryTests(unittest.TestCase):
@@ -11,6 +16,7 @@ class ModelRegistryTests(unittest.TestCase):
self.assertEqual(normalize_model_name("gpt5.4"), "gpt-5.4")
self.assertEqual(normalize_model_name("gpt5.4-mini"), "gpt-5.4-mini")
self.assertEqual(normalize_model_name("gpt5.5"), "gpt-5.5")
self.assertEqual(normalize_model_name("gpt-5.5-pro"), "gpt-5.5")
self.assertEqual(normalize_model_name("gpt5.3-codex-spark"), "gpt-5.3-codex-spark")
self.assertEqual(normalize_model_name("codex"), "codex-mini-latest")
@@ -24,13 +30,19 @@ class ModelRegistryTests(unittest.TestCase):
def test_allowed_efforts_follow_registry(self) -> None:
self.assertEqual(allowed_efforts_for_model("gpt-5.5"), frozenset(("none", "low", "medium", "high", "xhigh")))
self.assertEqual(allowed_efforts_for_model("gpt-5.5-pro"), frozenset(("none", "low", "medium", "high", "xhigh")))
self.assertEqual(allowed_efforts_for_model("gpt-5.4"), frozenset(("none", "low", "medium", "high", "xhigh")))
self.assertEqual(allowed_efforts_for_model("gpt-5.4-mini"), frozenset(("low", "medium", "high", "xhigh")))
self.assertEqual(allowed_efforts_for_model("gpt-5.1-codex"), frozenset(("low", "medium", "high")))
def test_pro_preset_uses_xhigh_reasoning(self) -> None:
self.assertEqual(extract_reasoning_from_model_name("gpt-5.5-pro"), {"effort": "xhigh"})
self.assertEqual(extract_reasoning_from_model_name("gpt-5.5-pro-low"), {"effort": "low"})
def test_public_models_include_variants(self) -> None:
model_ids = list_public_models(expose_reasoning_models=True)
self.assertIn("gpt-5.5", model_ids)
self.assertIn("gpt-5.5-pro", model_ids)
self.assertIn("gpt-5.4", model_ids)
self.assertIn("gpt-5.4-mini", model_ids)
self.assertIn("gpt-5.3-codex-spark", model_ids)