aboutsummaryrefslogtreecommitdiffstats
path: root/assistant.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-10 12:15:35 +0100
committerDanilo M. <danix@danix.xyz>2026-11-10 12:15:35 +0100
commitf772ed8bb97cfae73bcffc8323e803599d3460ac (patch)
tree6c330143f750bde7cbd4312c38a88550bf30d44b /assistant.py
parent00602b3ad7d613a1f575d1e5395406eb6b319c1d (diff)
downloaddesktop-assistant-f772ed8bb97cfae73bcffc8323e803599d3460ac.tar.gz
desktop-assistant-f772ed8bb97cfae73bcffc8323e803599d3460ac.zip
feat: models event reports each local model's inputs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'assistant.py')
-rw-r--r--assistant.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/assistant.py b/assistant.py
index fa8aee0..a7f1e71 100644
--- a/assistant.py
+++ b/assistant.py
@@ -872,7 +872,10 @@ def send_models():
PROVIDERS.update(load_providers([p for p in CFG["cloud"] if p["name"] not in PROVIDERS]))
try:
with urllib.request.urlopen(CFG["llm"] + "/models", timeout=10) as r:
- local = [{"id": m["id"], "status": m["status"]["value"], "cloud": False}
+ # inputs as model_inputs() reads them, so a client can grey out
+ # a mic for a model that cannot hear; None when not reported.
+ local = [{"id": m["id"], "status": m["status"]["value"], "cloud": False,
+ "inputs": (m.get("architecture") or {}).get("input_modalities")}
for m in json.load(r)["data"]]
except (OSError, KeyError, TypeError, ValueError):
local = [] # router down: the cloud ones still show
@@ -2005,7 +2008,7 @@ def test():
# whose key loaded.
send(type="models")
items = until("models")[-1]["items"]
- assert {"id": "m", "status": "loaded", "cloud": False} in items
+ assert {"id": "m", "status": "loaded", "cloud": False, "inputs": ["text", "image"]} in items
assert {"id": "fake:vendor/x:free", "provider": "fake", "cloud": True} in items
assert not [i for i in items if i["id"].startswith("broken:")]
send(type="ask", text="x", model="")