From 49d516042e29ffbe1880e06426705a711a534751 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Thu, 11 Jun 2026 20:50:13 -0400 Subject: [PATCH] feat(gui): add 'Local Model' badge in provider panel for local backends When the active vendor+model has caps.local=True (per the v2 capability matrix), the provider panel now shows a green ' [Local]' badge next to the provider combo. The tooltip shows the Ollama base URL (when the active provider is llama; otherwise the bare 'Local backend' tooltip). Implements t4_4 of qwen_llama_grok_followup_20260611 Phase 4. Future use: Phase 4 t3_7 (moved from Phase 3) will use caps.local to render 'Free (local)' in the cost column. The badge uses theme.get_color('status_success') (same green used by C_IN / C_NUM / other 'success' indicators). Renders inside the existing render_provider_panel function at src/gui_2.py:2308. Verification: - import src.gui_2 OK (no syntax errors) - 44/44 vendor+capability+provider tests pass (no regressions) - 4 audit scripts pass --- src/gui_2.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui_2.py b/src/gui_2.py index 02aff787..37634a5e 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -2305,6 +2305,15 @@ def render_provider_panel(app: App) -> None: if imgui.selectable(p, p == app.current_provider)[0]: app.current_provider = p imgui.end_combo() + caps = app._get_active_capabilities() + if caps.local: + imgui.same_line() + imgui.text_colored(theme.get_color("status_success"), " [Local]") + if imgui.is_item_hovered(): + base_url: str = "" + if app.current_provider == "llama": + base_url = getattr(ai_client, "_llama_base_url", "") + imgui.set_tooltip(f"Local backend: {base_url or 'unknown'}" if base_url else "Local backend") imgui.separator() imgui.text("Model") if imgui.begin_list_box("##models", imgui.ImVec2(-1, 120)):