From 2d3e5ad8b6821b40af5cbf2547bd8e0b270b520d Mon Sep 17 00:00:00 2001 From: Ali Shahkar Date: Wed, 29 Apr 2026 14:24:48 -0700 Subject: [PATCH] fix: correct import path for build_routing_context in executor (#214) routing.types appears to have been an in-progress module that was consolidated into routing.router before it was created. The lazy import inside the router policy block was silently caught by the surrounding try/except, causing the policy to never activate and the executor to always fall back to the configured model regardless of any router_policy setting. Corrects the import to openjarvis.learning.routing.router where build_routing_context is defined and exported. --- src/openjarvis/agents/executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openjarvis/agents/executor.py b/src/openjarvis/agents/executor.py index 1b8eb8c0..6a5fe6e0 100644 --- a/src/openjarvis/agents/executor.py +++ b/src/openjarvis/agents/executor.py @@ -261,7 +261,7 @@ class AgentExecutor: if router_policy_key and self._system: try: from openjarvis.core.registry import RouterPolicyRegistry - from openjarvis.learning.routing.types import ( + from openjarvis.learning.routing.router import ( build_routing_context, )