@google/gemini-cli 0.46.0-preview.0 → 0.46.0-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/bundle/{chunk-4AGOZ7LL.js → chunk-24H54ISH.js} +7 -7
  2. package/bundle/{chunk-F2LLVPPS.js → chunk-3EC3ZLRQ.js} +2 -2
  3. package/bundle/{chunk-2GMVQS2Q.js → chunk-3WW2LTMX.js} +1 -1
  4. package/bundle/{chunk-ZXN4VW7M.js → chunk-4B7MDBUK.js} +1 -1
  5. package/bundle/{chunk-J444UQD3.js → chunk-5CWORGE3.js} +1 -1
  6. package/bundle/{chunk-HMR43ZX2.js → chunk-5IBYZHR7.js} +2 -2
  7. package/bundle/{chunk-QFEJQS5X.js → chunk-7Y6NU65D.js} +1 -1
  8. package/bundle/{chunk-4K3E3G6Z.js → chunk-EG7USKV5.js} +8 -5
  9. package/bundle/{chunk-SHFHGDWR.js → chunk-EZDKSTIF.js} +2 -2
  10. package/bundle/{chunk-RXG3JOOZ.js → chunk-GRD2P7HY.js} +1 -1
  11. package/bundle/chunk-HQNVDCXK.js +154 -0
  12. package/bundle/chunk-ILHDA6XU.js +17320 -0
  13. package/bundle/{chunk-XRDSBRG4.js → chunk-ITC7TFJU.js} +7560 -14072
  14. package/bundle/{chunk-BOJOJVNV.js → chunk-JF6RJW53.js} +1 -1
  15. package/bundle/chunk-JPYTHGMI.js +398 -0
  16. package/bundle/{chunk-FIM2LOYZ.js → chunk-KOJR46UO.js} +40 -23
  17. package/bundle/{chunk-MFYAVF7Y.js → chunk-KQ4V7ZN4.js} +67 -54
  18. package/bundle/chunk-O3UKVEBS.js +81685 -0
  19. package/bundle/{chunk-S2ICEQVC.js → chunk-ONUDATHO.js} +3 -3
  20. package/bundle/{chunk-HHFFICNK.js → chunk-QEVRJ7HY.js} +46 -23
  21. package/bundle/{chunk-LBE2WKE7.js → chunk-QFWAILKU.js} +3 -3
  22. package/bundle/{chunk-HZNEV3DS.js → chunk-QMCEWHRR.js} +1 -1
  23. package/bundle/{chunk-ZQGZKIDD.js → chunk-R4LEIQZM.js} +3 -3
  24. package/bundle/{chunk-5LUCCXOB.js → chunk-RXYIE5L5.js} +1 -1
  25. package/bundle/{chunk-GTRQQGSJ.js → chunk-UM53YDCH.js} +1 -1
  26. package/bundle/{chunk-YMNECODB.js → chunk-VEHSYWQT.js} +9 -8
  27. package/bundle/chunk-VETILJQA.js +1571 -0
  28. package/bundle/chunk-VOFVOS4I.js +118 -0
  29. package/bundle/chunk-WRWCUHAM.js +512 -0
  30. package/bundle/chunk-XVDCGVTF.js +394545 -0
  31. package/bundle/{chunk-TDYUKPZH.js → chunk-YINW7YTJ.js} +1 -1
  32. package/bundle/{chunk-773AJHDP.js → chunk-YIOYXRDP.js} +7 -7
  33. package/bundle/{cleanup-2WXD6UQP.js → cleanup-4ZTB4WMN.js} +2 -2
  34. package/bundle/{cleanup-L3CLNVX6.js → cleanup-7LLX4OFN.js} +2 -2
  35. package/bundle/{cleanup-SUDL37MT.js → cleanup-GI5426XS.js} +2 -2
  36. package/bundle/cleanup-ZBLVGXIK.js +32 -0
  37. package/bundle/{core-VVRQ2GQD.js → core-3UQQYNJF.js} +3 -1
  38. package/bundle/{devtoolsService-ZYCBBAV3.js → devtoolsService-GJWWZ2KK.js} +2 -2
  39. package/bundle/{devtoolsService-E62WA3CY.js → devtoolsService-UNQILSWI.js} +4 -3
  40. package/bundle/devtoolsService-Z2YXVMYF.js +856 -0
  41. package/bundle/{devtoolsService-GLW7S6PS.js → devtoolsService-ZYGDAPOV.js} +2 -2
  42. package/bundle/{dist-GPCRVPKS.js → dist-4NVM6I2N.js} +3 -1
  43. package/bundle/{core-MOYKPEYV.js → dist-LIQULVXZ.js} +3 -1
  44. package/bundle/dist-XPP357J7.js +2140 -0
  45. package/bundle/docs/reference/configuration.md +3 -1
  46. package/bundle/{gemini-R5NCXCEL.js → gemini-5WY2YO7R.js} +216 -197
  47. package/bundle/gemini-7GZVH4VW.js +16409 -0
  48. package/bundle/{gemini-2JTOIMGM.js → gemini-QDOVPRKF.js} +17 -14
  49. package/bundle/{gemini-KV5CHM4H.js → gemini-RBKWBGCC.js} +17 -14
  50. package/bundle/gemini.js +7 -7
  51. package/bundle/{interactiveCli-RMWTSIEN.js → interactiveCli-BMKHWEH4.js} +17 -11
  52. package/bundle/{interactiveCli-7SIMXKNU.js → interactiveCli-OEFOYFJU.js} +323 -298
  53. package/bundle/interactiveCli-OGE5OTZB.js +34742 -0
  54. package/bundle/{interactiveCli-HVAQTBJK.js → interactiveCli-W3CMLQIM.js} +17 -11
  55. package/bundle/{liteRtServerManager-FY23PYSD.js → liteRtServerManager-3QOJEGNL.js} +4 -4
  56. package/bundle/{liteRtServerManager-LDS45QKP.js → liteRtServerManager-HPVNUYFX.js} +4 -4
  57. package/bundle/{liteRtServerManager-BP7XKGNU.js → liteRtServerManager-Q6LTEYH4.js} +4 -4
  58. package/bundle/liteRtServerManager-YL4YRHOA.js +65 -0
  59. package/bundle/{oauth2-provider-VVNBQH45.js → oauth2-provider-3WXIASQA.js} +1 -1
  60. package/bundle/{oauth2-provider-KL44D6HV.js → oauth2-provider-CTPS7JLT.js} +1 -1
  61. package/bundle/{oauth2-provider-4SSSEI6P.js → oauth2-provider-K52EY6RG.js} +38 -72
  62. package/bundle/oauth2-provider-PJJE326A.js +235 -0
  63. package/bundle/{start-FRM2XDGC.js → start-25W6VZG6.js} +6 -6
  64. package/bundle/{start-OEPJINIW.js → start-JBJSIKIB.js} +6 -6
  65. package/bundle/{start-DLEOBFRC.js → start-PK22QMBT.js} +6 -6
  66. package/bundle/start-XAEHV6FV.js +18 -0
  67. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
2
2
  import {
3
3
  runExitCleanup
4
- } from "./chunk-2GMVQS2Q.js";
4
+ } from "./chunk-GRD2P7HY.js";
5
5
  import {
6
6
  __commonJS,
7
7
  __require
@@ -0,0 +1,398 @@
1
+ const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
2
+ import {
3
+ runExitCleanup
4
+ } from "./chunk-7Y6NU65D.js";
5
+ import {
6
+ RELEASE_CHANNEL_STABILITY,
7
+ debugLogger,
8
+ getChannelFromVersion,
9
+ isGitRepository
10
+ } from "./chunk-ITC7TFJU.js";
11
+
12
+ // packages/cli/src/utils/installationInfo.ts
13
+ import * as fs from "node:fs";
14
+ import * as path from "node:path";
15
+ import * as childProcess from "node:child_process";
16
+ import process2 from "node:process";
17
+ var isDevelopment = process2.env["NODE_ENV"] === "development";
18
+ function getInstallationInfo(projectRoot, isAutoUpdateEnabled) {
19
+ const cliPath = process2.argv[1];
20
+ if (!cliPath) {
21
+ return { packageManager: "unknown" /* UNKNOWN */, isGlobal: false };
22
+ }
23
+ try {
24
+ if (process2.env["IS_BINARY"] === "true") {
25
+ return {
26
+ packageManager: "binary" /* BINARY */,
27
+ isGlobal: true,
28
+ updateMessage: "Running as a standalone binary. Please update by downloading the latest version from GitHub."
29
+ };
30
+ }
31
+ const realPath = fs.realpathSync(cliPath).replace(/\\/g, "/");
32
+ const normalizedProjectRoot = projectRoot?.replace(/\\/g, "/");
33
+ const isGit = isGitRepository(process2.cwd());
34
+ if (isGit && normalizedProjectRoot && realPath.startsWith(normalizedProjectRoot) && !realPath.includes("/node_modules/")) {
35
+ return {
36
+ packageManager: "unknown" /* UNKNOWN */,
37
+ // Not managed by a package manager in this sense
38
+ isGlobal: false,
39
+ updateMessage: 'Running from a local git clone. Please update with "git pull".'
40
+ };
41
+ }
42
+ if (realPath.includes("/.npm/_npx") || realPath.includes("/npm/_npx")) {
43
+ return {
44
+ packageManager: "npx" /* NPX */,
45
+ isGlobal: false,
46
+ updateMessage: "Running via npx, update not applicable."
47
+ };
48
+ }
49
+ if (realPath.includes("/.pnpm/_pnpx") || realPath.includes("/.cache/pnpm/dlx")) {
50
+ return {
51
+ packageManager: "pnpx" /* PNPX */,
52
+ isGlobal: false,
53
+ updateMessage: "Running via pnpx, update not applicable."
54
+ };
55
+ }
56
+ if (process2.platform === "darwin") {
57
+ try {
58
+ const brewPrefix = childProcess.execSync("brew --prefix gemini-cli", {
59
+ encoding: "utf8",
60
+ stdio: ["ignore", "pipe", "ignore"]
61
+ }).trim();
62
+ const brewRealPath = fs.realpathSync(brewPrefix);
63
+ if (realPath.startsWith(brewRealPath)) {
64
+ return {
65
+ packageManager: "homebrew" /* HOMEBREW */,
66
+ isGlobal: true,
67
+ updateMessage: 'Installed via Homebrew. Please update with "brew upgrade gemini-cli".'
68
+ };
69
+ }
70
+ } catch {
71
+ }
72
+ }
73
+ if (realPath.includes("/.volta/") || realPath.includes("/Volta/")) {
74
+ const updateCommand2 = "volta install @google/gemini-cli@latest";
75
+ return {
76
+ packageManager: "volta" /* VOLTA */,
77
+ isGlobal: true,
78
+ updateCommand: updateCommand2,
79
+ updateMessage: isAutoUpdateEnabled ? "Installed with Volta. Attempting to automatically update now..." : `Please run ${updateCommand2} to update`
80
+ };
81
+ }
82
+ if (realPath.includes("/.pnpm/global") || realPath.includes("/.local/share/pnpm") || realPath.includes("/Library/pnpm/global/") || realPath.includes("/AppData/Local/pnpm/global/")) {
83
+ const updateCommand2 = "pnpm add -g @google/gemini-cli@latest";
84
+ return {
85
+ packageManager: "pnpm" /* PNPM */,
86
+ isGlobal: true,
87
+ updateCommand: updateCommand2,
88
+ updateMessage: isAutoUpdateEnabled ? "Installed with pnpm. Attempting to automatically update now..." : `Please run ${updateCommand2} to update`
89
+ };
90
+ }
91
+ if (realPath.includes("/.yarn/global")) {
92
+ const updateCommand2 = "yarn global add @google/gemini-cli@latest";
93
+ return {
94
+ packageManager: "yarn" /* YARN */,
95
+ isGlobal: true,
96
+ updateCommand: updateCommand2,
97
+ updateMessage: isAutoUpdateEnabled ? "Installed with yarn. Attempting to automatically update now..." : `Please run ${updateCommand2} to update`
98
+ };
99
+ }
100
+ if (realPath.includes("/.bun/install/cache")) {
101
+ return {
102
+ packageManager: "bunx" /* BUNX */,
103
+ isGlobal: false,
104
+ updateMessage: "Running via bunx, update not applicable."
105
+ };
106
+ }
107
+ if (realPath.includes("/.bun/install/global")) {
108
+ const updateCommand2 = "bun add -g @google/gemini-cli@latest";
109
+ return {
110
+ packageManager: "bun" /* BUN */,
111
+ isGlobal: true,
112
+ updateCommand: updateCommand2,
113
+ updateMessage: isAutoUpdateEnabled ? "Installed with bun. Attempting to automatically update now..." : `Please run ${updateCommand2} to update`
114
+ };
115
+ }
116
+ if (normalizedProjectRoot && realPath.startsWith(`${normalizedProjectRoot}/node_modules`)) {
117
+ let pm = "npm" /* NPM */;
118
+ if (fs.existsSync(path.join(projectRoot, "yarn.lock"))) {
119
+ pm = "yarn" /* YARN */;
120
+ } else if (fs.existsSync(path.join(projectRoot, "pnpm-lock.yaml"))) {
121
+ pm = "pnpm" /* PNPM */;
122
+ } else if (fs.existsSync(path.join(projectRoot, "bun.lockb"))) {
123
+ pm = "bun" /* BUN */;
124
+ }
125
+ return {
126
+ packageManager: pm,
127
+ isGlobal: false,
128
+ updateMessage: "Locally installed. Please update via your project's package.json."
129
+ };
130
+ }
131
+ const updateCommand = "npm install -g @google/gemini-cli@latest";
132
+ return {
133
+ packageManager: "npm" /* NPM */,
134
+ isGlobal: true,
135
+ updateCommand,
136
+ updateMessage: isAutoUpdateEnabled ? "Installed with npm. Attempting to automatically update now..." : `Please run ${updateCommand} to update`
137
+ };
138
+ } catch (error) {
139
+ debugLogger.log(error);
140
+ return { packageManager: "unknown" /* UNKNOWN */, isGlobal: false };
141
+ }
142
+ }
143
+
144
+ // packages/cli/src/utils/updateEventEmitter.ts
145
+ import { EventEmitter } from "node:events";
146
+ var updateEventEmitter = new EventEmitter();
147
+
148
+ // packages/cli/src/utils/spawnWrapper.ts
149
+ import { spawn } from "node:child_process";
150
+ var spawnWrapper = spawn;
151
+
152
+ // packages/cli/src/utils/handleAutoUpdate.ts
153
+ var _updateInProgress = false;
154
+ async function waitForUpdateCompletion(timeoutMs = 3e4) {
155
+ if (!_updateInProgress) {
156
+ return;
157
+ }
158
+ debugLogger.log(
159
+ "\nGemini CLI is waiting for a background update to complete before restarting..."
160
+ );
161
+ return new Promise((resolve) => {
162
+ if (!_updateInProgress) {
163
+ resolve();
164
+ return;
165
+ }
166
+ const timer = setTimeout(cleanup, timeoutMs);
167
+ function cleanup() {
168
+ clearTimeout(timer);
169
+ updateEventEmitter.off("update-success", cleanup);
170
+ updateEventEmitter.off("update-failed", cleanup);
171
+ resolve();
172
+ }
173
+ updateEventEmitter.once("update-success", cleanup);
174
+ updateEventEmitter.once("update-failed", cleanup);
175
+ });
176
+ }
177
+ function handleAutoUpdate(info, settings, projectRoot, isSandboxEnabled, spawnFn = spawnWrapper) {
178
+ if (!info) {
179
+ return;
180
+ }
181
+ if (isSandboxEnabled) {
182
+ updateEventEmitter.emit("update-info", {
183
+ message: `${info.message}
184
+ Automatic update is not available in sandbox mode.`
185
+ });
186
+ return;
187
+ }
188
+ if (!settings.merged.general.enableAutoUpdateNotification) {
189
+ return;
190
+ }
191
+ const installationInfo = getInstallationInfo(
192
+ projectRoot,
193
+ settings.merged.general.enableAutoUpdate
194
+ );
195
+ if ([
196
+ "npx" /* NPX */,
197
+ "pnpx" /* PNPX */,
198
+ "bunx" /* BUNX */,
199
+ "binary" /* BINARY */
200
+ ].includes(installationInfo.packageManager)) {
201
+ return;
202
+ }
203
+ let combinedMessage = info.message;
204
+ if (installationInfo.updateMessage) {
205
+ combinedMessage += `
206
+ ${installationInfo.updateMessage}`;
207
+ }
208
+ if (!installationInfo.updateCommand || !settings.merged.general.enableAutoUpdate) {
209
+ updateEventEmitter.emit("update-received", {
210
+ ...info,
211
+ message: combinedMessage,
212
+ isUpdating: false
213
+ });
214
+ return;
215
+ }
216
+ updateEventEmitter.emit("update-received", {
217
+ ...info,
218
+ message: combinedMessage,
219
+ isUpdating: true
220
+ });
221
+ if (_updateInProgress) {
222
+ return;
223
+ }
224
+ const currentVersion = info.update.current;
225
+ if (!currentVersion) {
226
+ debugLogger.warn(
227
+ "Update check: current version is missing. Skipping automatic update for safety."
228
+ );
229
+ return;
230
+ }
231
+ const currentChannel = getChannelFromVersion(currentVersion);
232
+ const targetChannel = getChannelFromVersion(info.update.latest);
233
+ if (RELEASE_CHANNEL_STABILITY[targetChannel] < RELEASE_CHANNEL_STABILITY[currentChannel]) {
234
+ return;
235
+ }
236
+ const isNightly = info.update.latest.includes("nightly");
237
+ const updateCommand = installationInfo.updateCommand.replace(
238
+ "@latest",
239
+ isNightly ? "@nightly" : `@${info.update.latest}`
240
+ );
241
+ const updateProcess = spawnFn(updateCommand, {
242
+ stdio: "ignore",
243
+ shell: true,
244
+ detached: true
245
+ });
246
+ _updateInProgress = true;
247
+ updateProcess.unref();
248
+ updateProcess.on("close", (code) => {
249
+ _updateInProgress = false;
250
+ if (code === 0) {
251
+ updateEventEmitter.emit("update-success", {
252
+ message: "Update successful! The new version will be used on your next run."
253
+ });
254
+ } else {
255
+ updateEventEmitter.emit("update-failed", {
256
+ message: `Automatic update failed. Please try updating manually:
257
+
258
+ ${updateCommand}`
259
+ });
260
+ }
261
+ });
262
+ updateProcess.on("error", (err) => {
263
+ _updateInProgress = false;
264
+ updateEventEmitter.emit("update-failed", {
265
+ message: `Automatic update failed. Please try updating manually. (error: ${err.message})
266
+
267
+ ${updateCommand}`
268
+ });
269
+ });
270
+ return updateProcess;
271
+ }
272
+ function setUpdateHandler(addItem, setUpdateInfo) {
273
+ let successfullyInstalled = false;
274
+ const handleUpdateReceived = (info) => {
275
+ setUpdateInfo(info);
276
+ const savedMessage = info.message;
277
+ setTimeout(() => {
278
+ if (!successfullyInstalled) {
279
+ addItem(
280
+ {
281
+ type: "info" /* INFO */,
282
+ text: savedMessage
283
+ },
284
+ Date.now()
285
+ );
286
+ }
287
+ setUpdateInfo(null);
288
+ }, 6e4);
289
+ };
290
+ const handleUpdateFailed = (data) => {
291
+ setUpdateInfo(null);
292
+ addItem(
293
+ {
294
+ type: "error" /* ERROR */,
295
+ text: data?.message || `Automatic update failed. Please try updating manually`
296
+ },
297
+ Date.now()
298
+ );
299
+ };
300
+ const handleUpdateSuccess = () => {
301
+ successfullyInstalled = true;
302
+ setUpdateInfo(null);
303
+ addItem(
304
+ {
305
+ type: "info" /* INFO */,
306
+ text: `Update successful! The new version will be used on your next run.`
307
+ },
308
+ Date.now()
309
+ );
310
+ };
311
+ const handleUpdateInfo = (data) => {
312
+ addItem(
313
+ {
314
+ type: "info" /* INFO */,
315
+ text: data.message
316
+ },
317
+ Date.now()
318
+ );
319
+ };
320
+ updateEventEmitter.on("update-received", handleUpdateReceived);
321
+ updateEventEmitter.on("update-failed", handleUpdateFailed);
322
+ updateEventEmitter.on("update-success", handleUpdateSuccess);
323
+ updateEventEmitter.on("update-info", handleUpdateInfo);
324
+ return () => {
325
+ updateEventEmitter.off("update-received", handleUpdateReceived);
326
+ updateEventEmitter.off("update-failed", handleUpdateFailed);
327
+ updateEventEmitter.off("update-success", handleUpdateSuccess);
328
+ updateEventEmitter.off("update-info", handleUpdateInfo);
329
+ };
330
+ }
331
+
332
+ // packages/cli/src/utils/processUtils.ts
333
+ var RELAUNCH_EXIT_CODE = 199;
334
+ var isRelaunching = false;
335
+ async function relaunchApp() {
336
+ if (isRelaunching) return;
337
+ isRelaunching = true;
338
+ await waitForUpdateCompletion();
339
+ await runExitCleanup();
340
+ process.exit(RELAUNCH_EXIT_CODE);
341
+ }
342
+ function isStandardSea() {
343
+ return process.argv[0] !== process.argv[1] && (process.env["IS_BINARY"] === "true" || process.isSea?.() === true);
344
+ }
345
+ function getScriptArgs() {
346
+ return process.argv.slice(isStandardSea() ? 1 : 2);
347
+ }
348
+ function isSeaEnvironment() {
349
+ return process.env["IS_BINARY"] === "true" || process.isSea?.() === true || process.argv[0] === process.argv[1];
350
+ }
351
+ function getSpawnConfig(nodeArgs, scriptArgs) {
352
+ const isBinary = isSeaEnvironment();
353
+ const newEnv = {
354
+ ...process.env,
355
+ GEMINI_CLI_NO_RELAUNCH: "true"
356
+ };
357
+ const finalSpawnArgs = [];
358
+ if (isBinary) {
359
+ if (nodeArgs.length > 0) {
360
+ for (const arg of nodeArgs) {
361
+ if (/[\s"'\\]/.test(arg)) {
362
+ throw new Error(
363
+ `Unsupported node argument for SEA relaunch: ${arg}. Complex escaping is not supported.`
364
+ );
365
+ }
366
+ }
367
+ const existingNodeOptions = process.env["NODE_OPTIONS"] || "";
368
+ newEnv["NODE_OPTIONS"] = `${existingNodeOptions} ${nodeArgs.join(" ")}`.trim();
369
+ }
370
+ finalSpawnArgs.push(process.execPath, ...scriptArgs);
371
+ } else {
372
+ finalSpawnArgs.push(
373
+ ...process.execArgv,
374
+ ...nodeArgs,
375
+ process.argv[1],
376
+ ...scriptArgs
377
+ );
378
+ }
379
+ return {
380
+ spawnArgs: finalSpawnArgs,
381
+ env: newEnv
382
+ };
383
+ }
384
+
385
+ export {
386
+ isDevelopment,
387
+ handleAutoUpdate,
388
+ setUpdateHandler,
389
+ RELAUNCH_EXIT_CODE,
390
+ relaunchApp,
391
+ getScriptArgs,
392
+ getSpawnConfig
393
+ };
394
+ /**
395
+ * @license
396
+ * Copyright 2025 Google LLC
397
+ * SPDX-License-Identifier: Apache-2.0
398
+ */
@@ -275811,6 +275811,7 @@ var PREVIEW_GEMINI_FLASH_MODEL = "gemini-3-flash-preview";
275811
275811
  var DEFAULT_GEMINI_MODEL = "gemini-2.5-pro";
275812
275812
  var DEFAULT_GEMINI_FLASH_MODEL = "gemini-2.5-flash";
275813
275813
  var DEFAULT_GEMINI_3_5_FLASH_MODEL = "gemini-3.5-flash";
275814
+ var SECONDARY_GEMINI_3_5_FLASH_MODEL = "gemini-3-flash";
275814
275815
  function setFlashModels(preview, defaultFlash) {
275815
275816
  PREVIEW_GEMINI_FLASH_MODEL = preview;
275816
275817
  DEFAULT_GEMINI_FLASH_MODEL = defaultFlash;
@@ -275828,6 +275829,7 @@ var VALID_GEMINI_MODELS = /* @__PURE__ */ new Set([
275828
275829
  DEFAULT_GEMINI_MODEL,
275829
275830
  DEFAULT_GEMINI_FLASH_MODEL,
275830
275831
  DEFAULT_GEMINI_3_5_FLASH_MODEL,
275832
+ SECONDARY_GEMINI_3_5_FLASH_MODEL,
275831
275833
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
275832
275834
  GEMMA_4_31B_IT_MODEL,
275833
275835
  GEMMA_4_26B_A4B_IT_MODEL
@@ -275840,10 +275842,10 @@ var GEMINI_MODEL_ALIAS_FLASH = "flash";
275840
275842
  var GEMINI_MODEL_ALIAS_FLASH_LITE = "flash-lite";
275841
275843
  var DEFAULT_GEMINI_EMBEDDING_MODEL = "gemini-embedding-001";
275842
275844
  var DEFAULT_THINKING_MODE = 8192;
275843
- function getAutoModelDescription(hasAccessToPreview, useGemini3_1 = false) {
275845
+ function getAutoModelDescription(hasAccessToPreview, useGemini3_1 = false, useGemini3_5Flash = false) {
275844
275846
  const proModel = hasAccessToPreview ? useGemini3_1 ? PREVIEW_GEMINI_3_1_MODEL : PREVIEW_GEMINI_MODEL : DEFAULT_GEMINI_MODEL;
275845
- const flashModel = hasAccessToPreview ? PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
275846
- return `Let Gemini CLI decide the best model for the task: ${proModel}, ${flashModel}`;
275847
+ const flashModel = hasAccessToPreview ? useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
275848
+ return `Let Gemini CLI decide the best model for the task: ${getDisplayString(proModel)}, ${getDisplayString(flashModel)}`;
275847
275849
  }
275848
275850
  function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config2, useGemini3_5Flash = false) {
275849
275851
  const normalizedModel = Array.isArray(requestedModel) ? String(requestedModel.at(-1) ?? "").trim() || "" : typeof requestedModel !== "string" ? String(requestedModel ?? "").trim() || "" : requestedModel.trim() || "";
@@ -275859,7 +275861,7 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
275859
275861
  return DEFAULT_GEMINI_FLASH_LITE_MODEL;
275860
275862
  }
275861
275863
  if (resolved2.includes("flash")) {
275862
- return useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
275864
+ return DEFAULT_GEMINI_FLASH_MODEL;
275863
275865
  }
275864
275866
  return DEFAULT_GEMINI_MODEL;
275865
275867
  }
@@ -275888,7 +275890,7 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
275888
275890
  break;
275889
275891
  }
275890
275892
  case GEMINI_MODEL_ALIAS_FLASH: {
275891
- resolved = useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL;
275893
+ resolved = useGemini3_5Flash ? DEFAULT_GEMINI_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL;
275892
275894
  break;
275893
275895
  }
275894
275896
  case GEMINI_MODEL_ALIAS_FLASH_LITE: {
@@ -275903,13 +275905,13 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
275903
275905
  if (resolved === "none") {
275904
275906
  return DEFAULT_GEMINI_FLASH_LITE_MODEL;
275905
275907
  }
275906
- if (useGemini3_5Flash && isFlashModel(resolved)) {
275907
- return DEFAULT_GEMINI_3_5_FLASH_MODEL;
275908
+ if (useGemini3_5Flash && isFlashModel(resolved) && normalizedModel !== PREVIEW_GEMINI_FLASH_MODEL) {
275909
+ return DEFAULT_GEMINI_FLASH_MODEL;
275908
275910
  }
275909
275911
  if (!hasAccessToPreview && isPreviewModel(resolved)) {
275910
275912
  switch (resolved) {
275911
275913
  case PREVIEW_GEMINI_FLASH_MODEL:
275912
- return useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
275914
+ return DEFAULT_GEMINI_FLASH_MODEL;
275913
275915
  case PREVIEW_GEMINI_MODEL:
275914
275916
  case PREVIEW_GEMINI_3_1_MODEL:
275915
275917
  case PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL:
@@ -275919,7 +275921,7 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
275919
275921
  return DEFAULT_GEMINI_FLASH_LITE_MODEL;
275920
275922
  }
275921
275923
  if (resolved.includes("flash")) {
275922
- return useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
275924
+ return DEFAULT_GEMINI_FLASH_MODEL;
275923
275925
  }
275924
275926
  return DEFAULT_GEMINI_MODEL;
275925
275927
  }
@@ -275927,7 +275929,7 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
275927
275929
  return resolved;
275928
275930
  }
275929
275931
  function isFlashModel(model) {
275930
- return model === DEFAULT_GEMINI_FLASH_MODEL || model === PREVIEW_GEMINI_FLASH_MODEL || model === DEFAULT_GEMINI_3_5_FLASH_MODEL || model === "flash" || model.endsWith("flash");
275932
+ return model === DEFAULT_GEMINI_FLASH_MODEL || model === PREVIEW_GEMINI_FLASH_MODEL || model === DEFAULT_GEMINI_3_5_FLASH_MODEL || model === SECONDARY_GEMINI_3_5_FLASH_MODEL || model === "flash" || model.endsWith("flash");
275931
275933
  }
275932
275934
  function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config2, useGemini3_5Flash = false) {
275933
275935
  if (config2?.getExperimentalDynamicModelConfiguration?.() === true) {
@@ -275940,11 +275942,11 @@ function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false
275940
275942
  }
275941
275943
  if (modelAlias === GEMINI_MODEL_ALIAS_FLASH) {
275942
275944
  if (requestedModel === DEFAULT_GEMINI_MODEL_AUTO || requestedModel === DEFAULT_GEMINI_MODEL) {
275943
- return useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
275945
+ return DEFAULT_GEMINI_FLASH_MODEL;
275944
275946
  }
275945
275947
  if (requestedModel === PREVIEW_GEMINI_MODEL_AUTO || requestedModel === PREVIEW_GEMINI_MODEL || requestedModel === GEMINI_MODEL_ALIAS_AUTO) {
275946
275948
  if (useGemini3_5Flash) {
275947
- return DEFAULT_GEMINI_3_5_FLASH_MODEL;
275949
+ return DEFAULT_GEMINI_FLASH_MODEL;
275948
275950
  }
275949
275951
  return hasAccessToPreview ? PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
275950
275952
  }
@@ -275960,6 +275962,8 @@ function getDisplayString(model, config2) {
275960
275962
  }
275961
275963
  }
275962
275964
  switch (model) {
275965
+ case "gemini-3-flash":
275966
+ return DEFAULT_GEMINI_3_5_FLASH_MODEL;
275963
275967
  case GEMINI_MODEL_ALIAS_AUTO:
275964
275968
  return "Auto";
275965
275969
  case PREVIEW_GEMINI_MODEL_AUTO:
@@ -279296,7 +279300,7 @@ function isValidToolName(name3, options = {}) {
279296
279300
  }
279297
279301
 
279298
279302
  // packages/core/dist/src/generated/git-commit.js
279299
- var GIT_COMMIT_INFO = "cfcecebe8";
279303
+ var GIT_COMMIT_INFO = "700c96118";
279300
279304
  var CLI_VERSION = "0.46.0-preview.0";
279301
279305
 
279302
279306
  // packages/core/dist/src/ide/detect-ide.js
@@ -335800,7 +335804,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
335800
335804
  return provider;
335801
335805
  }
335802
335806
  case "oauth2": {
335803
- const { OAuth2AuthProvider } = await import("./oauth2-provider-VVNBQH45.js");
335807
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-3WXIASQA.js");
335804
335808
  const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
335805
335809
  await provider.initialize();
335806
335810
  return provider;
@@ -335944,6 +335948,7 @@ var ModelConfigService = class _ModelConfigService {
335944
335948
  const definitions = this.config.modelDefinitions ?? {};
335945
335949
  const shouldShowPreviewModels = context2.hasAccessToPreview ?? false;
335946
335950
  const useGemini31 = context2.useGemini3_1 ?? false;
335951
+ const useGemini3_5Flash = context2.useGemini3_5Flash ?? false;
335947
335952
  const mainOptions = Object.entries(definitions).filter(([_2, m]) => {
335948
335953
  if (m.isVisible !== true)
335949
335954
  return false;
@@ -335955,7 +335960,7 @@ var ModelConfigService = class _ModelConfigService {
335955
335960
  }).map(([id, m]) => {
335956
335961
  let description = m.dialogDescription ?? "";
335957
335962
  if (id === "auto") {
335958
- description = getAutoModelDescription(shouldShowPreviewModels, useGemini31);
335963
+ description = getAutoModelDescription(shouldShowPreviewModels, useGemini31, useGemini3_5Flash);
335959
335964
  } else if (id === "auto-gemini-3" && useGemini31) {
335960
335965
  description = description.replace("gemini-3-pro", "gemini-3.1-pro");
335961
335966
  }
@@ -355694,7 +355699,8 @@ ${formattedHistory}
355694
355699
  config2.getUseCustomToolModel(),
355695
355700
  config2.getHasAccessToPreviewModel()
355696
355701
  ]);
355697
- const selectedModel = resolveClassifierModel(context2.requestedModel ?? config2.getModel(), routerResponse.model_choice, useGemini3_1, useCustomToolModel, hasAccessToPreview, config2);
355702
+ const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
355703
+ const selectedModel = resolveClassifierModel(context2.requestedModel ?? config2.getModel(), routerResponse.model_choice, useGemini3_1, useCustomToolModel, hasAccessToPreview, config2, useGemini3_5Flash);
355698
355704
  return {
355699
355705
  model: selectedModel,
355700
355706
  metadata: {
@@ -355855,7 +355861,8 @@ var ClassifierStrategy = class {
355855
355861
  config2.getGemini31Launched(),
355856
355862
  config2.getUseCustomToolModel()
355857
355863
  ]);
355858
- const selectedModel = normalizeModelId(resolveClassifierModel(normalizeModelId(model), routerResponse.model_choice, useGemini3_1, useCustomToolModel, config2.getHasAccessToPreviewModel?.() ?? true, config2));
355864
+ const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
355865
+ const selectedModel = normalizeModelId(resolveClassifierModel(normalizeModelId(model), routerResponse.model_choice, useGemini3_1, useCustomToolModel, config2.getHasAccessToPreviewModel?.() ?? true, config2, useGemini3_5Flash));
355859
355866
  const service = config2.getModelAvailabilityService();
355860
355867
  const snapshot = service.snapshot(selectedModel);
355861
355868
  if (!snapshot.available) {
@@ -355998,7 +356005,8 @@ var NumericalClassifierStrategy = class {
355998
356005
  config2.getGemini31Launched(),
355999
356006
  config2.getUseCustomToolModel()
356000
356007
  ]);
356001
- const selectedModel = normalizeModelId(resolveClassifierModel(normalizeModelId(model), modelAlias, useGemini3_1, useCustomToolModel, config2.getHasAccessToPreviewModel?.() ?? true, config2));
356008
+ const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
356009
+ const selectedModel = normalizeModelId(resolveClassifierModel(normalizeModelId(model), modelAlias, useGemini3_1, useCustomToolModel, config2.getHasAccessToPreviewModel?.() ?? true, config2, useGemini3_5Flash));
356002
356010
  const service = config2.getModelAvailabilityService();
356003
356011
  const snapshot = service.snapshot(selectedModel);
356004
356012
  if (!snapshot.available) {
@@ -356151,8 +356159,9 @@ var ApprovalModeStrategy = class {
356151
356159
  config2.getUseCustomToolModel(),
356152
356160
  config2.getHasAccessToPreviewModel()
356153
356161
  ]);
356162
+ const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
356154
356163
  if (approvalMode === ApprovalMode.PLAN) {
356155
- const proModel = resolveClassifierModel(model, GEMINI_MODEL_ALIAS_PRO, useGemini3_1, useCustomToolModel, hasAccessToPreview, config2);
356164
+ const proModel = resolveClassifierModel(model, GEMINI_MODEL_ALIAS_PRO, useGemini3_1, useCustomToolModel, hasAccessToPreview, config2, useGemini3_5Flash);
356156
356165
  return {
356157
356166
  model: proModel,
356158
356167
  metadata: {
@@ -356162,7 +356171,7 @@ var ApprovalModeStrategy = class {
356162
356171
  }
356163
356172
  };
356164
356173
  } else if (approvedPlanPath) {
356165
- const flashModel = resolveClassifierModel(model, GEMINI_MODEL_ALIAS_FLASH, useGemini3_1, useCustomToolModel, hasAccessToPreview, config2);
356174
+ const flashModel = resolveClassifierModel(model, GEMINI_MODEL_ALIAS_FLASH, useGemini3_1, useCustomToolModel, hasAccessToPreview, config2, useGemini3_5Flash);
356166
356175
  return {
356167
356176
  model: flashModel,
356168
356177
  metadata: {
@@ -356712,9 +356721,12 @@ var DEFAULT_MODEL_CONFIGS = {
356712
356721
  "gemini-3-flash-preview": {
356713
356722
  default: "gemini-3-flash-preview",
356714
356723
  contexts: [
356715
- { condition: { useGemini3_5Flash: true }, target: "gemini-3.5-flash" },
356716
356724
  {
356717
- condition: { hasAccessToPreview: false },
356725
+ condition: { hasAccessToPreview: false, useGemini3_5Flash: true },
356726
+ target: "gemini-3.5-flash"
356727
+ },
356728
+ {
356729
+ condition: { hasAccessToPreview: false, useGemini3_5Flash: false },
356718
356730
  target: "gemini-2.5-flash"
356719
356731
  }
356720
356732
  ]
@@ -375627,7 +375639,11 @@ ${sections.join("\n")}
375627
375639
  return this.experiments?.flags[ExperimentFlags.GEMINI_3_5_FLASH_GA_LAUNCHED]?.boolValue ?? false;
375628
375640
  })();
375629
375641
  if (hasAccess) {
375630
- setFlashModels("gemini-3.5-flash", "gemini-3.5-flash");
375642
+ if (authType === AuthType2.USE_GEMINI) {
375643
+ setFlashModels("gemini-3-flash-preview", "gemini-3.5-flash");
375644
+ } else {
375645
+ setFlashModels("gemini-3-flash", "gemini-3-flash");
375646
+ }
375631
375647
  } else {
375632
375648
  setFlashModels("gemini-3-flash-preview", "gemini-2.5-flash");
375633
375649
  }
@@ -393341,6 +393357,7 @@ export {
393341
393357
  DEFAULT_GEMINI_MODEL,
393342
393358
  DEFAULT_GEMINI_FLASH_MODEL,
393343
393359
  DEFAULT_GEMINI_3_5_FLASH_MODEL,
393360
+ SECONDARY_GEMINI_3_5_FLASH_MODEL,
393344
393361
  setFlashModels,
393345
393362
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
393346
393363
  PREVIEW_GEMINI_FLASH_LITE_MODEL,