fix(providers): include FORMATS.ANTIGRAVITY in native web search bypass - #13541
Closed
KooshaPari wants to merge 1 commit into
Closed
KooshaPari wants to merge 1 commit into
KooshaPari wants to merge 1 commit into
Conversation
…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
Owner
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!
5 tasks done
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!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13447
Problem
In
open-sse/services/webSearchFallback.ts,supportsNativeWebSearchFallbackBypass()only checks forFORMATS.GEMINI, but the Antigravity provider usesFORMATS.ANTIGRAVITY. This causes OmniRoute to rewriteweb_searchintoomniroute_web_search, which Responses clients reject as an undeclared tool.Fix
Add
FORMATS.ANTIGRAVITYandprovider === 'antigravity'to the native bypass check. The Antigravity translator already mapsweb_searchto Google Search grounding natively.Changes
open-sse/services/webSearchFallback.ts: Add Antigravity to the native web search bypass check