Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(agents): let a keyless local provider be chosen as the worker
rubenluetke10-beep5cfa1dc3cc9b
diff --git a/jarvis/ui/web/frontend/src/components/JarvisAgentSection.tsx b/jarvis/ui/web/frontend/src/components/JarvisAgentSection.tsxindex f33d55ef7a..c338f06c67 100644--- a/jarvis/ui/web/frontend/src/components/JarvisAgentSection.tsx+++ b/jarvis/ui/web/frontend/src/components/JarvisAgentSection.tsx@@ -58,6 +58,13 @@ interface SubagentMappingRow {dashboard_url: string | null;credential_help: string | null;is_active_brain: boolean;+ /** Runs on the user's own hardware and has no credential at all. Such a card+ * is ready the moment it exists — asking it for a key locked a local-only+ * install out of picking any worker. */+ keyless?: boolean;+ /** The card's own display name from the provider spec, so the picker stops+ * showing raw ids ("local-openai") next to proper labels ("xAI Grok"). */+ label?: string | null;/** How this subagent is billed — "api" (per token) / "subscription" /* "subscription_or_api". Drives the billing badge so the API-vs-subscription* distinction is visible right on the subagent cards. */@@ -1353,7 +1360,7 @@ function SubagentProviderCard({row: SubagentMappingRow;onSwitched: () => void | Promise<void>;}) {- const label = PROVIDER_LABELS[row.jarvis] ?? row.jarvis;+ const label = row.label ?? PROVIDER_LABELS[row.jarvis] ?? row.jarvis;const brand = useAgentBrand();const { activating, activate } = useSubagentActivate(row, onSwitched);@@ -1387,17 +1394,21 @@ function SubagentProviderCard({? `Activate this ${brand} provider`: "Set an API key first"}+ // A keyless card has no key to wait for: it is ready as soon as it is+ // listed, and every credential line below has to say so.badge={<StatusPillstate={row.is_active_brain ? "active" : row.key_set ? "ready" : "open"}/>}subtitle={- row.dedicated_key_set- ? `Dedicated ${brand} key configured`- : row.shared_key_set- ? "Using the shared Brain key as a compatibility fallback"- : `Set a dedicated key for this ${brand}`+ row.keyless+ ? "Runs on this machine — no key needed"+ : row.dedicated_key_set+ ? `Dedicated ${brand} key configured`+ : row.shared_key_set+ ? "Using the shared Brain key as a compatibility fallback"+ : `Set a dedicated key for this ${brand}`}warning={<div className="space-y-2" data-agent-card-control>@@ -1410,6 +1421,11 @@ function SubagentProviderCard({onChanged={onSwitched}/>)}+ {row.keyless && row.credential_help && (+ <p className="text-[11px] leading-snug text-muted-foreground">+ {row.credential_help}+ </p>+ )}{!row.key_set && (<CardHint icon={Lock}>Locked — save a dedicated <strong>{label}</strong> key on this card.diff --git a/jarvis/ui/web/server.py b/jarvis/ui/web/server.pyindex 7bbe2f190f..86c0f242b5 100644--- a/jarvis/ui/web/server.py+++ b/jarvis/ui/web/server.py@@ -1095,15 +1095,25 @@ class WebServer:except Exception: # noqa: BLE001oauth_connected = Falseoauth_stale = False+ spec = get_spec(mapping.jarvis)+ # A keyless local provider has nothing to save, so every+ # credential question below has to answer differently for it.+ # Without this the card demanded "save a dedicated ollama key+ # on this card", offered a field for a key that does not exist,+ # and refused activation — a local-only install could pick no+ # worker at all. Read off the card's own auth mode, never a+ # provider name (AP-21).+ keyless = bool(spec and spec.auth_mode == "none")# claude-api is dual-billed like Codex/Antigravity: the Claude Max# subscription (claude CLI OAuth login) OR an Anthropic API key.# Every other MAPPINGS provider bills per token on an API account.row_billing = (- "subscription_or_api"+ "local"+ if keyless+ else "subscription_or_api"if mapping.jarvis == "claude-api"else "api")- spec = get_spec(mapping.jarvis)credential_source = ("dedicated"if dedicated_key_set@@ -1119,17 +1129,33 @@ class WebServer:"worker_slug": mapping.worker_slug,"env_var": mapping.env_var,"env_fallback": mapping.env_fallback,- "key_set": api_key_set or oauth_connected or oauth_stale,+ # Readiness, not credential presence: a keyless card is+ # ready the moment it exists, and gating it on a key it+ # never has locked it out of the picker entirely.+ "key_set": (+ True+ if keyless+ else api_key_set or oauth_connected or oauth_stale+ ),"api_key_set": api_key_set,"dedicated_key_set": dedicated_key_set,"shared_key_set": shared_key_set,"oauth_connected": oauth_connected,"oauth_stale": oauth_stale,- "credential_source": credential_source,- "secret_key": secret_key,+ "credential_source": "none" if keyless else credential_source,+ # No key field on a card with no key slot.+ "secret_key": None if keyless else secret_key,+ "keyless": keyless,+ # The card's own name, so the picker stops showing raw+ # ids like "local-openai" next to "xAI Grok".+ "label": spec.label if spec else mapping.jarvis,"dashboard_url": spec.dashboard_url if spec else None,"credential_help": (- f"Dedicated {brand} key for {spec.label}. "+ f"Runs on your own hardware — no key, nothing leaves "+ f"this machine. Configure its server on the "+ f"{spec.label} card under Brain."+ if keyless and spec+ else f"Dedicated {brand} key for {spec.label}. ""It is not used by Brain or Realtime."if specelse f"Dedicated {brand} API key."diff --git a/tests/integration/test_jarvis_agent_keyless_providers.py b/tests/integration/test_jarvis_agent_keyless_providers.pynew file mode 100644index 0000000000..e91ea03638--- /dev/null+++ b/tests/integration/test_jarvis_agent_keyless_providers.py@@ -0,0 +1,105 @@+"""A keyless local provider must be selectable as the heavy-task worker.++Field report 2026-08-05: the Agents section rendered Ollama and the generic+local server as API-key cards — "Locked — save a dedicated ollama key on this+card", a key field for a key that does not exist, and a warning toast instead+of an activation. Nothing on those cards can ever be satisfied, so an install+with no cloud credential could pick NO worker at all: the one tier where the+local-first promise had to hold was the one that refused it.++The row is what the card renders from, so the fix belongs here: readiness for a+keyless card is "it exists", not "a key is stored". The switch itself was never+the problem — ``is_credential_present`` returns True for auth_mode "none" — so+these tests pin the payload that decides whether the user can even try.+"""++from __future__ import annotations++from typing import Any++import pytest+from fastapi.testclient import TestClient++from jarvis.core.bus import EventBus+from jarvis.core.config import load_config+from jarvis.ui.web.provider_spec import get_spec+from jarvis.ui.web.server import WebServer++#: Every keyless provider the Agents section offers. Derived from the same+#: mapping table the section renders, so a keyless provider added later is+#: covered without touching this file.+KEYLESS_AGENT_PROVIDERS: tuple[str, ...] = tuple(+ m.jarvis+ for m in __import__(+ "jarvis.missions.worker_runtime.provider_map", fromlist=["MAPPINGS"]+ ).MAPPINGS+ if (spec := get_spec(m.jarvis)) is not None and spec.auth_mode == "none"+)+++def _rows() -> dict[str, dict[str, Any]]:+ ws = WebServer(bus=EventBus(), cfg=load_config())+ with TestClient(ws.app) as client:+ resp = client.get("/api/jarvis-agent/status")+ assert resp.status_code == 200+ return {row["jarvis"]: row for row in resp.json()["mapping"]}+++def test_the_section_offers_at_least_one_keyless_worker() -> None:+ assert KEYLESS_AGENT_PROVIDERS, (+ "No keyless provider is offered as a heavy-task worker, so an install "+ "with no cloud credential cannot run missions at all."+ )++[email protected]("provider_id", KEYLESS_AGENT_PROVIDERS)+def test_a_keyless_worker_is_ready_without_a_key(provider_id: str) -> None:+ """``key_set`` is the readiness decision the card gates activation on."""+ row = _rows()[provider_id]+ assert row["key_set"] is True+ assert row["keyless"] is True++[email protected]("provider_id", KEYLESS_AGENT_PROVIDERS)+def test_a_keyless_worker_offers_no_key_field(provider_id: str) -> None:+ """A field for a credential that does not exist is an invitation to fail."""+ row = _rows()[provider_id]+ assert row["secret_key"] is None+ assert row["credential_source"] == "none"++[email protected]("provider_id", KEYLESS_AGENT_PROVIDERS)+def test_a_keyless_worker_is_billed_as_local(provider_id: str) -> None:+ """The badge said "API key · billed per token" over a provider that bills+ nothing and needs no account."""+ row = _rows()[provider_id]+ assert row["billing"] == "local"++[email protected]("provider_id", KEYLESS_AGENT_PROVIDERS)+def test_a_keyless_worker_shows_its_real_name(provider_id: str) -> None:+ """The picker showed raw ids ("local-openai") beside proper labels."""+ row = _rows()[provider_id]+ spec = get_spec(provider_id)+ assert spec is not None+ assert row["label"] == spec.label+ assert row["label"] != provider_id+++def test_keyed_workers_keep_their_key_gate() -> None:+ """The fix must not hand every card a free pass: a provider that really+ does need a credential still reports honestly."""+ rows = _rows()+ keyed = [+ pid+ for pid, row in rows.items()+ if not row.get("keyless") and (spec := get_spec(pid)) and spec.auth_mode == "api_key"+ ]+ assert keyed, "no keyed provider left to compare against"+ for pid in keyed:+ row = rows[pid]+ assert row["billing"] != "local"+ # Readiness still follows the stored credential, whatever it is here.+ assert row["key_set"] == (+ row["api_key_set"] or row["oauth_connected"] or row.get("oauth_stale", False)+ )