From 19d6f004ed14e306962afe866eecf6977826cb64 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Sat, 9 May 2026 21:44:20 -0400 Subject: [PATCH] feat: reasoning level select (Off/Light/Moderate/High/Max) Replace free-form reasoning_budget_tokens number input with a 5-level select in both the edit form (local_llm.py) and add-model form (local_llm.html). Values: 0 / 1024 / 4096 / 8192 / 32768 tokens. Edit form pre-selects the stored value. Co-Authored-By: Claude Sonnet 4.6 --- cortex/routers/local_llm.py | 13 ++++++++++--- cortex/static/local_llm.html | 11 +++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/cortex/routers/local_llm.py b/cortex/routers/local_llm.py index 3d853e0..bf25807 100644 --- a/cortex/routers/local_llm.py +++ b/cortex/routers/local_llm.py @@ -211,6 +211,11 @@ def _render(username: str, success: str = "", error: str = "") -> str: cur_tools = m.get("tools", True) cur_tags = ", ".join(m.get("tags") or []) cur_reasoning_budget = m.get("reasoning_budget_tokens") or 0 + _rb_levels = [(0, "Off — Non-think"), (1024, "Light"), (4096, "Moderate"), (8192, "High"), (32768, "Max")] + reasoning_opts = "".join( + f'' + for v, lbl in _rb_levels + ) model_rows += f'''
@@ -258,9 +263,11 @@ def _render(username: str, success: str = "", error: str = "") -> str: title="Per-model tool loop cap. 0 = use the global default (orchestrator_max_rounds).">
- - + +
diff --git a/cortex/static/local_llm.html b/cortex/static/local_llm.html index f553d70..bc64fd6 100644 --- a/cortex/static/local_llm.html +++ b/cortex/static/local_llm.html @@ -503,6 +503,17 @@
+
+ + +