diff --git a/cptr/utils/agents/detection.py b/cptr/utils/agents/detection.py
index 24c911a0..318c45eb 100644
--- a/cptr/utils/agents/detection.py
+++ b/cptr/utils/agents/detection.py
@@ -184,6 +184,14 @@ async def detect_profile(profile: dict[str, Any]) -> AgentDetection:
if profile.get("agent") == "pi":
models = await _probe_pi_models(command, profile)
+ if models is None:
+ return AgentDetection(
+ "error",
+ command,
+ version,
+ "Pi RPC is unavailable; the resolved command may not be Pi.",
+ [],
+ )
if not models:
return AgentDetection(
"auth_unknown",
@@ -277,7 +285,7 @@ async def _probe_pi_models(command: str, profile: dict[str, Any]) -> list[str] |
provider, model = item.get("provider"), item.get("id")
if isinstance(provider, str) and provider and isinstance(model, str) and model:
models.append(f"{provider}/{model}")
- return models or None
+ return models
except Exception:
return None
finally:
@@ -527,7 +535,7 @@ async def get_agent_status(app_state=None, refresh: bool = False) -> dict[str, A
candidates = profiles if not implicit_defaults else default_agent_profiles()
for profile in candidates:
detected = await detect_profile(profile)
- if implicit_defaults and detected.status == "not_found":
+ if implicit_defaults and detected.status in {"not_found", "error"}:
continue
mode = profile.get("mode", "auto")
models = detected.models or profile.get("models") or []
diff --git a/pyproject.toml b/pyproject.toml
index 290b02a2..17f686fb 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "cptr"
-version = "0.9.2"
+version = "0.9.3"
description = "Your computer, from anywhere. Code, manage, and control your machine from the web."
license = {file = "LICENSE"}
readme = "README.md"
diff --git a/uv.lock b/uv.lock
index f780b396..d5ecf6ed 100644
--- a/uv.lock
+++ b/uv.lock
@@ -284,7 +284,7 @@ wheels = [
[[package]]
name = "cptr"
-version = "0.9.2"
+version = "0.9.3"
source = { editable = "." }
dependencies = [
{ name = "aiosqlite" },