IanShaw027
|
c1e25b7ecf
|
fix(upstream): 完善边界检查和 thinking block 处理
基于 Gemini + Codex 审查结果的修复:
1. thinking block dummy signature 填充
- Gemini 模型现在会填充 dummyThoughtSignature
- 与 tool_use 处理逻辑保持一致
2. 边界检查增强
- buildTools: 跳过空工具名称
- buildTools: 为 nil schema 提供默认值
- convertClaudeToolsToGeminiTools: 为 nil params 提供默认值
3. 防止下游 API 验证错误
- 确保所有工具都有有效的 parameters
- 默认 schema: {type: 'object', properties: {}}
审查报告:Gemini 评分 95%, Codex 评分 8.2/10
|
2025-12-31 21:44:56 +08:00 |
|
IanShaw027
|
35b768b719
|
fix(upstream): 跳过 Claude 模型无 signature 的 thinking block
- buildParts 函数检测 thinking block 的 signature
- Claude 模型 (allowDummyThought=false) 时跳过无 signature 的 block
- 记录警告日志以便调试
- Gemini 模型继续使用 dummy signature 兼容方案
修复 Issue 0.1: Claude thinking block signature 缺失错误
|
2025-12-31 21:35:41 +08:00 |
|
IanShaw027
|
15e676e9cd
|
fix(upstream): 支持 Claude custom 类型工具 (MCP) 格式
- ClaudeTool 结构体增加 Type 和 Custom 字段
- buildTools 函数支持从 custom 字段读取 input_schema
- convertClaudeToolsToGeminiTools 函数支持 MCP 工具格式
- 修复 Antigravity upstream error 400: JSON schema invalid
修复 Issue 0.2: tools.X.custom.input_schema 验证错误
|
2025-12-31 20:56:38 +08:00 |
|
song
|
bc75edd800
|
style: interface{} → any (gofmt rewrite rule)
|
2025-12-29 18:05:05 +08:00 |
|
song
|
635d7e77e1
|
fix(antigravity): 只有 Gemini 模型支持 dummy thought signature
参考 Antigravity-Manager 的实现:
- 添加 allowDummyThought 参数,只有 gemini-* 模型才启用
- Claude 模型通过 Vertex API 需要有效的 thought signatures
- thinking block 保留原有 signature
- tool_use 只在 Gemini 模型时才使用 dummy signature
|
2025-12-28 21:36:21 +08:00 |
|
song
|
ba9eb684ed
|
fix(antigravity): 与 proxycast 保持一致的 thought_signature 处理
- function_call 无条件添加 dummy thought_signature(与 proxycast 一致)
- thinking block 在 thinking 模式下统一使用 dummy signature 替换历史无效 signature
- 添加测试用例:TestClaudeMessagesWithInvalidThinkingSignature
|
2025-12-28 21:29:16 +08:00 |
|
song
|
9594c9c83a
|
fix(antigravity): 修复 Gemini 3 thought_signature 和 schema 验证问题
- 添加 dummyThoughtSignature 常量,在 thinking 模式下为无 signature 的 tool_use 自动添加
- 增强 cleanJSONSchema:过滤 required 中不存在的属性,确保 type/properties 字段存在
- 扩展 excludedSchemaKeys:增加 $id, $ref, strict, const, examples 等不支持的字段
- 修复 429 重试逻辑:仅在所有重试失败后才标记账户为 rate_limited
- 添加 e2e 集成测试:TestClaudeMessagesWithThinkingAndTools
|
2025-12-28 21:25:04 +08:00 |
|
song
|
b0389ca4d2
|
feat: 实现 Antigravity Claude → Gemini 协议转换,haiku 映射到 gemini-3-flash
|
2025-12-28 18:41:55 +08:00 |
|