aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--assistant.py7
-rw-r--r--docs/superpowers/specs/2026-10-23-cloud-models-design.md4
2 files changed, 8 insertions, 3 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="")
diff --git a/docs/superpowers/specs/2026-10-23-cloud-models-design.md b/docs/superpowers/specs/2026-10-23-cloud-models-design.md
index d2270af..fe5d007 100644
--- a/docs/superpowers/specs/2026-10-23-cloud-models-design.md
+++ b/docs/superpowers/specs/2026-10-23-cloud-models-design.md
@@ -95,7 +95,9 @@ ids contain `/` and sometimes `:` (OpenRouter's `:free`).
model.
- **`models` command.** Answers with the router's models (id, status)
plus every configured cloud model, each with `cloud: true|false` and,
- for cloud, its provider name. Feeds the dropdown.
+ for cloud, its provider name. Feeds the dropdown. A local item is
+ `{id, status, cloud: false, inputs}`, `inputs` being the router's
+ `architecture.input_modalities` or null when not reported.
- **`--cloud-models <name>`.** CLI mode: reads `config.toml`, runs that
provider's `key_cmd`, prints the provider's `/models` ids as JSON, one
array, sorted, and exits. The settings page runs it to fetch the list,