From 0fa203ae84d258b3be1dceeb06e8d8b39c2bb957 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Tue, 20 Oct 2026 02:45:44 -0700 Subject: [PATCH] Expose disabled reasoning through the provider schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- service/local-ai/gateway.py | 13 +++---------- service/local-ai/test_gateway.py | 6 +++--- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/service/local-ai/gateway.py b/service/local-ai/gateway.py index 928c0d9a74acac9c465967a5bb380403ca73e7f7..09ed0b3e9864543ccc2aa659cf502a7c121b2b72 100644 --- a/service/local-ai/gateway.py +++ b/service/local-ai/gateway.py @@ -26,9 +26,6 @@ def agent_provider(): models = [] for entry in catalog: model = {**base, **entry} - reasoning = {"summaries": model["supports_reasoning_summary_parameter"]} - if model["default_reasoning_level"] != "none": - reasoning.update(levels=model["supported_reasoning_levels"], default=model["default_reasoning_level"]) models.append({ "id": model["slug"], "name": model["display_name"], "description": model["description"], "hidden": model["visibility"] != "list", @@ -36,17 +33,13 @@ def agent_provider(): "effectiveContextWindowPercent": model["effective_context_window_percent"], "autoCompactTokenLimit": model["auto_compact_token_limit"], "inputModalities": model["input_modalities"], - "reasoning": reasoning, + "reasoning": {"levels": model["supported_reasoning_levels"], + "default": model["default_reasoning_level"], + "summaries": model["supports_reasoning_summary_parameter"]}, "tools": {"applyPatch": model["apply_patch_tool_type"], "shell": model["shell_type"], "webSearch": model["supports_search_tool"], "mode": model["tool_mode"]}, "truncation": model["truncation_policy"], "verbosity": model["support_verbosity"], }) - if model["default_reasoning_level"] == "none": - # The discovery effort enum excludes the harness's "none" value. - models[-1]["harnessOverrides"] = {"codex": {"catalogEntry": { - "default_reasoning_level": "none", - "supported_reasoning_levels": model["supported_reasoning_levels"], - }}} return { "version": 1, "name": "Snow Globe", "icon": {"emoji": "❄️", "color": "teal"}, "harness": "codex", "harnesses": ["codex", "claude"], diff --git a/service/local-ai/test_gateway.py b/service/local-ai/test_gateway.py index bbc254ead9e7eea1ff6bd4bb0fbd6b6b0921dfcb..0437338c72d28fb8a9c44b83e494bdb06075be77 100644 --- a/service/local-ai/test_gateway.py +++ b/service/local-ai/test_gateway.py @@ -52,9 +52,9 @@ class ResponsesCompatibility(unittest.TestCase): self.assertEqual(model["inputModalities"], ["text", "image"]) self.assertEqual([level["effort"] for level in provider["models"][0]["reasoning"]["levels"]], ["low", "medium", "xhigh"]) for model in provider["models"][1:]: - self.assertNotIn("default", model["reasoning"]) - self.assertNotIn("levels", model["reasoning"]) - self.assertEqual(model["harnessOverrides"]["codex"]["catalogEntry"]["default_reasoning_level"], "none") + self.assertEqual(model["reasoning"]["default"], "none") + self.assertEqual(model["reasoning"]["levels"], [{"effort": "none", "description": "No reasoning"}]) + self.assertNotIn("harnessOverrides", model) def test_unsupported_inference_routes_never_reach_backend(self): server = ThreadingHTTPServer(("127.0.0.1", 0), Handler) -- 2.54.1