geo/backend/tests/test_services
chiguyong 41c2994222 feat: API Key管理+智能路由+用量追踪 - 性价比最优方案
后端(TDD):
- API Key管理服务(加密存储+脱敏显示+优先级+降级策略)
  - 用户Key > 系统Key > 环境变量Key
  - Key可用性检测
  - Key过期处理
- 智能路由服务(分层路由+成本优先级)
  - FREE层: DeepSeek/通义千问/文心一言
  - LOW_COST层: Kimi/豆包/Gemini
  - MID_COST层: 腾讯元宝
  - HIGH_COST层: ChatGPT/Perplexity(用户自备Key)
  - 国内引擎优先
  - 成本估算
  - 推荐引擎组合
- 用量追踪服务(记录+统计+配额预警)
  - 日/周/月汇总
  - 按引擎/品牌统计
  - 成本计算
  - 配额预警(ok/warning/exceeded)
- 36+37=73个测试全部通过
2026-05-25 14:52:31 +08:00
..
__init__.py feat: GEO平台P0-P1核心功能重构 2026-05-23 09:34:58 +08:00
test_ai_engine_chinese.py feat: 补齐AI引擎适配器 - 9引擎全覆盖+代理支持 2026-05-25 12:16:16 +08:00
test_ai_engine_query.py feat: 补齐AI引擎适配器 - 9引擎全覆盖+代理支持 2026-05-25 12:16:16 +08:00
test_api_key_manager.py feat: API Key管理+智能路由+用量追踪 - 性价比最优方案 2026-05-25 14:52:31 +08:00
test_batch_query_service.py feat: Phase1 Week1-2 - AI引擎查询分析完整实现 2026-05-25 10:29:20 +08:00
test_citation_pattern.py feat: Phase1 Week3-4 - 引用模式识别+定时检测任务调度 2026-05-25 11:00:50 +08:00
test_detection_scheduler.py feat: Phase1 Week3-4 - 引用模式识别+定时检测任务调度 2026-05-25 11:00:50 +08:00
test_email_service.py feat: P0-P2功能实现 + GEO workflow分析与规划 2026-05-25 09:45:18 +08:00
test_geo_diagnosis.py feat: P0-P2功能实现 + GEO workflow分析与规划 2026-05-25 09:45:18 +08:00
test_proxy_and_deepseek.py feat: 补齐AI引擎适配器 - 9引擎全覆盖+代理支持 2026-05-25 12:16:16 +08:00
test_quota_service.py feat: P0-P2功能实现 + GEO workflow分析与规划 2026-05-25 09:45:18 +08:00
test_qwen_gemini_adapters.py feat: 补齐AI引擎适配器 - 9引擎全覆盖+代理支持 2026-05-25 12:16:16 +08:00
test_scoring_service.py feat: GEO平台P0-P1核心功能重构 2026-05-23 09:34:58 +08:00
test_seo_diagnosis.py feat: P0-P2功能实现 + GEO workflow分析与规划 2026-05-25 09:45:18 +08:00
test_smart_router_and_usage.py feat: API Key管理+智能路由+用量追踪 - 性价比最优方案 2026-05-25 14:52:31 +08:00
test_yuanbao_adapter.py feat: 补齐AI引擎适配器 - 9引擎全覆盖+代理支持 2026-05-25 12:16:16 +08:00