vscode/extensions
vritant24 a0507913cb
copilot: fix Gemini BYOK tool schemas with nullable type arrays
The Gemini BYOK function-declaration converter assumed a JSON Schema
`type` was always a single string. When a tool parameter used a nullable
union such as `{ "type": ["string", "null"] }`, the array was stringified
into `"string,null"` and rejected with `Unsupported type: string,null`.

Through the Agent Host this surfaced as an HTTP 502 that the Copilot SDK
retried five times before failing the turn. Because the failure lives in
the shared converter, regular editor BYOK is susceptible to the same
schema shape.

Normalize nullable unions to Gemini's `nullable: true`, map multi-type
unions to `anyOf`, and handle nullable array items and anyOf/oneOf that
contain `null`. Add regression tests for these cases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 06:45:02 -07:00
..