1
0

feat: 抽取 scripts/core.py 公共模块,重构检测脚本

将 anthropic_detect.py 和 openai_detect.py 中的公共功能抽取到
core.py 模块,包括:
- HTTP 请求(普通/流式)及重试逻辑
- SSL 上下文管理
- 测试用例/结果数据结构 (TestCase, TestResult)
- 错误分类 (ErrorType)
- 响应验证辅助函数 (validate_response_structure 等)
- 测试执行框架 (run_test, run_test_suite)

两个检测脚本重构后更聚焦于各自 API 的测试用例定义。
This commit is contained in:
2026-04-21 11:45:21 +08:00
parent f3a207fa16
commit 7f0f831226
3 changed files with 1446 additions and 549 deletions

File diff suppressed because it is too large Load Diff