Skip to content

fix(translator): strip multipleOf from antigravity/gemini tool schemas - #6052

Merged
diegosouzapw merged 2 commits into
release/v3.8.44from
fix/port-issue-2309-gemini-multipleof
Jul 3, 2026
Merged

diegosouzapw merged 2 commits into
release/v3.8.44from
fix/port-issue-2309-gemini-multipleof

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

  • antigravity/gemini requests carrying a tool with a multipleOf numeric constraint failed with a hard upstream 400: Invalid JSON payload received. Unknown name "multipleOf" at 'request.tools[0].function_declarations[...]'.
  • multipleOf is not part of the Gemini/antigravity OpenAPI 3.0 schema subset and was not in GEMINI_UNSUPPORTED_SCHEMA_KEYS, so cleanJSONSchemaForAntigravity left it in the payload.

Root cause

GEMINI_UNSUPPORTED_SCHEMA_KEYS (in open-sse/translator/helpers/geminiHelper.ts) lists the JSON-Schema keywords Gemini rejects, but omitted multipleOf. Any tool that declared it on a numeric property survived schema cleaning and reached the upstream verbatim.

Fix

Add "multipleOf" to the set. removeUnsupportedKeywords already recurses into nested objects and array items, so it is now stripped at every level. minimum/maximum are accepted by Gemini and remain untouched.

Attribution

Thanks to @abil0321 for the original report.

Test plan

  • New regression test tests/unit/gemini-multipleof-2309.test.ts (fails before fix, passes after)
  • Existing gemini schema tests green (67/67 across 5 files)
  • npm run typecheck:core
  • eslint clean on touched files

…s (port from 9router#2309)

`multipleOf` is not part of the Gemini/antigravity OpenAPI 3.0 schema subset, so
leaving it in function_declaration parameters triggered a hard upstream 400
("Unknown name multipleOf"). Add it to GEMINI_UNSUPPORTED_SCHEMA_KEYS so it is
stripped at every schema level; minimum/maximum stay (Gemini accepts them).

Reported-by: abil0321 (decolua/9router#2309)
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

KooshaPari added a commit to KooshaPari/OmniRoute that referenced this pull request Jul 3, 2026
…rip, parseAutoConfig leaf, cline envelope (#264)

Bundles four upstream translator/SSE fixes into the fork:

- fix(translator/kiro): wrap system-origin content in <system-reminder>
  tags before merging into the Kiro/CodeWhisperer user message, so the
  system prompt no longer leaks as raw user text (diegosouzapw#6053).
- fix(translator/gemini): strip `multipleOf` from antigravity/gemini tool
  schemas at every level (top-level, nested, array items) — Gemini's
  OpenAPI 3.0 subset rejects it with a hard 400 (diegosouzapw#6052).
- refactor(sse): extract the pure `parseAutoConfig` leaf from combo.ts
  into open-sse/services/combo/autoConfig.ts (diegosouzapw#6049).
- fix(sse/cline): unwrap the Cline non-streaming response envelope so a
  content array of Anthropic-style text blocks is not misclassified as
  502 empty_choices (diegosouzapw#6046).

diegosouzapw#6002 (autoCombo fitness-source stabilize) is already on fork main via
diegosouzapw#5890 — not re-applied here.

Co-authored-by: VitzS7ven <209032696+VitzS7@users.noreply.github.com>
Co-authored-by: Muhammad Salsabil <74514963+abil0321@users.noreply.github.com>
Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@outlook.com>
@diegosouzapw
diegosouzapw merged commit f496738 into release/v3.8.44 Jul 3, 2026
@diegosouzapw
diegosouzapw deleted the fix/port-issue-2309-gemini-multipleof branch July 3, 2026 12:12
@diegosouzapw diegosouzapw mentioned this pull request Jul 4, 2026
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…s (port from 9router#2309) (diegosouzapw#6052)

`multipleOf` is not part of the Gemini/antigravity OpenAPI 3.0 schema subset, so
leaving it in function_declaration parameters triggered a hard upstream 400
("Unknown name multipleOf"). Add it to GEMINI_UNSUPPORTED_SCHEMA_KEYS so it is
stripped at every schema level; minimum/maximum stay (Gemini accepts them).

Reported-by: abil0321 (decolua/9router#2309)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant