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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user