Private
Public Access
0
0

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
This commit is contained in:
2026-06-11 20:50:13 -04:00
parent 25baa6fe25
commit 49d516042e
+9
View File
@@ -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)):