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.
This commit is contained in:
Ali Shahkar
2026-04-29 14:24:48 -07:00
committed by GitHub
parent 259f97b81c
commit 2d3e5ad8b6
+1 -1
View File
@@ -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,
)