From 13a7def080ee2898ae801f0bce430d69a35c3928 Mon Sep 17 00:00:00 2001 From: Neil Bantoc Date: Mon, 2 Nov 2026 23:52:31 -0800 Subject: [PATCH] opencode: label models with the catalog title, not the slug /models showed "qwen3.8-27b (Local)" where the catalog already has a name meant for reading: "Qwen3.8 27B". The dict key stays the slug -- that is the model id the API answers to -- so only the display name changes. Co-Authored-By: Claude Opus 5 (1M context) --- llmhost/opencode.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llmhost/opencode.py b/llmhost/opencode.py index 7517731..6f396bd 100644 --- a/llmhost/opencode.py +++ b/llmhost/opencode.py @@ -74,7 +74,9 @@ def key_ref(key_path): def provider_block(cfg, host, key_path, label): models = {} for m in cfg["models"]: - entry = {"name": f"{m['name']} ({label})", "tool_call": True, + # Key by the slug -- that's the model id the API answers to -- but show the + # catalog's title, which is what reads well in opencode's /models list. + entry = {"name": f"{m.get('title') or m['name']} ({label})", "tool_call": True, "limit": {"context": m["est_context"], "output": min(65536, m["est_context"] // 2)}} if m.get("reasoning"): entry["reasoning"] = True