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(browser): report unsupported model connections without paid fallback
rubenluetke10-beep2890f27c246a
diff --git a/jarvis/society/browser/bridge.py b/jarvis/society/browser/bridge.pyindex 7281a3a219..531aac1e3c 100644--- a/jarvis/society/browser/bridge.py+++ b/jarvis/society/browser/bridge.py@@ -108,8 +108,18 @@ async def execute_live(provider = caller.provider or _default_provider(runtime)key = get_jarvis_agent_secret(provider)overrides = {provider: key} if key else {}- with override_provider_secrets(overrides):- brain = await asyncio.to_thread(live.model_resolver, caller)+ try:+ with override_provider_secrets(overrides):+ brain = await asyncio.to_thread(live.model_resolver, caller)+ except LookupError:+ # A chat-only CLI can be connected without an inference implementation.+ # Do not silently move its browser work to an API-billed provider.+ return ToolResult(+ False,+ None,+ "This agent's selected model connection cannot currently drive the browser. "+ "Choose another connected model in its Model menu.",+ )if brain is None or not callable(getattr(brain, "complete", None)):return ToolResult(False, None, "This agent has no browser-capable model connection")usage_total = {"input_tokens": 0, "output_tokens": 0, "cache_hit_tokens": 0}diff --git a/tests/contract/test_browser_contract.py b/tests/contract/test_browser_contract.pyindex bec52e8c91..e8b7a73fe3 100644--- a/tests/contract/test_browser_contract.py+++ b/tests/contract/test_browser_contract.py@@ -458,3 +458,32 @@ async def test_completed_chat_cancels_only_its_pending_browser(tmp_path, monkeyprt.browser.live.sessions.clear()other.run_lock.release()await rt.close()+++async def test_chat_only_model_has_actionable_browser_failure_without_paid_fallback(+ tmp_path, monkeypatch+):+ from jarvis.society.browser.bridge import execute_live+ from jarvis.society.browser.live import LiveSessions++ live = LiveSessions(tmp_path)+ live.executor = object()+ calls = []++ def unavailable(caller):+ calls.append(caller.provider)+ raise KeyError("No inference implementation")++ live.model_resolver = unavailable+ monkeypatch.setattr("jarvis.core.config.get_jarvis_agent_secret", lambda _: None)+ result = await execute_live(+ SimpleNamespace(data_dir=tmp_path),+ SimpleNamespace(agent_id="test", provider="chat-only"),+ SimpleNamespace(live=live),+ {"task": "Read"},+ SimpleNamespace(trace_id="one", config={}),+ )+ assert not result.success+ assert "Model menu" in result.error+ assert calls == ["chat-only"]+ assert live.sessions == {}