Skip to content

chore(deps): update @google/genai from 1.30.0 to 2.6.0 - #4485

Merged
tanzhenxin merged 7 commits into
QwenLM:mainfrom
InfiniteUselessness:chore/bump-google-genai-sdk-to-2.6.0
Jun 3, 2026
Merged

chore(deps): update @google/genai from 1.30.0 to 2.6.0#4485
tanzhenxin merged 7 commits into
QwenLM:mainfrom
InfiniteUselessness:chore/bump-google-genai-sdk-to-2.6.0

Conversation

@InfiniteUselessness

Copy link
Copy Markdown
Contributor

Summary

  • This PR updates the @google/genai dependency to a newer version (2.6.0).
  • SDK update unlocks support for new FinishReason enum values and newly released models at the SDK layer. To use specific models, users should consult Google's officially published model list and configure them in modelProviders.

Validation

 Test Files  46 passed (46)
      Tests  419 passed (419)
   Start at  20:00:23
   Duration  8.38s (transform 5.76s, setup 0ms, collect 71.82s, tests 3.25s, environment 5.43s, prepare 7.09s)

 % Coverage report from v8
---------------------------------|---------|----------|---------|---------|---------------------------------------------
File                             | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------------|---------|----------|---------|---------|---------------------------------------------
All files                        |   46.81 |     67.4 |   51.76 |   46.81 |
 src                             |   49.41 |    66.31 |      42 |   49.41 |
  diff-manager.ts                |   20.98 |       80 |   18.18 |   20.98 | ...,365-390,395-405,409-416,420-421,425-426
  extension.ts                   |   52.22 |    78.57 |      25 |   52.22 | ...,296-300,325,328,333-394,397-401,406-422
  ide-server.ts                  |    65.5 |    73.33 |   70.58 |    65.5 | ...-371,373-378,405-407,423,445-447,456-472
  open-files-manager.ts          |   57.59 |    48.38 |     100 |   57.59 | ...,168-169,172-173,178,180-181,186,188-192
 src/commands                    |   66.35 |    83.33 |     100 |   66.35 |
  index.ts                       |   66.35 |    83.33 |     100 |   66.35 | 55-61,69-87,109,131-132,139-145
 src/constants                   |     100 |      100 |     100 |     100 |
  acpSchema.ts                   |     100 |      100 |     100 |     100 |
  loadingMessages.ts             |     100 |      100 |     100 |     100 |
  viewIds.ts                     |     100 |      100 |     100 |     100 |
 src/services                    |   45.42 |    74.46 |   46.11 |   45.42 |
  acpConnection.ts               |   17.29 |    78.94 |   28.12 |   17.29 | ...,608-613,616-624,627-638,645-656,659-670
  acpFileHandler.ts              |      86 |    72.22 |     100 |      86 | 81,94-95,150-151,154-158,168-172
  conversationStore.ts           |   70.05 |    86.66 |   69.23 |   70.05 | ...64,92-93,101-106,118-119,164-169,200-207
  daemonIdeConnection.ts         |   85.42 |    84.55 |   85.71 |   85.42 | ...-442,458-459,563-568,580,603-604,616-617
  qwenAgentManager.ts            |   14.44 |       50 |   11.86 |   14.44 | ...,1570-1571,1573-1577,1581-1601,1604-1630
  qwenConnectionHandler.ts       |   62.03 |    56.52 |     100 |   62.03 | 143,145-150,158-173,175-176,216-267,270-274
  qwenSessionManager.ts          |   13.97 |      100 |       0 |   13.97 | 28-36,42-43,53-75,84-123,133-149
  qwenSessionReader.ts           |    5.91 |      100 |       0 |    5.91 | ...,210-322,326-349,355-389,395-411,417-456
  qwenSessionUpdateHandler.ts    |    79.9 |    56.25 |     100 |    79.9 | ...-100,187-191,210-214,219-220,226-227,272
  readonlyFileSystemProvider.ts  |   28.46 |      100 |   21.05 |   28.46 | ...,151-175,178-183,186-187,193-194,197-203
  sessionExportService.ts        |   93.54 |    78.94 |      60 |   93.54 | 77,79,81,83-85
  settingsWriter.ts              |   89.34 |    78.68 |   95.45 |   89.34 | ...-595,600-601,618-624,631-632,703,709-713
  subscriptionPlanDefinitions.ts |   91.05 |    65.51 |    87.5 |   91.05 | 176-177,181-182,249,263-264,278-283,290-294
 src/services/open-files-manager |    46.6 |     91.3 |   64.28 |    46.6 |
  constants.ts                   |     100 |      100 |     100 |     100 |
  notebook-handler.ts            |    8.43 |      100 |       0 |    8.43 | 18-43,46-82,85-119
  text-handler.ts                |    92.1 |       75 |     100 |    92.1 | 47-48,55
  utils.ts                       |   62.19 |      100 |   77.77 |   62.19 | 15-16,70-101
 src/types                       |    84.5 |       25 |   16.66 |    84.5 |
  acpTypes.ts                    |     100 |      100 |     100 |     100 |
  approvalModeTypes.ts           |   89.09 |    66.66 |     100 |   89.09 | 82-87
  approvalModeValueTypes.ts      |       0 |        0 |       0 |       0 | 1
  chatTypes.ts                   |       0 |        0 |       0 |       0 | 1
  completionItemTypes.ts         |       0 |        0 |       0 |       0 | 1
  connectionTypes.ts             |       0 |        0 |       0 |       0 | 1
  webviewMessageTypes.ts         |       0 |        0 |       0 |       0 | 1
 src/utils                       |   72.42 |    78.66 |    92.1 |   72.42 |
  acpModelInfo.ts                |   78.63 |     83.5 |   85.71 |   78.63 | ...,197-203,213-239,242-245,286-287,293-299
  authErrors.ts                  |   72.54 |    44.44 |     100 |   72.54 | 13-14,18-19,31-32,43-44,48-49,53-54,66-67
  authNotificationHandler.ts     |   14.28 |      100 |       0 |   14.28 | 20-50
  editorGroupUtils.ts            |     100 |      100 |     100 |     100 |
  errorMessage.ts                |   73.86 |    53.33 |     100 |   73.86 | ...9,25-26,45-49,51,58-59,64,79,90-94,96-97
  exportSlashCommand.ts          |     100 |      100 |     100 |     100 |
  imageSupport.ts                |   93.51 |    75.86 |     100 |   93.51 | 105-106,123-124,131,150-151
  logger.ts                      |   83.33 |    66.66 |     100 |   83.33 | 15-16
  paths.ts                       |   96.62 |    94.59 |     100 |   96.62 | 58-59,116
  platform.ts                    |     100 |      100 |     100 |     100 |
  tokenLimits.ts                 |       0 |        0 |       0 |       0 | 1-196
 src/webview/handlers            |   48.02 |    58.99 |   46.57 |   48.02 |
  AuthMessageHandler.ts          |   82.03 |    76.11 |      75 |   82.03 | ...55,75-94,218-220,225-231,379-380,410-422
  BaseMessageHandler.ts          |     100 |      100 |     100 |     100 |
  EditorMessageHandler.ts        |   12.64 |      100 |       0 |   12.64 | 18-19,22-38,44-76,82-113
  FileMessageHandler.ts          |   40.75 |    38.46 |    37.5 |   40.75 | ...,647-650,653-654,658-674,698-705,709-720
  MessageRouter.ts               |   14.04 |        0 |       0 |   14.04 | ...,147-148,154-157,163-166,174-185,191-192
  SessionMessageHandler.ts       |   48.19 |    57.23 |   55.55 |   48.19 | ...,1469-1518,1525-1538,1548-1549,1570-1577
 src/webview/hooks               |   35.93 |    45.31 |   47.36 |   35.93 |
  useCompletionTrigger.ts        |       0 |        0 |       0 |       0 | 1-376
  useImage.ts                    |   20.85 |    66.66 |   23.07 |   20.85 | ...-130,140,159-182,185-285,288-383,388-503
  useMessageSubmit.ts            |   66.02 |       52 |     100 |   66.02 | ...,113-128,144-154,158-166,179-180,182-188
  useToolCalls.ts                |    48.9 |    56.41 |   44.44 |    48.9 | ...-131,137-175,190-196,203-212,228-239,250
  useVSCode.ts                   |    12.5 |      100 |       0 |    12.5 | 25-46,53-54
  useWebViewMessages.ts          |   45.18 |    35.84 |   81.81 |   45.18 | ...-1297,1300-1310,1327-1329,1341-1346,1349
 src/webview/hooks/file          |       0 |        0 |       0 |       0 |
  useFileContext.ts              |       0 |        0 |       0 |       0 | 1-191
 src/webview/hooks/message       |   86.04 |    66.66 |   66.66 |   86.04 |
  useMessageHandling.ts          |   86.04 |    66.66 |   66.66 |   86.04 | ...-132,139-140,147-148,168-169,184,199-200
 src/webview/hooks/session       |       0 |        0 |       0 |       0 |
  useSessionManagement.ts        |       0 |        0 |       0 |       0 | 1-199
 src/webview/providers           |   42.76 |    65.75 |   52.63 |   42.76 |
  ChatProviderRegistry.ts        |     100 |      100 |     100 |     100 |
  ChatWebviewViewProvider.ts     |     100 |      100 |     100 |     100 |
  MessageHandler.ts              |   29.16 |        0 |       0 |   29.16 | ...9-50,56-57,63-66,72-75,81-87,93-94,97-98
  PanelManager.ts                |   12.23 |      100 |    7.69 |   12.23 | ...,241-283,290-358,365-383,390-403,409-412
  WebViewContent.ts              |     100 |      100 |     100 |     100 |
  WebViewProvider.ts             |   44.69 |     63.4 |   61.01 |   44.69 | ...,2417-2418,2426-2444,2466-2470,2478-2494
  chatViewRegistration.ts        |     100 |       50 |     100 |     100 | 21
 src/webview/utils               |   56.86 |    78.66 |   76.92 |   56.86 |
  completionUtils.ts             |     100 |      100 |     100 |     100 |
  contextUsage.ts                |    93.1 |       80 |     100 |    93.1 | 16-17
  diffStats.ts                   |       0 |        0 |       0 |       0 | 1-160
  diffUtils.ts                   |       0 |        0 |       0 |       0 | 1-49
  discontinuedModel.ts           |     100 |      100 |     100 |     100 |
  imageHandler.ts                |   66.15 |    76.19 |   77.77 |   66.15 | ...80,83-84,136-141,157-158,197-241,244-261
  panelTitleUtils.ts             |     100 |      100 |     100 |     100 |
  resourceUrl.ts                 |       0 |        0 |       0 |       0 | 1-115
  sessionGrouping.ts             |       0 |        0 |       0 |       0 | 1-9
  slashCommandUtils.ts           |   95.77 |    82.35 |     100 |   95.77 | 19-20,74
  utils.ts                       |     100 |      100 |     100 |     100 |
  webviewUtils.ts                |     100 |    66.66 |     100 |     100 | 15
---------------------------------|---------|----------|---------|---------|--------------------------------------------- 

@wenshao wenshao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No review findings. Downgraded from Approve to Comment: CI failing (Test on macos-latest, windows-latest, ubuntu-latest + Lint). The code changes are clean — SDK bump is correct, FinishReason exhaustiveness enforced by TypeScript, all 16k tests pass locally. Please investigate the CI failures before merging. — qwen3.7-max via Qwen Code /review

@wenshao wenshao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Suggestion] Test coverage gap: the two new FinishReason values (IMAGE_RECITATION, IMAGE_OTHER) added to the finishReasonMessages mapping in useGeminiStream.ts have no corresponding entries in the testCases array of useGeminiStream.test.tsx (~line 3910). Consider adding test cases for these new values (and the pre-existing IMAGE_PROHIBITED_CONTENT / NO_IMAGE which are also untested).

— qwen3.7-max via Qwen Code /review

[FinishReason.NO_IMAGE]: 'Response stopped due to no image.',
[FinishReason.IMAGE_RECITATION]:
'Response stopped due to image recitation policy.',
[FinishReason.IMAGE_OTHER]:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Suggestion] The IMAGE_OTHER message says "other image safety reasons" but the SDK defines IMAGE_OTHER as "Image generation stopped for a reason not otherwise specified" — not necessarily safety-related. Consider rewording:

Suggested change
[FinishReason.IMAGE_OTHER]:
[FinishReason.IMAGE_OTHER]:
'Response stopped due to other image-related reasons.',

— qwen3.7-max via Qwen Code /review

"dependencies": {
"@anthropic-ai/sdk": "^0.36.1",
"@google/genai": "1.30.0",
"@google/genai": "2.6.0",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Suggestion] @google/genai@2.6.0 declares @modelcontextprotocol/sdk@^1.25.2 as an optional peer dependency, but the lockfile resolves 1.25.1 which does not satisfy ^1.25.2. Since the peer dep is optional, npm install won't warn — but mcpToTool() (used in packages/core/src/tools/mcp-client.ts) may run against a version the SDK wasn't tested with. Consider bumping @modelcontextprotocol/sdk to ^1.25.2.

— qwen3.7-max via Qwen Code /review

…nish reason handling

- bump @modelcontextprotocol/sdk from ^1.25.1 to ^1.25.2 in all 4 packages
- fix IMAGE_OTHER message to accurately describe non-safety reasons
- add test coverage for IMAGE_RECITATION, IMAGE_OTHER, IMAGE_PROHIBITED_CONTENT, NO_IMAGE
- map RECITATION, IMAGE_SAFETY, IMAGE_RECITATION, IMAGE_PROHIBITED_CONTENT, IMAGE_OTHER, NO_IMAGE to content_filter in mapGeminiFinishReasonToOpenAI
- remove dead RECITATION fallback code
case FinishReason.MAX_TOKENS:
return 'length';
case FinishReason.SAFETY:
case FinishReason.RECITATION:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Suggestion] The 6 new switch cases (RECITATION, IMAGE_SAFETY, IMAGE_RECITATION, IMAGE_PROHIBITED_CONTENT, IMAGE_OTHER, NO_IMAGE) in mapGeminiFinishReasonToOpenAI have no test coverage in converter.test.ts. The coverage added in useGeminiStream.test.tsx tests the display messages (a separate code path), not the finish_reason mapping. A regression that changes one of these mappings would not be caught.

Consider adding a parameterized test:

it.each([
  [FinishReason.RECITATION, 'content_filter'],
  [FinishReason.IMAGE_SAFETY, 'content_filter'],
  [FinishReason.IMAGE_RECITATION, 'content_filter'],
  [FinishReason.IMAGE_PROHIBITED_CONTENT, 'content_filter'],
  [FinishReason.IMAGE_OTHER, 'content_filter'],
  [FinishReason.NO_IMAGE, 'content_filter'],
])('maps %s to %s', (reason, expected) => {
  // test via convertGeminiResponseToOpenAI or export mapGeminiFinishReasonToOpenAI
});

— qwen3.7-max via Qwen Code /review

Comment thread packages/core/src/core/openaiContentGenerator/converter.ts Outdated
Comment thread packages/cli/src/ui/hooks/useGeminiStream.ts
Comment thread packages/core/src/core/openaiContentGenerator/converter.test.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/converter.test.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/converter.ts
…rter; add BLOCKLIST/PROHIBITED_CONTENT/SPII finish reasons

@wenshao wenshao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No review findings. Previous R4 Critical issues (TS2352 cast + eslint type-import) are resolved. tsc clean, eslint clean, 216 tests pass. — qwen3.7-max via Qwen Code /review

@tanzhenxin tanzhenxin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving — merging after an end-to-end smoke test of the 1.x→2.x bump, to cover what CI's compile-time checks can't.

Smoke test summary

Built and bundled the branch with @google/genai@2.6.0 actually installed, then made real model calls through the OpenAI-compatible path (where the new finish-reason conversion and the 2.6.0 types run at runtime):

  • ✅ Build + esbuild bundle both succeed against 2.6.0
  • ✅ Text generation — finish_reason=stop handled, correct response, token usage accounted
  • ✅ Structured side-query (auto-memory recall) and subagent calls run clean
  • ✅ Tool-calling round-trip — tool_calls parsed, tool executed, multi-turn loop completes

Both runs exit cleanly with no runtime errors.

Scope notes (non-blocking): this PR also bundles @modelcontextprotocol/sdk 1.25.1→1.25.2 and @types/react/-dom ^18→^19 (web-templates devDeps) — the squash commit records all three so history stays honest. The native Gemini (Google AI / Vertex) path wasn't exercised here; the only change touching it is the streaming finish-reason display strings. The new content_filter mappings are covered by this PR's unit tests.

Thanks @InfiniteUselessness!

@tanzhenxin
tanzhenxin merged commit d8add21 into QwenLM:main Jun 3, 2026
9 checks passed
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.

3 participants