feat: integrate RouteLLM BERT router for intelligent query classification

- 添加 transformers 和 torch 依赖
- 创建 bert_router.py 封装 RouteLLM BERT 分类器
- 新增 select_model_by_bert() 函数替代 token 长度路由
- BERT 输出映射: strong->qwen-max, weak->qwen-flash
- 保留 token 长度路由作为 fallback
This commit is contained in:
2026-04-18 00:12:51 +08:00
parent 88842457ea
commit f9cc7973b9
3 changed files with 204 additions and 2 deletions

View File

@@ -5,5 +5,7 @@ litellm>=1.0.0
tiktoken>=0.5.0
httpx>=0.25.0
python-dotenv>=1.0.0
transformers>=4.30.0
torch>=2.0.0
pytest>=7.4.0
pytest-asyncio>=0.21.0