1. 23 Jan, 2026 7 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(gateway): 增加 SUGGESTION MODE 请求拦截 · 4a0fe3b1
      shaw authored
      扩展现有的预热请求拦截功能,新增对 SUGGESTION MODE 请求的拦截:
      - 检测 messages 最后一条 user 消息是否以 [SUGGESTION MODE: 开头
      - 拦截后返回空内容响应,节省 token 消耗
      - 重构检测逻辑,合并为单一函数,只解析一次 JSON
      4a0fe3b1
    • shaw's avatar
      a1292fac
    • shaw's avatar
    • 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
  2. 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
  3. 21 Jan, 2026 1 commit
  4. 20 Jan, 2026 9 commits
  5. 19 Jan, 2026 20 commits