You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: upgrade Gemini SDK with continuation regressions - #2446
Upgrade the direct Gemini SDK from 2.24.0 to 2.30.0 so automatic continuation recovers dropped hops, retains grounding references, stops on prompt feedback, and surfaces genuine provider/transport errors. Twelve offline regressions exercise the installed public SDK through controlled HTTP/SSE responses; Gemini 3.8 and older-model request parameters remain covered. The app's gateway routing, Studio feature flags and production handlers are unchanged.
Refreshing against current main also exposed inherited npm advisory findings. This PR applies compatible direct updates and scoped overrides, preserves existing dependency majors and application behavior, and makes the npm audit job enforce the committed lock rather than tolerate findings. The eight-file scope is the root/web manifests and lockfile, the original SDK test, a package-runtime test, the audit workflow and its regression test, and the corresponding merge-policy paragraph.
The new runtime test covers actual MCP/Zod input-schema validation, native Sharp PNG processing, and each selected consumer's own Undici Agent/fetch pair against a loopback server. The MCP SDK is explicitly declared as a web development dependency because that test imports it; workspace-only Docker installs otherwise omitted the root-only development dependency during Next's typecheck. Tests and type checks remain enabled, and that declaration does not change any resolved package version.
The audit job checks the PR head, installs with declared npm 10.8.0 using npm ci --ignore-scripts --no-audit --no-fund, fails on high/critical advisories or audit errors, and retains the same invocation's JSON report even on failure. Other scans retain their existing behavior.
Dependency compatibility
Package / consumer
Resolved version
Compatibility boundary
@google/genai
2.30.0
Both direct floors ^2.30.0; original contract and lock object preserved
Next / Next ESLint config
16.4.3
Existing major 16 retained
MCP SDK
1.32.2
Existing major 1; web test dependency explicitly declared
Zod
4.6.7
Existing major 4; no forced replacement of a Zod-3-only consumer
Undici
6.29.1 / 7.30.1 / 8.12.3
Each consumer's existing major retained
Vite
8.3.5
Existing major 8 retained
Root / web Vitest
4.1.12 / 5.0.5
Separate existing majors retained
The Zod override deliberately advances Vercel's exact 4.1.11 and Workflow's ~4.3.6 dependency constraints. Actual Vercel config parsing, Workflow run/queue validation, AI SDK schema conversion and MCP tool validation passed positive/negative tests with 4.6.7. This is a tested same-major override, not a claim that those narrow upstream pins accept the new version. Scoped fixes also cover body-parser, brace-expansion 1.x, Hono/node-server, fast-uri, ip-address and qs. Existing unrelated overrides remain intact.
Package and versions: direct Next 16.3.8 → 16.4.3; direct/root MCP SDK 1.30.1 → 1.32.2; direct/root Undici 8.11.0 → 8.12.3, with transitive Undici 6/7 retained under Blob, AI SDK and Workflow consumers; direct/web and transitive Zod copies → 4.6.7. Direct/development classifications remain intentional; the new web MCP entry is a development dependency of its actual test import.
Validation: clean npm 10.8.0 and 11.19.0 installs, local complete web suite/lint/typecheck/build and consumer regressions passed. The hosted npm-audit job at 035150c checked that exact head, ran the locked fail-closed gate and reported zero findings at every severity. The downloaded JSON artifact matches the logged report and its provider archive digest.
Rollback: revert the scoped repair through a reviewed PR, restore both Gemini manifest floors and SDK lock entry together if reverting SDK behavior, preserve unrelated main changes, and reassess any vulnerabilities reintroduced by a dependency rollback.
Executed validation
Local final SDK/security candidate: Node 24.20.0, actual clean installs under npm 10.8.0 and 11.19.0; 1,540 web tests passed / 28 skipped, full lint/typecheck and unchanged-config production build passed, Next generated 53 static pages, dependency tree valid, full npm audit zero. Independent Node 22.23.4 review passed 158 focused Gemini/package/workflow/security tests, six Python workflow/policy tests, 13 actual consumer-schema assertions, and actionlint v1.7.12.
For the two-entry workspace-dependency correction: a fresh isolated install using npm@10.8.0 ci --workspace=apps/web --legacy-peer-deps --no-audit --no-fund installed 937 packages. The unchanged production Next build then passed compilation, typechecking and 53 static pages with the test files included. Twenty actual SDK/runtime regression tests passed and a fresh full npm audit remained zero. All other lockfile values, versions and integrity hashes are identical. The subsequent Linux Docker job at published head 035150c independently passed the actual workspace install, compilation, typechecking, all 53 static pages and image export.
Hosted state and remaining limits
The reviewed published head is 035150c6216e7502ba9512e5e3a1fbbc4c6e0bac, compared with main f258db8a6cc38c064ba4d7ca1baee02bedbd0534. All 28 observed check runs are terminal: 25 successful and three skipped, with no failed or pending check. CI's synthetic merge d37ef226bafeae7d3e9f74896681f66f62b4b214 has the same complete tree 883303dcfadd75cfc8ca646cb4285e0c195c6735 as the published head.
Frontend: 1,567 passed / one live-model case skipped; CI installed Redis and executed the 27 cases skipped locally.
Python 3.11 and 3.12: 2,990 passed / nine deselected / five xpassed per version, plus 38 MCP security tests. Coverage: 3,195 passed / two skipped / five xpassed, 84.86% against the 84.2% threshold. The GitHub coverage artifact was saved. The optional Qlty upload did not occur because neither OIDC nor token was configured; its tolerated error is not upload success.
Docker build passed compilation, typechecking, 53 static pages and complete image export. The workspace MCP development declaration resolves the actual prior Docker-only typecheck failure.
Dependency review, attempt 2: both snapshot submissions, advisory review, strict evidence recording and upload passed. The downloaded evidence artifact binds the exact base/head/run/attempt and contains all 139 dependency changes. Its archive digest matches GitHub, and the full saved diff independently passes the unchanged lock/manifest guard. No unrelated Python-manifest change or snapshot warning was accepted. The earlier warning failure is retained as history; source and policy were not weakened to make the retry pass.
Vercel Agent Review completed with zero suggestions; the freshly fetched inline-thread list was empty. Vercel commit status reports a completed preview; this is not live Gemini or production acceptance.
The Trivy image scan completed under main's existing report-only policy (exit-code: 0). Its downloaded image evidence artifact binds the image to 035150c and contains 250 high/critical package findings: 249 HIGH and one CRITICAL across the OS, global/bundled Node packages and Python libraries. These remain tracked under #2396 and are not resolved by a zero-finding repository npm lock audit. No clean-container or production-readiness claim is made.
Automatic Gemini continuation may issue additional provider requests when a continuation token is returned. Offline tests do not establish provider availability, cost, latency or gateway reliability. No live paid provider request, production deployment or merge was performed for this work. The Gemini 2.30 floor and regression suite must survive reconciliation with overlapping dependency PR #2444.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Required exact-head CI, build, and security validation remain unconfirmed in the supplied evidence.
No open issues 🎉
What changed in this PR
Upgrades the direct Gemini SDK and adds offline regression coverage for continuation reliability, addressing #2445 without changing gateway routing or application behavior.
Changes:
Raises root and web @google/genai floors to ^2.30.0.
Head: b54bcfef377278f9ad293cb5b698d455744df5d7; base: 560f07120dee5294da0af0f2aab8eec8b79de8b5.
Decision: TEST complete; implementation READY FOR MERGE REVIEW, not merged.
All 21 applicable checks from MERGE_POLICY.md plus the active issue-closing ruleset report success on this exact head, including build, all three Python matrices, test-frontend, dependency-review, coverage, E2E, CodeQL and security scans. CI run.
Copilot completed review with no open code issues; its earlier request to confirm CI is now satisfied by the exact-head results above. Inline review threads: zero. CodeRabbit skipped automatic review due to repository star policy; its status is success. No independent human approval is claimed.
Local: 44 focused tests pass; full web suite 1532 pass / 28 skip (26 optional Origin GATE Redis, one Video Pack store integration, one clip probe). Type-check and targeted lint pass. Local no-upload build succeeds after moving aside aborted build cache. Repository config restored; worktree clean. Remote exact-config Build web app and Build web production image both pass.
Package and lockfile diff is limited to @google/genai 2.24.0 → 2.30.0; 12 transport-level regression cases added. No app routing changes.
Standard local build initially hit an automatic-approval rejection for Sentry external egress; the safer local build explicitly disabled telemetry/uploads/releases. No override of that rejection was attempted.
Durable ledger: implementation action120; publication/reconciliation actions121–135, associated read-back reviews. Issue2445 links this PR.
Next action: obtain approval identifying PR #2446 or this exact head under the current Watch exact-PR merge rule; then re-fetch head, checks, reviews, mergeability and use expected-head protection to merge. Do not infer production acceptance or live Gemini cost/latency from offline fixtures. No production deployment was initiated manually.
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
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.
Closes #2445
Changes and behavior
Upgrade the direct Gemini SDK from 2.24.0 to 2.30.0 so automatic continuation recovers dropped hops, retains grounding references, stops on prompt feedback, and surfaces genuine provider/transport errors. Twelve offline regressions exercise the installed public SDK through controlled HTTP/SSE responses; Gemini 3.8 and older-model request parameters remain covered. The app's gateway routing, Studio feature flags and production handlers are unchanged.
Google's 2.30.0 changelog, continuation fix and grounding-reference fix are the primary SDK sources.
Refreshing against current main also exposed inherited npm advisory findings. This PR applies compatible direct updates and scoped overrides, preserves existing dependency majors and application behavior, and makes the npm audit job enforce the committed lock rather than tolerate findings. The eight-file scope is the root/web manifests and lockfile, the original SDK test, a package-runtime test, the audit workflow and its regression test, and the corresponding merge-policy paragraph.
The new runtime test covers actual MCP/Zod input-schema validation, native Sharp PNG processing, and each selected consumer's own Undici Agent/fetch pair against a loopback server. The MCP SDK is explicitly declared as a web development dependency because that test imports it; workspace-only Docker installs otherwise omitted the root-only development dependency during Next's typecheck. Tests and type checks remain enabled, and that declaration does not change any resolved package version.
The audit job checks the PR head, installs with declared npm 10.8.0 using
npm ci --ignore-scripts --no-audit --no-fund, fails on high/critical advisories or audit errors, and retains the same invocation's JSON report even on failure. Other scans retain their existing behavior.Dependency compatibility
@google/genai^2.30.0; original contract and lock object preservedThe Zod override deliberately advances Vercel's exact
4.1.11and Workflow's~4.3.6dependency constraints. Actual Vercel config parsing, Workflow run/queue validation, AI SDK schema conversion and MCP tool validation passed positive/negative tests with 4.6.7. This is a tested same-major override, not a claim that those narrow upstream pins accept the new version. Scoped fixes also cover body-parser, brace-expansion 1.x, Hono/node-server, fast-uri, ip-address and qs. Existing unrelated overrides remain intact.Security dependency evidence
035150cchecked that exact head, ran the locked fail-closed gate and reported zero findings at every severity. The downloaded JSON artifact matches the logged report and its provider archive digest.Executed validation
Local final SDK/security candidate: Node 24.20.0, actual clean installs under npm 10.8.0 and 11.19.0; 1,540 web tests passed / 28 skipped, full lint/typecheck and unchanged-config production build passed, Next generated 53 static pages, dependency tree valid, full npm audit zero. Independent Node 22.23.4 review passed 158 focused Gemini/package/workflow/security tests, six Python workflow/policy tests, 13 actual consumer-schema assertions, and actionlint v1.7.12.
For the two-entry workspace-dependency correction: a fresh isolated install using
npm@10.8.0 ci --workspace=apps/web --legacy-peer-deps --no-audit --no-fundinstalled 937 packages. The unchanged production Next build then passed compilation, typechecking and 53 static pages with the test files included. Twenty actual SDK/runtime regression tests passed and a fresh full npm audit remained zero. All other lockfile values, versions and integrity hashes are identical. The subsequent Linux Docker job at published head035150cindependently passed the actual workspace install, compilation, typechecking, all 53 static pages and image export.Hosted state and remaining limits
The reviewed published head is
035150c6216e7502ba9512e5e3a1fbbc4c6e0bac, compared with mainf258db8a6cc38c064ba4d7ca1baee02bedbd0534. All 28 observed check runs are terminal: 25 successful and three skipped, with no failed or pending check. CI's synthetic merged37ef226bafeae7d3e9f74896681f66f62b4b214has the same complete tree883303dcfadd75cfc8ca646cb4285e0c195c6735as the published head.The Trivy image scan completed under main's existing report-only policy (
exit-code: 0). Its downloaded image evidence artifact binds the image to035150cand contains 250 high/critical package findings: 249 HIGH and one CRITICAL across the OS, global/bundled Node packages and Python libraries. These remain tracked under #2396 and are not resolved by a zero-finding repository npm lock audit. No clean-container or production-readiness claim is made.Automatic Gemini continuation may issue additional provider requests when a continuation token is returned. Offline tests do not establish provider availability, cost, latency or gateway reliability. No live paid provider request, production deployment or merge was performed for this work. The Gemini 2.30 floor and regression suite must survive reconciliation with overlapping dependency PR #2444.