feat: implement MVP LLM router service

实现基于 token 长度的简单规则路由服务:
- FastAPI 基础服务 (/v1/chat/completions)
- 根据 token 长度自动选择模型 (gpt-3.5/gpt-4o-mini/gpt-4o)
- 成本追踪和统计 (/stats)
- 健康检查端点 (/health)
- 总计 224 行代码
This commit is contained in:
2026-04-17 23:33:43 +08:00
parent 55506952c1
commit 4a8de8925e
4 changed files with 287 additions and 0 deletions

21
.gitignore vendored Normal file
View File

@@ -0,0 +1,21 @@
# Python
venv/
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
# Environment
.env
.venv
# IDE
.vscode/
.idea/
*.swp
*.swo
# OS
.DS_Store
Thumbs.db