HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.
Python agent-apiagent-frameworkagent-harnessai-agentsai-infrastructurecoding-agentconformance-testingdeepseek-harnessharness-engineeringhermesllmopen-protocolopen-sourceopen-standardpi-coding-agentself-hosteduhpunified-apiunified-harness-protocolunified-interface
A turn that ran on no connection says why; the mapped-model route pinned for the base case (#306)
github-actions[bot]44054a76842f
diff --git a/gateway/app.py b/gateway/app.pyindex 95ab22fc..5096d37b 100644--- a/gateway/app.py+++ b/gateway/app.py@@ -3747,7 +3747,17 @@ def _turn_failure_message(rec: dict) -> str:# "credential cannot be brokered; refused" because the chain's next entry could not be brokered# (hosted, 2026-09-08).ran = [t for t in tried if t.get("status")]- last = (ran or tried)[-1]+ if not ran:+ # Nothing ran: every connection was skipped before a request went out. The notes are the+ # router's ("does not serve", "cannot be brokered"); the person needs what to do (hosted,+ # claude-opus-5.5 on Claude Code, 2026-09-27: "credential cannot be brokered; refused").+ model = str(rec.get("model") or "This model")+ if any("brokered" in str(t.get("error") or "") for t in tried):+ return (f"{model} is served here only by a connection this harness's base cannot use. Choose "+ "another model, or connect a provider that serves it under Bring Your Own Key.")+ return (f"No connection on this account serves {model}. Choose another model, or connect a "+ "provider that serves it under Bring Your Own Key.")+ last = ran[-1]reason = str(last.get("error") or "").strip() or f"the connection answered {last.get('status') or 'with an error'}"if (said := _history_refusal(rec, reason)):return saiddiff --git a/gateway/tests/test_model_route_by_base.py b/gateway/tests/test_model_route_by_base.pynew file mode 100644index 00000000..a8d7c532--- /dev/null+++ b/gateway/tests/test_model_route_by_base.py@@ -0,0 +1,60 @@+"""A mapped model runs on an integration that can drive the base. The map names the integration+that serves a model with no base in mind; when that one has no wiring for the base, another+integration that lists the model and drives the base takes the turn (claude-opus-5.5 on Claude+Code, hosted 2026-09-27: mapped to OpenRouter, which has no Anthropic-shaped endpoint, while+Vercel AI Gateway serves it and drives Claude Code). On this tree `_integration_driving` has+made that choice since 2026-09-06; this pins it for the case hosted hit, with hosted's turn+failure sentences for a turn that ran on no connection."""+import asyncio+import sys+from pathlib import Path++sys.path.insert(0, str(Path(__file__).resolve().parents[1]))+import app as gw # noqa: E402+++def _async(v):+ async def _f(*a, **k):+ return v+ return _f()+++DOC = [{"name": "TokenRouter Sponsorship", "provider": "tokenrouter", "config": {"api_key": "sk-t", "base_url": "https://tr.example/v1"}},+ {"name": "OpenRouter", "provider": "openrouter", "config": {"api_key": "sk-o", "base_url": "https://openrouter.ai/api/v1"}},+ {"name": "Vercel AI Gateway", "provider": "vercel", "config": {"api_key": "sk-v", "base_url": "https://ai-gateway.vercel.sh/v1"}}]+++def _world(monkeypatch, doc=DOC, route="OpenRouter"):+ monkeypatch.setattr(gw, "_effective_model_map", lambda: _async({"claude-opus-5.5": route}))+ monkeypatch.setattr(gw, "_integrations_doc", lambda: _async([dict(i) for i in doc]))+++def test_the_vendor_tables_know_who_serves_opus_5_5():+ assert "claude-opus-5.5" in gw._integration_models(DOC[1]) and "claude-opus-5.5" in gw._integration_models(DOC[2])+ assert "claude-opus-5.5" not in gw._integration_models(DOC[0])+ assert ("openrouter", "claude") not in gw._INTEGRATION_WIRING and ("vercel", "claude") in gw._INTEGRATION_WIRING+++def test_a_base_the_mapped_integration_cannot_drive_runs_on_another_that_serves_the_model(monkeypatch):+ _world(monkeypatch)+ conn = asyncio.run(gw._mapped_integration_conn("claude", "claude-opus-5.5"))+ assert conn and conn["name"] == "integration:Vercel AI Gateway"+ assert conn["provider"] == gw._INTEGRATION_WIRING[("vercel", "claude")] and conn["model"] == "anthropic/claude-opus-5.5"+ # a base the mapped integration drives keeps the map's choice+ conn = asyncio.run(gw._mapped_integration_conn("hermes", "claude-opus-5.5"))+ assert conn and conn["name"] == "integration:OpenRouter"+++def test_an_integration_without_the_model_is_passed_over(monkeypatch):+ _world(monkeypatch, doc=DOC[:2])+ assert asyncio.run(gw._mapped_integration_conn("claude", "claude-opus-5.5")) is None+++def test_a_turn_that_ran_on_no_connection_says_so_in_words():+ rec = {"model": "claude-opus-5.5", "tried": [{"connection": "tr", "error": "provider does not serve 'claude-opus-5.5'"},+ {"connection": "br", "error": "credential cannot be brokered; refused"}]}+ m = gw._turn_failure_message(rec)+ assert m.startswith("claude-opus-5.5 is served here only by a connection this harness's base cannot use.") and "Bring Your Own Key" in m+ assert "brokered" not in m and "tr" not in m.split()+ rec = {"model": "gpt-9", "tried": [{"connection": "tr", "error": "provider does not serve 'gpt-9'"}, {"connection": "v", "error": "not found"}]}+ assert gw._turn_failure_message(rec).startswith("No connection on this account serves gpt-9.")diff --git a/gateway/tests/test_turn_failure_message.py b/gateway/tests/test_turn_failure_message.pyindex dc2fb014..6a1c5ddb 100644--- a/gateway/tests/test_turn_failure_message.py+++ b/gateway/tests/test_turn_failure_message.py@@ -57,8 +57,7 @@ def test_the_reason_is_the_last_connection_that_ran_not_a_skipped_one():assert gw._turn_failure_message(rec) == \"The turn failed on every connection it tried. The last one said: The model refused to complete the request"only_skips = {"tried": [{"connection": "a", "error": "not found"}, {"connection": "b", "error": "credential cannot be brokered; refused"}]}- assert gw._turn_failure_message(only_skips) == \- "The turn failed on every connection it tried. The last one said: credential cannot be brokered; refused"+ assert gw._turn_failure_message(only_skips).startswith("This model is served here only by a connection this harness's base cannot use.")def test_a_provider_refusing_the_tasks_earlier_reasoning_is_said_in_words():diff --git a/scripts/support-matrix/plugs/browser.py b/scripts/support-matrix/plugs/browser.pyindex 0c54e595..d2bc21f8 100644--- a/scripts/support-matrix/plugs/browser.py+++ b/scripts/support-matrix/plugs/browser.py@@ -171,7 +171,9 @@ def main() -> int:print(time.strftime("%H:%M:%S"), s, flush=True)code, d = call("PUT", "/v1/plugs/browser", {"enabled": True, "config": {"allow_domains": [], "deny_domains": []}})- if code != 200 or d.get("status") != "connected":+ if code in (404, 405):+ print("the instance manages plugins in its console; the include's status is the gate") # hosted+ elif code != 200 or d.get("status") != "connected":print("FAIL the browser plugin did not connect:", code, json.dumps(d)[:200]); return 2if a.bases == "all":code, bases = call("GET", "/v1/bases")diff --git a/ui/src/app/revamp.css b/ui/src/app/revamp.cssindex 5d9cf9f8..7583ed78 100644--- a/ui/src/app/revamp.css+++ b/ui/src/app/revamp.css@@ -2025,6 +2025,9 @@ button.creq-srcstat.on b { color: var(--accent); }.plugin-list{container-type:inline-size}.plugin-row .capability-actions{display:grid;grid-template-columns:repeat(2,minmax(104px,max-content));gap:6px 8px;justify-content:end;align-self:start;margin-top:2px}.plugin-row .capability-actions .button,.plugin-row .capability-actions .toggle-button{width:100%;min-width:0;justify-content:center}+/* a row with one action (a connected plugin's Included switch) keeps it on the right edge, where the+ packages' actions end; alone in a two-column grid it sat in the first column (Richard, 2026-09-27) */+.plugin-row .capability-actions>:only-child{grid-column:1/-1;justify-self:end}@container (max-width:680px){.plugin-row{grid-template-columns:30px minmax(0,1fr)}.plugin-row .capability-actions{grid-column:2;justify-content:start;margin-top:8px}