修复 RooCode / New API 中转兼容性问题#377
Merged
Merged
Conversation
100ddce to
707227d
Compare
Contributor
Author
|
补充说明: 这次补丁进一步完善了 Antigravity Claude 工具调用路径的兼容性。部分 OpenAI/RooCode 客户端会传入无参数工具,或在中转后形成缺少有效 schema 的工具声明,Antigravity Claude 上游会因此返回:
本 PR 现在会在最终请求发出前做一层归一化处理:
这样可以避免 Claude 工具调用场景下因 schema 字段缺失或字段名不匹配导致 400,同时不改变客户端原始工具语义。 已验证:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
您好,本 PR 主要修复 RooCode / New API 中转场景下的若干实际兼容性问题,重点集中在 Gemini / Gemini CLI / Antigravity 的请求转换与响应字段映射。
核心改动:
parametersJsonSchema,避免 Gemini 内部接口因 schema 不兼容返回 400thoughtSignature,避免Corrupted thought signaturecachedContentTokenCount到 OpenAI / Anthropic usage 映射,支持显示缓存命中 tokensessionId,改善多凭证轮询场景下的会话一致性验证:
py_compile检查改动范围集中在转换层与兼容性处理逻辑,尽量避免影响现有接口行为。麻烦方便时 review;如无异议,希望可以合并。谢谢。