fengsilin
65e6a82d34
feat(user-migration): support selective batches and cancellation
Add candidate user selection and explicit_ids batch creation flow for overseas migration. Also add cancellable batches to release selected-user locks and extend backend, frontend, and e2e coverage for the new flow.
Co-Authored-By: Codex <noreply@anthropic.com>
3 дней назад
fengsilin
ca3f8765bb
test(user-migration): complete migration coverage and e2e flow
Co-Authored-By: Codex <noreply@anthropic.com>
4 дней назад
fengsilin
84eb6d6a88
feat: 端点格式限制功能 + 完善测试
当开启端点格式限制后,不同协议的渠道只能通过对应的端点访问:
- Anthropic 渠道只能用 /v1/messages
- Gemini 渠道只能用 /v1beta/models/*
- OpenAI 系渠道只能用 /v1/chat/completions 等
- VertexAI/阿里云等支持多协议的渠道不受限
核心实现:EndpointFormatGuard 中间件从请求路径推导协议家族,
不依赖 gin context 中的 relay_format(因 group middleware 执行
时 context 中尚无此值)。
修复了 /v1/models/*path 和 /v1/engines/ 路径被错误归类为
openai 家族的 bug(实际是 Gemini 格式)。
单元测试 58 个,E2E 测试 15 个,覆盖:
- 路径分类边界(含 Gemini relay 路径修复验证)
- 渠道类型覆盖(含非 LLM 渠道透传)
- 并发安全、运行时开关切换
- 错误消息 JSON 结构和内容验证
3 недель назад
fengsilin
4c76265f32
test: 添加渠道选择删除 E2E 测试 + 清理临时截图 + 新增辅助脚本
- 新增 E2E 测试脚本 test/e2e_channel_removal.py,覆盖 Token 解析、
已删除路由验证、请求自动分发、channel_id 忽略、定价无默认渠道等
- 新增 anthropic_cache_test.sh 缓存测试脚本
- 新增本地开发辅助脚本 (dev.ps1, start-local.ps1 等)
- 清理根目录下 9 个临时测试截图
3 недель назад