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) <noreply@anthropic.com>
This commit is contained in:
parent
504ea3018a
commit
13a7def080
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue