fix(setup): correct LM Studio loaded state value to "loaded" not "loaded_instance"

Querying the live /api/v0/models endpoint shows LM Studio uses state="loaded"
for in-memory models (not "loaded_instance"), so the filter never matched.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
curo1305andClaude Sonnet 4.6 committed 2026-05-19 15:00:01 +02:00
1 parent 40aa934431
commit 0e052c4992
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -391,7 +391,7 @@ def fetch_loaded_models(provider: Provider) -> list[str]:
resp.raise_for_status()
return [
m["id"] for m in resp.json().get("data", [])
if m.get("state") == "loaded_instance"
if m.get("state") == "loaded"
]
else: # llamacpp — /models returns only the active loaded model
resp = httpx.get(f"{provider.base_url}/models", timeout=3.0)
@@ -427,7 +427,7 @@ def _fetch_local_models(provider: Provider) -> list[str]:
resp.raise_for_status()
return [
m["id"] for m in resp.json().get("data", [])
if m.get("state") == "loaded_instance"
if m.get("state") == "loaded"
]
else:
resp = httpx.get(f"{provider.base_url}/models", timeout=3.0)