fix(antigravity): restore inline image attachment and add GeminiCLI tests - #206
fix(antigravity): restore inline image attachment and add GeminiCLI tests#206warelik wants to merge 5 commits into
Conversation
|
Claimed by @warelik. |
d90a3b1 to
46bbccc
Compare
warelik
left a comment
There was a problem hiding this comment.
Approved — no blocking findings (posted as COMMENT; GitHub rejects APPROVE on your own PR).
The fix restores collectFunctionResponsesWithSiblingInlineData and its helpers in internal/translator/antigravity/gemini. I verified the restored helpers and the full fixCLIToolResponse are byte-identical to the stock upstream implementation (router-for-me/CLIProxyAPI), so this is a true parity restore. The behavior change — sibling inline_data/inlineData parts are attached to the nearest functionResponse instead of being silently dropped with the rest of the content — is covered by six table cases, an end-to-end ConvertGeminiRequestToAntigravity test, and two OpenAI Responses → Antigravity tests (single and parallel tool calls). I traced each new GeminiCLI test assertion against the corresponding implementation (claude/gemini-cli, gemini-cli/gemini, gemini-cli/openai/responses, gemini/gemini-cli, openai/gemini-cli); all match actual behavior, and no existing test depends on the old dropping behavior.
Two non-blocking notes inline: (1) the new antigravity table test keys input construction and extra assertions off tt.name literals, so renaming a subtest silently skips checks; (2) the same sibling-image loss still exists in the fork-only gemini-cli/gemini grouping and is worth a follow-up.
Ready to merge from my side.
warelik
left a comment
There was a problem hiding this comment.
Approved — both notes from the previous review are addressed.
gemini-cli/gemininow ports the sibling-inlineData collector (normalizeInlineDataPart,attachInlineDataToFunctionResponse,collectFunctionResponsesWithSiblingInlineData); I verified the port matches the antigravity/stock logic exactly, and the newTestConvertGeminiRequestToGeminiCLI_PreservesSiblingToolImagetraces correctly end to end (snake_case sibling absorbed into camelCasefunctionResponse.parts, grouping and id preserved). This also fixes the OpenAI Responses → GeminiCLI chain flagged before.- The antigravity table test now uses explicit
modelCalls/extraChecksfields — coverage is preserved case-for-case, and renaming a subtest no longer changes what runs.
One cosmetic should-fix inline: the helper insertion split the backfillFunctionResponseName doc comment, so a wrong description now sits on normalizeInlineDataPart and a dangling fragment above backfillFunctionResponseName. Not blocking — a one-line tidy before merge.
Ready from my side.
warelik
left a comment
There was a problem hiding this comment.
Approved — the doc-comment placement flagged last round is fixed: normalizeInlineDataPart and attachInlineDataToFunctionResponse now carry accurate one/two-line docs, and the original backfillFunctionResponseName comment is restored intact. The delta since the already-approved b63c24e3 is comments-only, so prior verification stands: the antigravity restore is byte-identical to stock upstream, the gemini-cli/gemini port matches that logic, and the table-test refactor preserves coverage case-for-case.
Ready to merge.
Summary
collectFunctionResponsesWithSiblingInlineDatainantigravity/geminiso inline image attachments that follow tool results are preserved and attached to the nearestfunctionResponse.claude/gemini-cli,gemini/gemini-cli,gemini-cli/gemini,gemini-cli/openai/responses,openai/gemini-cli) covering happy path, system instructions, tools, tool calls/responses, and usage fields.gemini-cli/geminifixCLIToolResponseto also collect siblinginlineData/inline_dataparts and attach them to the nearestfunctionResponse.antigravity/geminisibling image test to use explicitmodelCallsandextraCheckstable fields instead of name-keyed assertions.gemini-cli/geminihelpers.Verification
go test ./...passes.go build -o test-output ./cmd/server && rm test-outputsucceeds.gofmt -w .applied.Claim
This PR is opened by @warelik and is ready for review.