#17914: Resolve merge conflicts in PR #13361
agents
size: XS
Cluster:
OpenAI Model Fixes and Updates
Resolved merge conflicts in and . Verified with tests.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR resolves merge conflicts from PR #13361, which fixes thinking block signature handling for Google Antigravity Claude models. The core change ensures that `sanitizeAntigravityThinkingBlocks` normalizes **both** `thinkingSignature` and `signature` fields on thinking blocks, rather than only `thinkingSignature`. Previously, a block with only a `signature` field would get `thinkingSignature` added but retain its original `signature` untouched — meaning if the signature came from a different field (e.g., `thought_signature`), only `thinkingSignature` would be set while `signature` remained absent. This caused downstream issues with Claude thinking models on the Google Antigravity API.
- `sanitizeAntigravityThinkingBlocks` in `google.ts` now sets both `thinkingSignature` and `signature` to the resolved candidate value, and the normalization condition checks both fields
- Test file updated to assert both `thinkingSignature` and `signature` are present after sanitization, and `modelId` is now passed in relevant test cases to correctly trigger the Antigravity Claude policy path
- The merge conflict resolution commit cleanly integrates these changes with the current `main` branch
<h3>Confidence Score: 4/5</h3>
- This PR is safe to merge — the logic change is narrow, correct, and well-covered by updated tests.
- The changes are focused and straightforward: extending an existing normalization function to also populate the `signature` field alongside `thinkingSignature`. The condition logic (`||` instead of single check) is correct for all edge cases (both fields present, only one present, neither present). The test updates properly exercise the new behavior and add `modelId` to trigger the correct policy path. The double-cast through `unknown` is the standard TypeScript pattern for adding fields not in the original type. No security concerns or risky patterns.
- No files require special attention
<sub>Last reviewed commit: cc3f792</sub>
<!-- greptile_other_comments_section -->
<sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#13361: fix(google-antigravity): add Opus 4.6 support and fix thinking.sign...
by SovranAMR · 2026-02-10
80.6%
#16100: fix: convert unsigned thinking blocks to text to prevent signature ...
by claw-sylphx · 2026-02-14
80.2%
#18926: fix(agents): preserve thinking signatures for direct Anthropic API
by BinHPdev · 2026-02-17
79.1%
#5011: fix(gemini): strip JSON thoughtSignature from tool calls for Gemini 3+
by shayan919293 · 2026-01-30
77.3%
#15379: fix(antigravity): strip unsigned thinking blocks in agent loop via ...
by jg-noncelogic · 2026-02-13
76.5%
#15205: fix(models): normalize google-antigravity api field from google-gem...
by wboudy · 2026-02-13
76.5%
#10097: fix: add empty thinking blocks to tool call messages when thinking is…
by cyxer000 · 2026-02-06
76.4%
#22214: fix(tools): sanitize google-antigravity schemas for Gemini-compatib...
by Kansodata · 2026-02-20
75.7%
#13119: fix: add forward-compat for google-antigravity claude-opus-4-6 models
by sdb001 · 2026-02-10
75.7%
#21835: fix: apply schema cleaning for google-antigravity in normalizeToolP...
by ephraimm · 2026-02-20
75.4%