5fd737967f
feat: M1-01~03 — AI Gateway deepening, Vector module, Task Queue deepening
...
Deploy API Server / build-and-deploy (push) Failing after 23s
M1-01 AI Gateway:
- DB-driven ModelRoute/ProviderConfig/FallbackEvent tables
- ModelRouter rewrite with loadFromDb() hot-reload
- Fallback event recording + AIUsageRecorded event publishing
- Admin AAPI: routes CRUD, provider enable/disable, fallback events log
M1-02 Vector & Retrieval:
- VectorService with Qdrant client (upsert/delete/search/rerank)
- Admin AAPI: collection status, vector count, reindex trigger
M1-03 Task Queue:
- 16 task types with default retry/timeout configs
- Task stats dashboard, worker status panel, batch retry endpoint
M0 audit fixes:
- ApiMetric retention policy (30-day cleanup)
- Content Safety integration in Files module
- Queue registration centralized (domain-events)
- SECRET_MASTER_KEY production validation
E2E tests:
- M0: 28 smoke tests covering all 14 M0 issues
- M1: 16 tests covering M1-01/02/03
- Mock infrastructure: prisma, ioredis, jose, bullmq, qdrant
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 10:18:07 +08:00
9244db05b4
feat: M0-09 — BullMQ cleanup queue + Domain Events + async COS delete
Deploy API Server / build-and-deploy (push) Successful in 35s
2026-05-23 09:47:30 +08:00
7eb7427817
fix: use hard delete
Deploy API Server / build-and-deploy (push) Successful in 40s
2026-05-23 09:44:39 +08:00
8d08b0ed9c
fix: remove deletedAt filter
Deploy API Server / build-and-deploy (push) Has been cancelled
2026-05-23 09:44:32 +08:00
32be0d8831
feat: M0-09 admin files AAPI
Deploy API Server / build-and-deploy (push) Has been cancelled
2026-05-23 09:44:19 +08:00
82fcaa1f2f
fix: replace RateLimitService with global RateLimitGuard
...
Deploy API Server / build-and-deploy (push) Successful in 59s
RateLimitService could not be injected into feature modules due to
NestJS DI module isolation. Replaced with a global Guard that uses
@RateLimit() decorator metadata to apply per-endpoint limits.
- RateLimitGuard: checks Redis counters, throws 429 on exceed
- Decorators: LoginRateLimit, FeedbackRateLimit, AiAnalysisRateLimit,
FileUploadRateLimit
- Applied to: auth (login), feedback, ai-analysis, files endpoints
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 10:23:19 +08:00
3137d58a5d
fix: 移除 FilesService 中的 RateLimitService 注入
...
Deploy API Server / build-and-deploy (push) Successful in 56s
RateLimitService 未在 @Global Module 中,feature module 无法注入。
限流后续通过 Guard/Interceptor 统一处理。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 22:52:27 +08:00
ca90d34b22
fix: 将 RateLimitService 注入从 StorageService 移到 FilesService
...
Deploy API Server / build-and-deploy (push) Failing after 56s
StorageService 在 @Global StorageModule 中,无法注入 AppModule 的 RateLimitService。
将限流调用上移到 FilesService.requestUploadUrl 中。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 22:50:31 +08:00
6d7cbffc3b
feat: COS 对象存储接入 — CosStorageProvider + FilesModule
...
Deploy API Server / build-and-deploy (push) Failing after 3m0s
- 安装 cos-nodejs-sdk-v5,封装 CosStorageProvider(upload/download/delete/healthCheck)
- 重写 StorageService,新增 createUploadUrl/verifyUpload/getDownloadUrl/deleteObject
- 创建 FilesModule:POST /files/upload-url, POST /files/complete, GET /files/:id, DELETE /files/:id
- UploadedFile 新增 objectKey/bucket 字段
- 对象键格式 {userId}/{YYYYMM}/{sanitizedName}.{ext}
- 接入文件类型校验(ALLOWED_FILE_TYPES)+ 上传限流(10次/小时/用户)
- 配置文件 cos.longde.cloud → zhixi-1259685406 / ap-guangzhou
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 22:30:14 +08:00