1. 31 Jan, 2026 1 commit
  2. 30 Jan, 2026 1 commit
    • yangjianbo's avatar
      feat(账号): 添加 Sora 账号双表同步与创建 · 99dc3b59
      yangjianbo authored
      - 新增 sora_accounts 表与 accounts.extra GIN 索引\n- OpenAI OAuth 支持同时创建 Sora 账号并同步配置\n- Token 刷新同步关联 Sora 账号凭证与扩展表\n- 增加 Sora 账号连通性测试与前端开关文案
      99dc3b59
  3. 29 Jan, 2026 1 commit
    • yangjianbo's avatar
      feat(sora): 新增 Sora 平台支持并修复高危安全和性能问题 · 13262a56
      yangjianbo authored
      
      
      新增功能:
      - 新增 Sora 账号管理和 OAuth 认证
      - 新增 Sora 视频/图片生成 API 网关
      - 新增 Sora 任务调度和缓存机制
      - 新增 Sora 使用统计和计费支持
      - 前端增加 Sora 平台配置界面
      
      安全修复(代码审核):
      - [SEC-001] 限制媒体下载响应体大小(图片 20MB、视频 200MB),防止 DoS 攻击
      - [SEC-002] 限制 SDK API 响应大小(1MB),防止内存耗尽
      - [SEC-003] 修复 SSRF 风险,添加 URL 验证并强制使用代理配置
      
      BUG 修复(代码审核):
      - [BUG-001] 修复 for 循环内 defer 累积导致的资源泄漏
      - [BUG-002] 修复图片并发槽位获取失败时已持有锁未释放的永久泄漏
      
      性能优化(代码审核):
      - [PERF-001] 添加 Sentinel Token 缓存(3 分钟有效期),减少 PoW 计算开销
      
      技术细节:
      - 使用 io.LimitReader 限制所有外部输入的大小
      - 添加 urlvalidator 验证防止 SSRF 攻击
      - 使用 sync.Map 实现线程安全的包级缓存
      - 优化并发槽位管理,添加 releaseAll 模式防止泄漏
      
      影响范围:
      - 后端:新增 Sora 相关数据模型、服务、网关和管理接口
      - 前端:新增 Sora 平台配置、账号管理和监控界面
      - 配置:新增 Sora 相关配置项和环境变量
      Co-Authored-By: default avatarClaude Sonnet 4.5 <noreply@anthropic.com>
      13262a56
  4. 23 Jan, 2026 4 commits
    • lynoot's avatar
      fix(gateway): aggregate all text chunks in non-streaming Gemini responses · 909b8a8f
      lynoot authored
      Previously, collectGeminiSSE() only returned the last chunk received
      from the upstream streaming response when converting to non-streaming.
      This caused incomplete responses where only the final text fragment
      was returned to clients.
      
      For example, a request asking to "count from 1 to 10" would only
      return "\n" (the last chunk) instead of "1\n2\n3\n...\n10\n".
      
      This was especially problematic for JSON structured output where
      the opening brace "{" from the first chunk was lost, resulting
      in invalid JSON like: colors": ["red", "blue"]}
      
      The fix:
      - Collect all text parts from each SSE chunk into a slice
      - Merge all collected text parts into the final response
      - Reuse the same pattern as handleGeminiStreamToNonStreaming
        in antigravity_gateway_service.go
      
      Fixes: non-streaming responses returning incomplete text
      Fixes: structured output (JSON schema) returning invalid JSON
      909b8a8f
    • shaw's avatar
      feat: 保存并显示OAuth账号邮箱地址 · f9ab1daa
      shaw authored
      f9ab1daa
    • shaw's avatar
      fix(test): 修复测试中引用不存在的函数名 · d27b8474
      shaw authored
      测试文件引用了 IsTokenVersionStale 函数,但实际函数名为 CheckTokenVersion,导致 CI 构建失败
      d27b8474
    • shaw's avatar
      fix(token-cache): 版本过时时使用最新token而非旧token · dac6bc22
      shaw authored
      上次修复(2665230a)只阻止了写入缓存,但仍返回旧token导致403。
      现在版本过时时直接使用DB中的最新token返回。
      
      - 重构 IsTokenVersionStale 为 CheckTokenVersion,返回最新account
      - 消除重复DB查询,复用版本检查时已获取的account
      dac6bc22
  5. 22 Jan, 2026 3 commits
    • shaw's avatar
      fix(token-cache): 修复异步刷新与请求线程的缓存竞态条件 · 2665230a
      shaw authored
      - 新增 _token_version 版本号机制,防止过期 token 污染缓存
      - TokenRefreshService 刷新成功后写入版本号并清除缓存
      - TokenProvider 写入缓存前检查版本,过时则跳过
      - ClearError 时同步清除 token 缓存
      2665230a
    • 0xff26b9a8's avatar
      style: gofmt antigravity_gateway_service.go · 4f0c2b79
      0xff26b9a8 authored
      4f0c2b79
    • 0xff26b9a8's avatar
      fix(antigravity): 修复非流式 Claude To Antigravity 响应内容为空的问题 · e756064c
      0xff26b9a8 authored
      - 修复 TransformGeminiToClaude 的 JSON 解析逻辑,当 V1InternalResponse
        解析成功但 candidates 为空时,尝试直接解析为 GeminiResponse 格式
      - 修复 handleClaudeStreamToNonStreaming 收集流式响应的逻辑,累积所有
        chunks 的内容而不是只保留最后一个(最后一个 chunk 通常 text 为空)
      - 新增 mergeCollectedPartsToResponse 函数,合并所有类型的 parts
        (text、thinking、functionCall、inlineData),保持原始顺序
      - 连续的普通 text parts 合并为一个,thinking/functionCall/inlineData 保持原样
      e756064c
  6. 20 Jan, 2026 5 commits
  7. 19 Jan, 2026 10 commits
  8. 18 Jan, 2026 7 commits
  9. 17 Jan, 2026 8 commits