mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-05 08:57:46 +08:00
Verified against a live Antigravity + xAI deployment: - Gemini and Claude clients calling a forced-stream Responses upstream (xAI, Codex) without streaming always failed: the aggregated body echoes request metadata (parallel_tool_calls, tools, encrypted reasoning) that the strict cross-format check refuses, and the gateway then wrapped the raw SSE capture in a client error body sent with HTTP 200. Project the validated aggregate to every client format, as the Chat path already does, and return 502 instead of raw provider bytes when a successful cross-format response still cannot be converted. - Gemini stream decoding keyed tool calls by part position, so parallel calls arriving in separate chunks (all at parts[0]) merged into one call with concatenated arguments. Key them by arrival order; ids cannot be used because they are optional and the Antigravity envelope synthesizes per-chunk ids that repeat across chunks. Generated call_auto_N ids now follow arrival order. - Non-stream Responses output reported truncated or filtered cross-format answers as completed; derive incomplete + incomplete_details from the canonical stop reason. - Gemini request parsing ignored parametersJsonSchema and responseJsonSchema and passed OpenAPI upper-case type names (OBJECT, STRING) through to JSON Schema targets, which xAI rejects. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>