auto-git:

[change] concept_api.py
This commit is contained in:
2026-05-08 04:20:30 +02:00
parent 5913bc4832
commit 41f123c355

View File

@@ -1163,7 +1163,10 @@ def save_settings(settings: Dict[str, str]) -> None:
def list_models() -> List[str]:
try:
res = subprocess.run(["ollama", "list"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, timeout=8)
ollama = resolve_command("ollama")
if not ollama:
return []
res = subprocess.run([ollama, "list"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, timeout=8, env=subprocess_env())
if res.returncode != 0:
return []
lines = [ln.strip() for ln in (res.stdout or "").splitlines()]