DaVinci42's four cases on #4374 (v0.1.3925), fixed in the Copilot Gemini
tool-schema translation only:
- copilotGeminiToolUnions renamed a disjoint object anyOf to oneOf, which
Copilot's Gemini takes with 200 but strips of its branches, so the model
sent a string. The rename is gone; copilotGeminiToolShapes folds the
branches into the one object (same-named properties join their enums, so
a discriminator keeps "project" and "none").
- a union of local $ref branches is resolved against $defs/definitions
(a copy; a target that refers on is not followed) before it is judged,
instead of being dropped to an untyped string.
- a type written beside a nullable single-branch anyOf is removed (400).
- an array with no items gets items {} (typed after by geminiTypes) (400).
Run (mote, -tags nogui): TestCopilotGeminiFoldsCodexUnions,
TestCopilotGeminiReporterSchemas (the reporter's four schemas verbatim),
TestCopilotGeminiShapesLeaveOthersAlone (claude / no agent: body unchanged),
and the TestCopilot*/TestGeminiTypes*/TestAntigravity* set pass. With the
three changed non-test files put back to origin/main the first two go red
(all four reporter subtests). gofmt clean; go vet darwin/linux/windows and
the gateway package run: see the next commit/tag notes.
Not tried: a live Copilot account (the fake refuses by the reporter's
recorded rules).