1. 21 Jan, 2026 2 commits
    • song's avatar
      feat(antigravity): 支持按模型类型配置重试次数 · 207e0950
      song authored
      新增环境变量:
      - GATEWAY_ANTIGRAVITY_MAX_RETRIES_CLAUDE
      - GATEWAY_ANTIGRAVITY_MAX_RETRIES_GEMINI_TEXT
      - GATEWAY_ANTIGRAVITY_MAX_RETRIES_GEMINI_IMAGE
      
      未设置时回退到平台级 GATEWAY_ANTIGRAVITY_MAX_RETRIES
      207e0950
    • 0xff26b9a8's avatar
      refactor(antigravity): 提取并同步 Schema 清理逻辑至 schema_cleaner.go · 71f8b9e4
      0xff26b9a8 authored
      主要变更:
      1. 重构代码结构:
         - 将 CleanJSONSchema 及其相关辅助函数从 request_transformer.go 提取到独立的 schema_cleaner.go 文件中,实现逻辑解耦。
      
      2. 逻辑优化与修正:
         - 参考 Antigravity-Manager (json_schema.rs) 的实现逻辑,修正了 Schema 清洗策略。
      71f8b9e4
  2. 20 Jan, 2026 5 commits
  3. 19 Jan, 2026 1 commit
  4. 17 Jan, 2026 13 commits
  5. 16 Jan, 2026 17 commits
  6. 15 Jan, 2026 2 commits
    • IanShaw027's avatar
      fix(lint): 修复剩余的errcheck错误 · 41584008
      IanShaw027 authored
      修复了测试文件中剩余的6处类型断言未检查错误:
      - 第115-118行:choices.message.tool_calls 的类型断言链
      - 第140和145行:multiple tool calls 测试的类型断言
      - 第343和345行:ComplexSSEData 测试的类型断言
      
      **修复模式:**
      所有类型断言都改为使用 ok 检查:
      ```go
      // 修复前
      choices := payload["choices"].([]any)
      
      // 修复后
      choices, ok := payload["choices"].([]any)
      if !ok || len(choices) == 0 {
          t.Fatal("No choices found in result")
      }
      ```
      
      **测试验证:**
      -  TestCorrectToolCallsInSSEData - 所有子测试通过
      -  TestComplexSSEData - 通过
      -  TestCorrectToolParameters - 通过
      -  所有类型断言都有 ok 检查
      -  添加了数组长度验证
      
      现在所有 errcheck 错误都已修复。
      41584008
    • IanShaw027's avatar
      fix(lint): 修复golangci-lint检查发现的问题 · c4f6c89b
      IanShaw027 authored
      修复了4个lint问题:
      1. errcheck (3处): 在测试中添加类型断言的ok检查
      2. govet copylocks (1处): 将mutex从ToolCorrectionStats移到CodexToolCorrector
      
      **详细修改:**
      
      1. **openai_tool_corrector_test.go**
         - 添加了类型断言的ok检查,避免panic
         - 在解析JSON后检查payload结构的有效性
         - 改进错误处理和测试可靠性
      
      2. **openai_tool_corrector.go**
         - 将sync.RWMutex从ToolCorrectionStats移到CodexToolCorrector
         - 避免在GetStats()返回时复制mutex
         - 保持线程安全的同时符合Go最佳实践
      
      **测试验证:**
      - 所有单元测试通过 
      - go vet 检查通过 
      - 代码编译正常 
      c4f6c89b