authoravatarclover caruso<git@paperclover.net>2026-10-20 02:45:44-07:00
committeravatarclover caruso<git@paperclover.net>2026-10-21 02:52:29-07:00
log0fa203ae84d258b3be1dceeb06e8d8b39c2bb957
tree0ddfeda3e535229b2d1e5c2cf8b61d6a785faa4d
parente8cd1a11eb7145e44b519fac430b643512b4a52b
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU

Expose disabled reasoning through the provider schema

Use the revised schema’s none effort for Golden Gate and Owl directly from the catalog. Remove the Codex escape hatch and its special-case branch. Verified gateway tests and schema constraints, with an isolated browser preview. Assisted-by: gpt-6.1-sol

2 files changed, 6 insertions(+), 13 deletions(-)

service/local-ai/gateway.py+3-10
...@@ -26,9 +26,6 @@ def agent_provider():...@@ -26,9 +26,6 @@ def agent_provider():
26 models = []26 models = []
27 for entry in catalog:27 for entry in catalog:
28 model = {**base, **entry}28 model = {**base, **entry}
29 reasoning = {"summaries": model["supports_reasoning_summary_parameter"]}
30 if model["default_reasoning_level"] != "none":
31 reasoning.update(levels=model["supported_reasoning_levels"], default=model["default_reasoning_level"])
32 models.append({29 models.append({
33 "id": model["slug"], "name": model["display_name"], "description": model["description"],30 "id": model["slug"], "name": model["display_name"], "description": model["description"],
34 "hidden": model["visibility"] != "list",31 "hidden": model["visibility"] != "list",
...@@ -36,17 +33,13 @@ def agent_provider():...@@ -36,17 +33,13 @@ def agent_provider():
36 "effectiveContextWindowPercent": model["effective_context_window_percent"],33 "effectiveContextWindowPercent": model["effective_context_window_percent"],
37 "autoCompactTokenLimit": model["auto_compact_token_limit"],34 "autoCompactTokenLimit": model["auto_compact_token_limit"],
38 "inputModalities": model["input_modalities"],35 "inputModalities": model["input_modalities"],
39 "reasoning": reasoning,36 "reasoning": {"levels": model["supported_reasoning_levels"],
37 "default": model["default_reasoning_level"],
38 "summaries": model["supports_reasoning_summary_parameter"]},
40 "tools": {"applyPatch": model["apply_patch_tool_type"], "shell": model["shell_type"],39 "tools": {"applyPatch": model["apply_patch_tool_type"], "shell": model["shell_type"],
41 "webSearch": model["supports_search_tool"], "mode": model["tool_mode"]},40 "webSearch": model["supports_search_tool"], "mode": model["tool_mode"]},
42 "truncation": model["truncation_policy"], "verbosity": model["support_verbosity"],41 "truncation": model["truncation_policy"], "verbosity": model["support_verbosity"],
43 })42 })
44 if model["default_reasoning_level"] == "none":
45 # The discovery effort enum excludes the harness's "none" value.
46 models[-1]["harnessOverrides"] = {"codex": {"catalogEntry": {
47 "default_reasoning_level": "none",
48 "supported_reasoning_levels": model["supported_reasoning_levels"],
49 }}}
50 return {43 return {
51 "version": 1, "name": "Snow Globe", "icon": {"emoji": "❄️", "color": "teal"},44 "version": 1, "name": "Snow Globe", "icon": {"emoji": "❄️", "color": "teal"},
52 "harness": "codex", "harnesses": ["codex", "claude"],45 "harness": "codex", "harnesses": ["codex", "claude"],
service/local-ai/test_gateway.py+3-3
...@@ -52,9 +52,9 @@ class ResponsesCompatibility(unittest.TestCase):...@@ -52,9 +52,9 @@ class ResponsesCompatibility(unittest.TestCase):
52 self.assertEqual(model["inputModalities"], ["text", "image"])52 self.assertEqual(model["inputModalities"], ["text", "image"])
53 self.assertEqual([level["effort"] for level in provider["models"][0]["reasoning"]["levels"]], ["low", "medium", "xhigh"])53 self.assertEqual([level["effort"] for level in provider["models"][0]["reasoning"]["levels"]], ["low", "medium", "xhigh"])
54 for model in provider["models"][1:]:54 for model in provider["models"][1:]:
55 self.assertNotIn("default", model["reasoning"])55 self.assertEqual(model["reasoning"]["default"], "none")
56 self.assertNotIn("levels", model["reasoning"])56 self.assertEqual(model["reasoning"]["levels"], [{"effort": "none", "description": "No reasoning"}])
57 self.assertEqual(model["harnessOverrides"]["codex"]["catalogEntry"]["default_reasoning_level"], "none")57 self.assertNotIn("harnessOverrides", model)
5858
59 def test_unsupported_inference_routes_never_reach_backend(self):59 def test_unsupported_inference_routes_never_reach_backend(self):
60 server = ThreadingHTTPServer(("127.0.0.1", 0), Handler)60 server = ThreadingHTTPServer(("127.0.0.1", 0), Handler)