JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
Revert "test(agentserver): warm up tiktoken before steering integration tests"
程凯b7c8ddbe9bb6
diff --git a/tests/unit_tests/agentserver/test_chat_steering_core_integration.py b/tests/unit_tests/agentserver/test_chat_steering_core_integration.pyindex a59702f04e..82220a8e3b 100644--- a/tests/unit_tests/agentserver/test_chat_steering_core_integration.py+++ b/tests/unit_tests/agentserver/test_chat_steering_core_integration.py@@ -42,23 +42,6 @@ from jiuwenswarm.server.runtime.agent_adapter.interface_deep import (_CORE_HAS_STEERING = find_spec("openjiuwen.core.single_agent.schema.steering") is not None[email protected](scope="session", autouse=True)-def _warm_tiktoken_encoding():- """Prime the tiktoken vocab once per worker, outside timed paths.-- The context engine builds a TiktokenCounter synchronously during the- first invoke; on a cold CI worker that downloads the cl100k_base- vocab over the network (~38s observed), which exceeds the 10s- steering budget asserted below. Fail-open mirrors TiktokenCounter.- """- try:- import tiktoken-- tiktoken.get_encoding("cl100k_base")- except Exception: # noqa: BLE001 - degrade to len//4 like TiktokenCounter- pass--class _BlockingTool(Tool):def __init__(self):super().__init__(ToolCard(name="blocked_tool", description="Wait for test"))