Skip to content

fix(providers): include FORMATS.ANTIGRAVITY in native web search bypass - #13541

Closed
KooshaPari wants to merge 1 commit into
diegosouzapw:release/v3.8.51from
KooshaPari:pr/13447-antigravity-websearch
Closed

KooshaPari wants to merge 1 commit into
diegosouzapw:release/v3.8.51from
KooshaPari:pr/13447-antigravity-websearch

Conversation

@KooshaPari

Copy link
Copy Markdown
Contributor

Fixes #13447

Problem

In open-sse/services/webSearchFallback.ts, supportsNativeWebSearchFallbackBypass() only checks for FORMATS.GEMINI, but the Antigravity provider uses FORMATS.ANTIGRAVITY. This causes OmniRoute to rewrite web_search into omniroute_web_search, which Responses clients reject as an undeclared tool.

Fix

Add FORMATS.ANTIGRAVITY and provider === 'antigravity' to the native bypass check. The Antigravity translator already maps web_search to Google Search grounding natively.

Changes

  • open-sse/services/webSearchFallback.ts: Add Antigravity to the native web search bypass check

…Calling for Zed proxy (diegosouzapw#13362, diegosouzapw#13363)

Zed's cloud proxy has a stricter enum than the upstream providers:

- OpenAI: Role enum only has user/assistant/system/tool, not 'developer'.
  Map developer-role input items back to system (diegosouzapw#13362).

- Gemini: HarmBlockThreshold only accepts BLOCK_*, not Google's 'OFF'.
  FunctionCallingMode only accepts lowercase auto/any/none, not VALIDATED
  or uppercase AUTO/NONE (diegosouzapw#13363).

Apply these rewrites inside the zed-hosted executor's buildProviderRequest
so native Google/OpenAI paths remain unchanged.

Fixes diegosouzapw#13362
Fixes diegosouzapw#13363
Copilot AI lite review requested due to automatic review settings September 13, 2026 09:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks! This branch holds the same commit as #13543 (the zed developer-role and Gemini enum mapping), not the Antigravity web-search change in the title. #13543 is being merged, so closing this as a duplicate. The FORMATS.ANTIGRAVITY web-search bypass is still welcome as its own PR with a test.

diegosouzapw pushed a commit that referenced this pull request Sep 15, 2026
…13543)

Zed-hosted requests are re-mapped to the narrower enums the Zed proxy validates. Responses input items with `role: "developer"` go back to `system` (#13362). For Gemini, `safetySettings[].threshold: "OFF"` becomes `BLOCK_NONE` and `functionCallingConfig.mode` `VALIDATED`/`AUTO`/`ANY`/`NONE` become Zed's lowercase `auto`/`any`/`none` (#13363). Chosen over #13541, which carried the identical commit.

Maintainer changes: the inline mapping used five `as any` casts, which `no-explicit-any` rejects in `open-sse/`. It is now two typed helpers (`adaptGeminiRequestForZed`, `adaptResponsesRequestForZed`, exposed through `__test__`) plus a small mode table; behavior is unchanged. Added `tests/unit/zed-hosted-proxy-enums-13362.test.ts` (4 cases). Zed suites 47/47; `check:open-sse-typecheck` clean.

Validated in one consolidated batch of this series (37 PRs boarded together on `release/v3.8.51`): `typecheck:core`, `check:open-sse-typecheck` and `check:dashboard-typecheck` clean; ESLint clean on every changed file; file-size, complexity, cognitive-complexity, changelog-integrity, docs-counts, docs-sync and migration-numbering gates green (only the pre-existing `open-sse/utils/stream.ts` file-size red remains, inherited from the base); 3,743 focused `node:test` cases plus 34 vitest cases green.

Thanks @KooshaPari!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…iegosouzapw#13543)

Zed-hosted requests are re-mapped to the narrower enums the Zed proxy validates. Responses input items with `role: "developer"` go back to `system` (diegosouzapw#13362). For Gemini, `safetySettings[].threshold: "OFF"` becomes `BLOCK_NONE` and `functionCallingConfig.mode` `VALIDATED`/`AUTO`/`ANY`/`NONE` become Zed's lowercase `auto`/`any`/`none` (diegosouzapw#13363). Chosen over diegosouzapw#13541, which carried the identical commit.

Maintainer changes: the inline mapping used five `as any` casts, which `no-explicit-any` rejects in `open-sse/`. It is now two typed helpers (`adaptGeminiRequestForZed`, `adaptResponsesRequestForZed`, exposed through `__test__`) plus a small mode table; behavior is unchanged. Added `tests/unit/zed-hosted-proxy-enums-13362.test.ts` (4 cases). Zed suites 47/47; `check:open-sse-typecheck` clean.

Validated in one consolidated batch of this series (37 PRs boarded together on `release/v3.8.51`): `typecheck:core`, `check:open-sse-typecheck` and `check:dashboard-typecheck` clean; ESLint clean on every changed file; file-size, complexity, cognitive-complexity, changelog-integrity, docs-counts, docs-sync and migration-numbering gates green (only the pre-existing `open-sse/utils/stream.ts` file-size red remains, inherited from the base); 3,743 focused `node:test` cases plus 34 vitest cases green.

Thanks @KooshaPari!
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.

fix(providers): supportsNativeWebSearchFallbackBypass misses FORMATS.ANTIGRAVITY / antigravity provider

3 participants