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
gateway: a HarnessRouter key drives the System One base on the hosted open-weight models (#262)
github-actions[bot]ab4fdbfd7719
diff --git a/docs/self-hosting-guide.md b/docs/self-hosting-guide.mdindex eeecec57..c31d8708 100644--- a/docs/self-hosting-guide.md+++ b/docs/self-hosting-guide.md@@ -343,6 +343,7 @@ offers you providers that work.| `typesafe` | System One (Jev on TypeSafe's own API: `jev-latest`, `jev-preview`) || `bedrock` | Claude Code, Hermes || `tokenrouter` | Claude Code, Codex, Hermes, Pi, DeepSeek Harness, OpenCode, Qwen Code, Gemini CLI, Cline, Oh My Pi, goose, Kimi Code CLI, Aider, OpenHands |+| `harnessrouter` | Claude Code, Codex, Hermes, Pi, DeepSeek Harness, OpenCode, Qwen Code, Gemini CLI, Cline, Oh My Pi, goose, Kimi Code CLI, Aider, OpenHands, System One (the open-weight models `laya`, `openthai-systemone` and `system-one-phase2`, served by the hosted service and billed to the key's credits) || `vercel` | Claude Code, Codex, Hermes, Pi, DeepSeek Harness, OpenCode, Qwen Code, Cline, Oh My Pi, goose, Kimi Code CLI, Aider, OpenHands || `llmtr` | Claude Code, Codex, Hermes, Pi, DeepSeek Harness, OpenCode, Qwen Code, Cline, Oh My Pi, goose, Kimi Code CLI, Aider, OpenHands || `custom` | Claude Code, Codex (Responses format), Hermes, Pi, DeepSeek Harness, OpenCode, Qwen Code, Cline, Oh My Pi, goose, Kimi Code CLI, Aider, OpenHands |diff --git a/gateway/app.py b/gateway/app.pyindex 402ae3b6..87e8f6a1 100644--- a/gateway/app.py+++ b/gateway/app.py@@ -1243,6 +1243,10 @@ _INTEGRATION_WIRING: dict[tuple[str, str], str] = {("harnessrouter", "openhands"): "tokenrouter",("harnessrouter", "cline"): "tokenrouter", ("harnessrouter", "gemini"): "google",("harnessrouter", "goose"): "tokenrouter",+ # The hosted service serves the open-weight System One models (laya, openthai-systemone,+ # system-one-phase2) on its own GPU behind TypeSafe's wire, so a HarnessRouter key drives the+ # systemone base too: decisions at <base>/systemone, billed to the key's credits (2026-09-24).+ ("harnessrouter", "systemone"): "typesafe",}@@ -6522,7 +6526,11 @@ _MODEL_CATALOG["omp"]["models"] = list(_MODEL_CATALOG["pi"]["models"]) # pi's# resolves to typesafe/jev-1.13-20260917 there; measured 2026-09-19 and 2026-09-20, see# _VENDOR_MODELS). A chat model is not offered here: this base asks typed questions and a text# model cannot answer them.-_MODEL_CATALOG["systemone"] = {"default": "jev-latest", "models": ["jev-latest", "jev-preview", "jev-1.13"]}+_MODEL_CATALOG["systemone"] = {"default": "jev-latest",+ # jev: TypeSafe's, on both Jev providers; the last three are open-weight+ # models the hosted service serves, reachable with a HarnessRouter key+ "models": ["jev-latest", "jev-preview", "jev-1.13",+ "laya", "openthai-systemone", "system-one-phase2"]}# A pair the matrix failed twice on the one aggregator that serves the id is not offered on that# harness (2026-09-13, five scenarios each): llama-4-maverick on OpenRouter under qwen writes the# tool call as prose; llama-3.3-70b on OpenRouter fails the recall under goose, the artifact underdiff --git a/gateway/tests/test_harnessrouter_provider.py b/gateway/tests/test_harnessrouter_provider.pyindex 85ed85e4..34d89939 100644--- a/gateway/tests/test_harnessrouter_provider.py+++ b/gateway/tests/test_harnessrouter_provider.py@@ -12,10 +12,12 @@ os.environ.setdefault("HR_BACKING", "local")import app as A # noqa: E402-def test_it_is_wired_wherever_tokenrouter_is():+def test_it_is_wired_wherever_tokenrouter_is_and_on_the_systemone_base():tr = {b: v for (p, b), v in A._INTEGRATION_WIRING.items() if p == "tokenrouter"}hr = {b: v for (p, b), v in A._INTEGRATION_WIRING.items() if p == "harnessrouter"}- assert hr == tr and "claude" in hr and "codex" in hr and "dsh" in hr+ # the one base tokenrouter never drives: the hosted service serves the open-weight System One+ # models itself, on TypeSafe's wire, so a HarnessRouter key drives that base too (2026-09-24)+ assert hr == {**tr, "systemone": "typesafe"} and "claude" in hr and "codex" in hr and "dsh" in hrdef test_the_catalog_entry_and_the_fixed_endpoint():diff --git a/gateway/tests/test_systemone_catalog.py b/gateway/tests/test_systemone_catalog.pyindex ddc87c47..d6af7a73 100644--- a/gateway/tests/test_systemone_catalog.py+++ b/gateway/tests/test_systemone_catalog.py@@ -30,7 +30,11 @@ def test_jev_is_on_its_two_providers_under_their_own_ids_and_nowhere_else():def test_only_the_systemone_base_offers_jev_and_it_offers_nothing_else():# the default is the one id both providers serve, so a harness made on either connection runs- assert gw._MODEL_CATALOG["systemone"] == {"default": "jev-latest", "models": ["jev-latest", "jev-preview", "jev-1.13"]}+ assert gw._MODEL_CATALOG["systemone"] == {"default": "jev-latest", "models": ["jev-latest", "jev-preview", "jev-1.13",+ "laya", "openthai-systemone", "system-one-phase2"]}+ # the three open-weight models come through the hosted service's own key (its /v1/models lists+ # them per key), so the HarnessRouter provider drives the base on TypeSafe's wire+ assert gw._INTEGRATION_WIRING[("harnessrouter", "systemone")] == "typesafe"assert gw._MODEL_CATALOG["systemone"]["default"] in gw._VENDOR_MODELS["typesafe"]assert gw._MODEL_CATALOG["systemone"]["default"] in gw._VENDOR_MODELS["openrouter"]for backend, cat in gw._MODEL_CATALOG.items():@@ -49,7 +53,7 @@ def test_the_base_is_in_the_catalog_with_hard_enforcement_and_no_built_in_tools(def test_a_typesafe_or_openrouter_integration_drives_the_base_and_no_other_provider_claims_to():assert gw._INTEGRATION_WIRING[("openrouter", "systemone")] == "openrouter"assert gw._INTEGRATION_WIRING[("typesafe", "systemone")] == "typesafe"- others = [k for k in gw._INTEGRATION_WIRING if k[1] == "systemone" and k[0] not in ("openrouter", "typesafe")]+ others = [k for k in gw._INTEGRATION_WIRING if k[1] == "systemone" and k[0] not in ("openrouter", "typesafe", "harnessrouter")]assert others == []assert gw._integration_serves_backend({"provider": "openrouter"}, "systemone")assert gw._integration_serves_backend({"provider": "typesafe"}, "systemone")@@ -84,8 +88,12 @@ def test_a_custom_endpoints_models_never_appear_on_the_systemone_list(monkeypatcmonkeypatch.setattr(gw, "_effective_model_map", _map)assert not gw._custom_can_drive("systemone") and gw._custom_can_drive("claude") and gw._custom_can_drive("hermes")view = asyncio.run(gw._harness_models_view(None, "systemone", {"jev-1.13", "jev-latest", "jev-preview"}))- assert [m["id"] for m in view["models"]] == ["jev-latest", "jev-preview", "jev-1.13"]- assert all(m["available"] for m in view["models"])+ assert [m["id"] for m in view["models"]] == ["jev-latest", "jev-preview", "jev-1.13",+ "laya", "openthai-systemone", "system-one-phase2"]+ # the custom row is absent; the catalog's own open-weight rows stay, greyed, until a+ # HarnessRouter key serves them (the same explanation every backend gives a curated model)+ assert {m["id"]: m["available"] for m in view["models"]} == {"jev-latest": True, "jev-preview": True, "jev-1.13": True,+ "laya": False, "openthai-systemone": False, "system-one-phase2": False}# a chat backend the custom format cannot drive still shows the row, greyed, as the explanationview = asyncio.run(gw._harness_models_view(None, "claude", set()))row = next(m for m in view["models"] if m["id"] == "gpt-5.5")