Роутер работает нормально в process v2

This commit is contained in:
2026-04-07 14:09:51 +03:00
parent 0a25e42ea1
commit 8b7b72967e
1746 changed files with 216414 additions and 14037 deletions
@@ -2,7 +2,7 @@ from __future__ import annotations
import re
from app.modules.agent.intent_router_v2.models import IntentRouterResult
from app.core.agent.intent_router.models import IntentRouterResult
def assert_intent(out: IntentRouterResult, expected: str) -> None:
@@ -57,7 +57,7 @@ def assert_domain_layer_prefixes(out: IntentRouterResult) -> None:
prefixes = {layer.layer_id[0] for layer in out.retrieval_spec.layer_queries if layer.layer_id}
if out.retrieval_spec.domains == ["CODE"]:
assert prefixes <= {"C"}
elif out.retrieval_spec.domains == ["DOCS"]:
elif out.retrieval_spec.domains in (["DOCS"], ["GENERAL"]):
assert prefixes <= {"D"}
else:
assert prefixes <= {"C", "D"}