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