@google/gemini-cli 0.61.0-preview.0 → 0.61.0

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 (51) hide show
  1. package/bundle/{chunk-HQQJ2XNS.js → chunk-2YTYPKEZ.js} +17 -2
  2. package/bundle/{chunk-ZJHBR7W3.js → chunk-3BON7LO7.js} +1 -1
  3. package/bundle/{chunk-AIMNGITH.js → chunk-3YIQF3FY.js} +3 -3
  4. package/bundle/{chunk-UUSSUQWL.js → chunk-4DKTUBCF.js} +1 -1
  5. package/bundle/{chunk-XL4BRDNV.js → chunk-4GP6HFBO.js} +7 -7
  6. package/bundle/{chunk-ZOKIJ2CA.js → chunk-55E6VPR2.js} +7 -7
  7. package/bundle/{chunk-FH2AJT7C.js → chunk-5FZXKDXH.js} +327 -138
  8. package/bundle/{chunk-GLGFO33Y.js → chunk-5V744PDA.js} +17 -2
  9. package/bundle/{chunk-3KWHN3A7.js → chunk-75COGLDC.js} +1 -1
  10. package/bundle/{chunk-DOJZLPDE.js → chunk-AMOGWHKC.js} +1 -1
  11. package/bundle/{chunk-4WJNJ3DK.js → chunk-BS3JDRJQ.js} +1 -1
  12. package/bundle/{chunk-FIYKTSCR.js → chunk-DWY2O4BN.js} +1 -1
  13. package/bundle/{chunk-KUWKDEHW.js → chunk-DZZAUXYI.js} +17 -2
  14. package/bundle/{chunk-WFZMFTEE.js → chunk-FJCIWVRV.js} +3 -3
  15. package/bundle/{chunk-OZG5CLDY.js → chunk-HPLZM7PQ.js} +7 -7
  16. package/bundle/{chunk-ACTC6X24.js → chunk-JDPZ4CE3.js} +293 -136
  17. package/bundle/{chunk-BCGPZKAR.js → chunk-RWXT3CQ6.js} +1 -1
  18. package/bundle/{chunk-DO6WSZ5A.js → chunk-S2Z77X3K.js} +2 -2
  19. package/bundle/{chunk-LDL5PSV7.js → chunk-S7IITRXI.js} +2 -2
  20. package/bundle/{chunk-HGJ3LRCZ.js → chunk-TQ3FGGPE.js} +1 -1
  21. package/bundle/{chunk-6HVPDYWM.js → chunk-VT3MBDD3.js} +3 -3
  22. package/bundle/{chunk-UCLFGIUA.js → chunk-W766PNZK.js} +2 -2
  23. package/bundle/{chunk-OANXWSAG.js → chunk-Y2J3C62M.js} +327 -138
  24. package/bundle/{chunk-YJFCJUWN.js → chunk-YKD74FOF.js} +1 -1
  25. package/bundle/{cleanup-AM5TUWBB.js → cleanup-KRMS36ET.js} +2 -2
  26. package/bundle/{cleanup-FLPPBDLV.js → cleanup-PWFFQ2ZF.js} +2 -2
  27. package/bundle/{cleanup-KI735Y45.js → cleanup-XO3PUOXN.js} +2 -2
  28. package/bundle/{core-R7CF7CQD.js → core-4U3AXZ3Y.js} +17 -1
  29. package/bundle/{dist-VH7RJCTA.js → core-BYHFA5QC.js} +17 -1
  30. package/bundle/{devtoolsService-MA34M6Q7.js → devtoolsService-4LLMXKZ3.js} +2 -2
  31. package/bundle/{devtoolsService-UUGXHVTK.js → devtoolsService-JTGAYMK3.js} +2 -2
  32. package/bundle/{devtoolsService-WOA7VJLA.js → devtoolsService-KPCAEWJX.js} +2 -2
  33. package/bundle/{core-F6IWXMFD.js → dist-3UYXETJU.js} +17 -1
  34. package/bundle/docs/reference/configuration.md +88 -25
  35. package/bundle/{gemini-N24ID3HC.js → gemini-3HFX2LNT.js} +19 -17
  36. package/bundle/{gemini-SRSLV7D2.js → gemini-4IF7D7UG.js} +19 -17
  37. package/bundle/{gemini-NLU2EPRF.js → gemini-NPCD6A4N.js} +19 -17
  38. package/bundle/gemini.js +7 -7
  39. package/bundle/{interactiveCli-PNXXOFIE.js → interactiveCli-4ZJLSCID.js} +19 -14
  40. package/bundle/{interactiveCli-DDJZ4B26.js → interactiveCli-F3TDVF3E.js} +19 -14
  41. package/bundle/{interactiveCli-SOMGNC7U.js → interactiveCli-TRXNUIPM.js} +19 -14
  42. package/bundle/{liteRtServerManager-HDIBGLHN.js → liteRtServerManager-C5EQRV4O.js} +4 -4
  43. package/bundle/{liteRtServerManager-XEOODEAA.js → liteRtServerManager-LQNV6EK2.js} +4 -4
  44. package/bundle/{liteRtServerManager-GW22Q7F4.js → liteRtServerManager-T6NSUQ7G.js} +4 -4
  45. package/bundle/{oauth2-provider-ZC45IIOS.js → oauth2-provider-B67V2HIE.js} +1 -1
  46. package/bundle/{oauth2-provider-347DWYC5.js → oauth2-provider-CIEE5U5B.js} +1 -1
  47. package/bundle/{oauth2-provider-SADAKLZ2.js → oauth2-provider-UXWR2XFY.js} +1 -1
  48. package/bundle/{start-IVH46CBG.js → start-4GM5UE3J.js} +6 -6
  49. package/bundle/{start-PRP35I6V.js → start-7IHG7KRC.js} +6 -6
  50. package/bundle/{start-H7F3LFFN.js → start-FBWB5XJU.js} +6 -6
  51. package/package.json +1 -1
@@ -280198,14 +280198,27 @@ var PREVIEW_GEMINI_3_1_MODEL = "gemini-3.1-pro-preview";
280198
280198
  var PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL = "gemini-3.1-pro-preview-customtools";
280199
280199
  var PREVIEW_GEMINI_FLASH_MODEL = "gemini-3-flash-preview";
280200
280200
  var DEFAULT_GEMINI_MODEL = "gemini-2.5-pro";
280201
- var DEFAULT_GEMINI_FLASH_MODEL = "gemini-2.5-flash";
280202
- var DEFAULT_GEMINI_3_5_FLASH_MODEL = "gemini-3.5-flash";
280203
- var SECONDARY_GEMINI_3_5_FLASH_MODEL = "gemini-3-flash";
280201
+ var BASE_GEMINI_FLASH_MODEL = "gemini-3.5-flash";
280202
+ var LATEST_GEMINI_FLASH_MODEL = "gemini-3.8-flash";
280203
+ var LEGACY_CCPA_FLASH_MODEL = "gemini-3-flash";
280204
+ var DEFAULT_GEMINI_3_5_FLASH_MODEL = BASE_GEMINI_FLASH_MODEL;
280205
+ var SECONDARY_GEMINI_3_5_FLASH_MODEL = LEGACY_CCPA_FLASH_MODEL;
280206
+ var BASE_GEMINI_FLASH_LITE_MODEL = "gemini-3.1-flash-lite";
280207
+ var LATEST_GEMINI_FLASH_LITE_MODEL = "gemini-3.5-flash-lite";
280208
+ var DEFAULT_GEMINI_FLASH_MODEL = BASE_GEMINI_FLASH_MODEL;
280209
+ var DEFAULT_GEMINI_FLASH_LITE_MODEL = BASE_GEMINI_FLASH_LITE_MODEL;
280204
280210
  function setFlashModels(preview, defaultFlash) {
280205
280211
  PREVIEW_GEMINI_FLASH_MODEL = preview;
280206
280212
  DEFAULT_GEMINI_FLASH_MODEL = defaultFlash;
280207
280213
  }
280208
- var DEFAULT_GEMINI_FLASH_LITE_MODEL = "gemini-3.1-flash-lite";
280214
+ function setFlashLiteModel(defaultFlashLite) {
280215
+ DEFAULT_GEMINI_FLASH_LITE_MODEL = defaultFlashLite;
280216
+ }
280217
+ function resetModelsForTesting() {
280218
+ PREVIEW_GEMINI_FLASH_MODEL = "gemini-3-flash-preview";
280219
+ DEFAULT_GEMINI_FLASH_MODEL = BASE_GEMINI_FLASH_MODEL;
280220
+ DEFAULT_GEMINI_FLASH_LITE_MODEL = BASE_GEMINI_FLASH_LITE_MODEL;
280221
+ }
280209
280222
  var PREVIEW_GEMINI_FLASH_LITE_MODEL = "none";
280210
280223
  var GEMMA_4_31B_IT_MODEL = "gemma-4-31b-it";
280211
280224
  var GEMMA_4_26B_A4B_IT_MODEL = "gemma-4-26b-a4b-it";
@@ -280220,9 +280233,29 @@ var VALID_GEMINI_MODELS = /* @__PURE__ */ new Set([
280220
280233
  DEFAULT_GEMINI_3_5_FLASH_MODEL,
280221
280234
  SECONDARY_GEMINI_3_5_FLASH_MODEL,
280222
280235
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
280236
+ BASE_GEMINI_FLASH_MODEL,
280237
+ LATEST_GEMINI_FLASH_MODEL,
280238
+ LEGACY_CCPA_FLASH_MODEL,
280239
+ BASE_GEMINI_FLASH_LITE_MODEL,
280240
+ LATEST_GEMINI_FLASH_LITE_MODEL,
280223
280241
  GEMMA_4_31B_IT_MODEL,
280224
280242
  GEMMA_4_26B_A4B_IT_MODEL
280225
280243
  ]);
280244
+ function getBackendModelMappings(context2, isCodeAssistBackend = true) {
280245
+ const mappings = {};
280246
+ const useLatestFlash = context2?.hasLatestFlashGAAccess?.() ?? false;
280247
+ const useLatestFlashLite = context2?.hasLatestFlashLiteGAAccess?.() ?? false;
280248
+ if (useLatestFlash) {
280249
+ mappings[BASE_GEMINI_FLASH_MODEL] = LATEST_GEMINI_FLASH_MODEL;
280250
+ mappings[LEGACY_CCPA_FLASH_MODEL] = LATEST_GEMINI_FLASH_MODEL;
280251
+ } else if (isCodeAssistBackend) {
280252
+ mappings[BASE_GEMINI_FLASH_MODEL] = LEGACY_CCPA_FLASH_MODEL;
280253
+ }
280254
+ if (useLatestFlashLite) {
280255
+ mappings[BASE_GEMINI_FLASH_LITE_MODEL] = LATEST_GEMINI_FLASH_LITE_MODEL;
280256
+ }
280257
+ return mappings;
280258
+ }
280226
280259
  var PREVIEW_GEMINI_MODEL_AUTO = "auto-gemini-3";
280227
280260
  var DEFAULT_GEMINI_MODEL_AUTO = "auto-gemini-2.5";
280228
280261
  var GEMINI_MODEL_ALIAS_AUTO = "auto";
@@ -280231,26 +280264,29 @@ var GEMINI_MODEL_ALIAS_FLASH = "flash";
280231
280264
  var GEMINI_MODEL_ALIAS_FLASH_LITE = "flash-lite";
280232
280265
  var DEFAULT_GEMINI_EMBEDDING_MODEL = "gemini-embedding-001";
280233
280266
  var DEFAULT_THINKING_MODE = 8192;
280234
- function getAutoModelDescription(hasAccessToPreview, useGemini3_1 = false, useGemini3_5Flash = false) {
280267
+ function getAutoModelDescription(hasAccessToPreview, useGemini3_1 = false, useLatestFlash = false) {
280235
280268
  const proModel = hasAccessToPreview ? useGemini3_1 ? PREVIEW_GEMINI_3_1_MODEL : PREVIEW_GEMINI_MODEL : DEFAULT_GEMINI_MODEL;
280236
- const flashModel = hasAccessToPreview ? useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
280269
+ const flashModel = hasAccessToPreview ? useLatestFlash ? LATEST_GEMINI_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
280237
280270
  return `Let Gemini CLI decide the best model for the task: ${getDisplayString(proModel)}, ${getDisplayString(flashModel)}`;
280238
280271
  }
280239
- function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config2, useGemini3_5Flash = false) {
280272
+ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config2, useLatestFlash = false, useLatestFlashLite = false) {
280240
280273
  const normalizedModel = Array.isArray(requestedModel) ? String(requestedModel.at(-1) ?? "").trim() || "" : typeof requestedModel !== "string" ? String(requestedModel ?? "").trim() || "" : requestedModel.trim() || "";
280274
+ const effectiveUseLatestFlash = useLatestFlash || (config2?.hasLatestFlashGAAccess?.() ?? false);
280275
+ const effectiveUseLatestFlashLite = useLatestFlashLite || (config2?.hasLatestFlashLiteGAAccess?.() ?? false);
280241
280276
  if (config2?.getExperimentalDynamicModelConfiguration?.() === true) {
280242
280277
  const resolved2 = config2.modelConfigService.resolveModelId(normalizedModel, {
280243
280278
  useGemini3_1,
280244
280279
  useCustomTools: useCustomToolModel,
280245
280280
  hasAccessToPreview,
280246
- useGemini3_5Flash
280281
+ useLatestFlash: effectiveUseLatestFlash,
280282
+ useLatestFlashLite: effectiveUseLatestFlashLite
280247
280283
  });
280248
280284
  if (!hasAccessToPreview && isPreviewModel(resolved2, config2)) {
280249
280285
  if (resolved2.includes("flash-lite")) {
280250
- return DEFAULT_GEMINI_FLASH_LITE_MODEL;
280286
+ return effectiveUseLatestFlashLite ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL;
280251
280287
  }
280252
280288
  if (resolved2.includes("flash")) {
280253
- return DEFAULT_GEMINI_FLASH_MODEL;
280289
+ return effectiveUseLatestFlash ? LATEST_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
280254
280290
  }
280255
280291
  return DEFAULT_GEMINI_MODEL;
280256
280292
  }
@@ -280279,11 +280315,11 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
280279
280315
  break;
280280
280316
  }
280281
280317
  case GEMINI_MODEL_ALIAS_FLASH: {
280282
- resolved = useGemini3_5Flash ? DEFAULT_GEMINI_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL;
280318
+ resolved = effectiveUseLatestFlash ? LATEST_GEMINI_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL;
280283
280319
  break;
280284
280320
  }
280285
280321
  case GEMINI_MODEL_ALIAS_FLASH_LITE: {
280286
- resolved = DEFAULT_GEMINI_FLASH_LITE_MODEL;
280322
+ resolved = effectiveUseLatestFlashLite ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL;
280287
280323
  break;
280288
280324
  }
280289
280325
  default: {
@@ -280292,25 +280328,28 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
280292
280328
  }
280293
280329
  }
280294
280330
  if (resolved === "none") {
280295
- return DEFAULT_GEMINI_FLASH_LITE_MODEL;
280331
+ return effectiveUseLatestFlashLite ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL;
280332
+ }
280333
+ if (effectiveUseLatestFlash && isPromotableFlashModel(resolved) && normalizedModel !== PREVIEW_GEMINI_FLASH_MODEL) {
280334
+ return LATEST_GEMINI_FLASH_MODEL;
280296
280335
  }
280297
- if (useGemini3_5Flash && isPromotableFlashModel(resolved) && normalizedModel !== PREVIEW_GEMINI_FLASH_MODEL) {
280298
- return DEFAULT_GEMINI_FLASH_MODEL;
280336
+ if (effectiveUseLatestFlashLite && isPromotableFlashLiteModel(resolved)) {
280337
+ return LATEST_GEMINI_FLASH_LITE_MODEL;
280299
280338
  }
280300
280339
  if (!hasAccessToPreview && isPreviewModel(resolved)) {
280301
280340
  switch (resolved) {
280302
280341
  case PREVIEW_GEMINI_FLASH_MODEL:
280303
- return DEFAULT_GEMINI_FLASH_MODEL;
280342
+ return effectiveUseLatestFlash ? LATEST_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
280304
280343
  case PREVIEW_GEMINI_MODEL:
280305
280344
  case PREVIEW_GEMINI_3_1_MODEL:
280306
280345
  case PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL:
280307
280346
  return DEFAULT_GEMINI_MODEL;
280308
280347
  default:
280309
280348
  if (resolved.includes("flash-lite")) {
280310
- return DEFAULT_GEMINI_FLASH_LITE_MODEL;
280349
+ return effectiveUseLatestFlashLite ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL;
280311
280350
  }
280312
280351
  if (resolved.includes("flash")) {
280313
- return DEFAULT_GEMINI_FLASH_MODEL;
280352
+ return effectiveUseLatestFlash ? LATEST_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
280314
280353
  }
280315
280354
  return DEFAULT_GEMINI_MODEL;
280316
280355
  }
@@ -280318,9 +280357,15 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
280318
280357
  return resolved;
280319
280358
  }
280320
280359
  function isPromotableFlashModel(model) {
280321
- 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 === GEMINI_MODEL_ALIAS_FLASH;
280360
+ 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 === GEMINI_MODEL_ALIAS_FLASH || model === BASE_GEMINI_FLASH_MODEL || model === LEGACY_CCPA_FLASH_MODEL;
280361
+ }
280362
+ function isPromotableFlashLiteModel(model) {
280363
+ return model === DEFAULT_GEMINI_FLASH_LITE_MODEL || model === BASE_GEMINI_FLASH_LITE_MODEL || model === GEMINI_MODEL_ALIAS_FLASH_LITE;
280322
280364
  }
280323
- function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config2, useGemini3_5Flash = false) {
280365
+ function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config2, useLatestFlash = false, useLatestFlashLite = false) {
280366
+ const effectiveUseLatestFlash = useLatestFlash || (config2?.hasLatestFlashGAAccess?.() ?? false);
280367
+ const effectiveUseLatestFlashLite = useLatestFlashLite || (config2?.hasLatestFlashLiteGAAccess?.() ?? false);
280368
+ const effectiveHasAccessToPreview = hasAccessToPreview || (config2?.getHasAccessToPreviewModel?.() ?? false);
280324
280369
  if (config2?.getExperimentalDynamicModelConfiguration?.() === true) {
280325
280370
  return config2.modelConfigService.resolveClassifierModelId(
280326
280371
  modelAlias,
@@ -280328,37 +280373,51 @@ function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false
280328
280373
  {
280329
280374
  useGemini3_1,
280330
280375
  useCustomTools: useCustomToolModel,
280331
- hasAccessToPreview,
280332
- useGemini3_5Flash
280376
+ hasAccessToPreview: effectiveHasAccessToPreview,
280377
+ useLatestFlash: effectiveUseLatestFlash,
280378
+ useLatestFlashLite: effectiveUseLatestFlashLite
280333
280379
  }
280334
280380
  );
280335
280381
  }
280336
280382
  if (modelAlias === GEMINI_MODEL_ALIAS_FLASH) {
280337
280383
  if (requestedModel === DEFAULT_GEMINI_MODEL_AUTO || requestedModel === DEFAULT_GEMINI_MODEL) {
280338
- return DEFAULT_GEMINI_FLASH_MODEL;
280384
+ return effectiveUseLatestFlash ? LATEST_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
280339
280385
  }
280340
280386
  if (requestedModel === PREVIEW_GEMINI_MODEL_AUTO || requestedModel === PREVIEW_GEMINI_MODEL || requestedModel === GEMINI_MODEL_ALIAS_AUTO) {
280341
- if (useGemini3_5Flash) {
280342
- return DEFAULT_GEMINI_FLASH_MODEL;
280387
+ if (effectiveUseLatestFlash) {
280388
+ return LATEST_GEMINI_FLASH_MODEL;
280343
280389
  }
280344
- return hasAccessToPreview ? PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
280390
+ return effectiveHasAccessToPreview ? PREVIEW_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
280345
280391
  }
280346
280392
  return resolveModel(
280347
280393
  GEMINI_MODEL_ALIAS_FLASH,
280348
280394
  false,
280349
280395
  false,
280350
- hasAccessToPreview,
280396
+ effectiveHasAccessToPreview,
280397
+ config2,
280398
+ effectiveUseLatestFlash,
280399
+ effectiveUseLatestFlashLite
280400
+ );
280401
+ }
280402
+ if (modelAlias === GEMINI_MODEL_ALIAS_FLASH_LITE) {
280403
+ return resolveModel(
280404
+ GEMINI_MODEL_ALIAS_FLASH_LITE,
280405
+ false,
280406
+ false,
280407
+ effectiveHasAccessToPreview,
280351
280408
  config2,
280352
- useGemini3_5Flash
280409
+ effectiveUseLatestFlash,
280410
+ effectiveUseLatestFlashLite
280353
280411
  );
280354
280412
  }
280355
280413
  return resolveModel(
280356
280414
  requestedModel,
280357
280415
  useGemini3_1,
280358
280416
  useCustomToolModel,
280359
- hasAccessToPreview,
280417
+ effectiveHasAccessToPreview,
280360
280418
  config2,
280361
- useGemini3_5Flash
280419
+ effectiveUseLatestFlash,
280420
+ effectiveUseLatestFlashLite
280362
280421
  );
280363
280422
  }
280364
280423
  function getDisplayString(model, config2) {
@@ -280368,9 +280427,14 @@ function getDisplayString(model, config2) {
280368
280427
  return definition.displayName;
280369
280428
  }
280370
280429
  }
280430
+ const useLatestFlash = config2?.hasLatestFlashGAAccess?.() ?? false;
280431
+ const useLatestFlashLite = config2?.hasLatestFlashLiteGAAccess?.() ?? false;
280371
280432
  switch (model) {
280372
- case "gemini-3-flash":
280373
- return DEFAULT_GEMINI_3_5_FLASH_MODEL;
280433
+ case LEGACY_CCPA_FLASH_MODEL:
280434
+ case BASE_GEMINI_FLASH_MODEL:
280435
+ return useLatestFlash ? LATEST_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
280436
+ case BASE_GEMINI_FLASH_LITE_MODEL:
280437
+ return useLatestFlashLite ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL;
280374
280438
  case GEMINI_MODEL_ALIAS_AUTO:
280375
280439
  return "Auto";
280376
280440
  case PREVIEW_GEMINI_MODEL_AUTO:
@@ -283525,8 +283589,8 @@ function isValidToolName(name3, options = {}) {
283525
283589
  }
283526
283590
 
283527
283591
  // packages/core/src/generated/git-commit.ts
283528
- var GIT_COMMIT_INFO = "ae28844fb";
283529
- var CLI_VERSION = "0.61.0-nightly.20260908.gc647533d6";
283592
+ var GIT_COMMIT_INFO = "cc0107ed2";
283593
+ var CLI_VERSION = "0.61.0";
283530
283594
 
283531
283595
  // packages/core/src/ide/detect-ide.ts
283532
283596
  var IDE_DEFINITIONS = {
@@ -307146,7 +307210,7 @@ function getVersion() {
307146
307210
  }
307147
307211
  versionPromise = (async () => {
307148
307212
  const pkgJson = await getPackageJson(__dirname4);
307149
- return "0.61.0-nightly.20260908.gc647533d6";
307213
+ return "0.61.0";
307150
307214
  })();
307151
307215
  return versionPromise;
307152
307216
  }
@@ -308150,21 +308214,6 @@ var AUTO_ROUTING_OVERRIDES = {
308150
308214
  transient: "sticky_retry"
308151
308215
  }
308152
308216
  };
308153
- var FLASH_LITE_CHAIN = [
308154
- definePolicy({
308155
- model: DEFAULT_GEMINI_FLASH_LITE_MODEL,
308156
- actions: SILENT_ACTIONS
308157
- }),
308158
- definePolicy({
308159
- model: DEFAULT_GEMINI_FLASH_MODEL,
308160
- actions: SILENT_ACTIONS
308161
- }),
308162
- definePolicy({
308163
- model: DEFAULT_GEMINI_MODEL,
308164
- isLastResort: true,
308165
- actions: SILENT_ACTIONS
308166
- })
308167
- ];
308168
308217
  function getModelPolicyChain(options) {
308169
308218
  const isAuto = options.isAutoSelection ?? false;
308170
308219
  if (options.previewEnabled) {
@@ -308174,7 +308223,8 @@ function getModelPolicyChain(options) {
308174
308223
  options.useCustomToolModel,
308175
308224
  true,
308176
308225
  void 0,
308177
- options.useGemini3_5Flash
308226
+ options.useLatestFlash,
308227
+ options.useLatestFlashLite
308178
308228
  );
308179
308229
  return [
308180
308230
  definePolicy({
@@ -308208,7 +308258,21 @@ function createSingleModelChain(model) {
308208
308258
  return [definePolicy({ model, isLastResort: true })];
308209
308259
  }
308210
308260
  function getFlashLitePolicyChain() {
308211
- return cloneChain(FLASH_LITE_CHAIN);
308261
+ return [
308262
+ definePolicy({
308263
+ model: DEFAULT_GEMINI_FLASH_LITE_MODEL,
308264
+ actions: SILENT_ACTIONS
308265
+ }),
308266
+ definePolicy({
308267
+ model: DEFAULT_GEMINI_FLASH_MODEL,
308268
+ actions: SILENT_ACTIONS
308269
+ }),
308270
+ definePolicy({
308271
+ model: DEFAULT_GEMINI_MODEL,
308272
+ isLastResort: true,
308273
+ actions: SILENT_ACTIONS
308274
+ })
308275
+ ];
308212
308276
  }
308213
308277
  function createDefaultPolicy(model, options) {
308214
308278
  return definePolicy({ model, isLastResort: options?.isLastResort });
@@ -308225,16 +308289,6 @@ function definePolicy(config2) {
308225
308289
  }
308226
308290
  };
308227
308291
  }
308228
- function clonePolicy(policy) {
308229
- return {
308230
- ...policy,
308231
- actions: { ...policy.actions },
308232
- stateTransitions: { ...policy.stateTransitions }
308233
- };
308234
- }
308235
- function cloneChain(chain2) {
308236
- return chain2.map(clonePolicy);
308237
- }
308238
308292
 
308239
308293
  // packages/core/src/utils/modelUtils.ts
308240
308294
  function normalizeModelId(modelId) {
@@ -308252,7 +308306,8 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
308252
308306
  const useGemini31 = config2.getGemini31LaunchedSync?.() ?? false;
308253
308307
  const useCustomToolModel = config2.getUseCustomToolModelSync?.() ?? false;
308254
308308
  const hasAccessToPreview = config2.getHasAccessToPreviewModel?.() ?? false;
308255
- const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
308309
+ const useLatestFlash = config2.hasLatestFlashGAAccess?.() ?? false;
308310
+ const useLatestFlashLite = config2.hasLatestFlashLiteGAAccess?.() ?? false;
308256
308311
  const isOriginallyGemini3 = isGemini3Model(modelFromConfig, config2);
308257
308312
  const resolvedModel = normalizeModelId(
308258
308313
  resolveModel(
@@ -308261,7 +308316,8 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
308261
308316
  useCustomToolModel,
308262
308317
  hasAccessToPreview,
308263
308318
  config2,
308264
- useGemini3_5Flash
308319
+ useLatestFlash,
308320
+ useLatestFlashLite
308265
308321
  )
308266
308322
  );
308267
308323
  const isAutoPreferred = normalizedPreferredModel ? isAutoModel(normalizedPreferredModel, config2) : false;
@@ -308271,7 +308327,8 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
308271
308327
  const context2 = {
308272
308328
  useGemini3_1: useGemini31,
308273
308329
  useCustomTools: useCustomToolModel,
308274
- useGemini3_5Flash
308330
+ useLatestFlash,
308331
+ useLatestFlashLite
308275
308332
  };
308276
308333
  if (resolvedModel === DEFAULT_GEMINI_FLASH_LITE_MODEL) {
308277
308334
  chain2 = config2.modelConfigService.resolveChain("lite", context2);
@@ -308284,7 +308341,7 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
308284
308341
  }
308285
308342
  if (!chain2) {
308286
308343
  const isAutoSelection = isAutoPreferred || isAutoConfigured;
308287
- const previewEnabled = hasAccessToPreview && (isGemini3Model(resolvedModel, config2) || normalizedPreferredModel === PREVIEW_GEMINI_MODEL_AUTO || configuredModel === PREVIEW_GEMINI_MODEL_AUTO);
308344
+ const previewEnabled = hasAccessToPreview && configuredModel !== DEFAULT_GEMINI_MODEL_AUTO && (isGemini3Model(resolvedModel, config2) || normalizedPreferredModel === PREVIEW_GEMINI_MODEL_AUTO || configuredModel === PREVIEW_GEMINI_MODEL_AUTO);
308288
308345
  const autoPrefix = isAutoSelection ? "auto-" : "";
308289
308346
  const chainKey = previewEnabled ? "preview" : "default";
308290
308347
  chain2 = config2.modelConfigService.resolveChain(
@@ -308303,14 +308360,15 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
308303
308360
  } else if (isOriginallyGemini3 || isAutoPreferred || isAutoConfigured) {
308304
308361
  const isAutoSelection = isAutoPreferred || isAutoConfigured;
308305
308362
  if (hasAccessToPreview) {
308306
- const previewEnabled = isOriginallyGemini3 || normalizedPreferredModel === PREVIEW_GEMINI_MODEL_AUTO || configuredModel === PREVIEW_GEMINI_MODEL_AUTO;
308363
+ const previewEnabled = configuredModel !== DEFAULT_GEMINI_MODEL_AUTO && (isOriginallyGemini3 || normalizedPreferredModel === PREVIEW_GEMINI_MODEL_AUTO || configuredModel === PREVIEW_GEMINI_MODEL_AUTO);
308307
308364
  chain2 = getModelPolicyChain({
308308
308365
  previewEnabled,
308309
308366
  isAutoSelection,
308310
308367
  userTier: config2.getUserTier(),
308311
308368
  useGemini31,
308312
308369
  useCustomToolModel,
308313
- useGemini3_5Flash
308370
+ useLatestFlash,
308371
+ useLatestFlashLite
308314
308372
  });
308315
308373
  } else {
308316
308374
  chain2 = getModelPolicyChain({
@@ -308319,7 +308377,8 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
308319
308377
  userTier: config2.getUserTier(),
308320
308378
  useGemini31,
308321
308379
  useCustomToolModel,
308322
- useGemini3_5Flash
308380
+ useLatestFlash,
308381
+ useLatestFlashLite
308323
308382
  });
308324
308383
  }
308325
308384
  } else {
@@ -308373,8 +308432,8 @@ function createAvailabilityContextProvider(config2, modelGetter) {
308373
308432
  }
308374
308433
  function selectModelForAvailability(config2, requestedModel) {
308375
308434
  const chain2 = resolvePolicyChain(config2, requestedModel);
308376
- const selection = config2.getModelAvailabilityService().selectFirstAvailable(chain2.map((p) => p.model));
308377
- if (selection.selectedModel) return selection;
308435
+ const selection = config2.getModelAvailabilityService?.()?.selectFirstAvailable(chain2.map((p) => p.model));
308436
+ if (selection?.selectedModel) return selection;
308378
308437
  const backupModel = chain2.find((p) => p.isLastResort)?.model ?? DEFAULT_GEMINI_MODEL;
308379
308438
  return { selectedModel: backupModel, skipped: [] };
308380
308439
  }
@@ -312961,11 +313020,12 @@ var ModelMappingContentGenerator = class {
312961
313020
  }
312962
313021
  mapModel(req) {
312963
313022
  if (req.model) {
313023
+ const activeMappings = typeof this.mappings === "function" ? this.mappings() : this.mappings;
312964
313024
  const normalizedModel = normalizeModelId(req.model);
312965
- if (this.mappings[normalizedModel]) {
313025
+ if (activeMappings[normalizedModel]) {
312966
313026
  return {
312967
313027
  ...req,
312968
- model: req.model.startsWith("models/") ? `models/${this.mappings[normalizedModel]}` : this.mappings[normalizedModel]
313028
+ model: req.model.startsWith("models/") ? `models/${activeMappings[normalizedModel]}` : activeMappings[normalizedModel]
312969
313029
  };
312970
313030
  }
312971
313031
  }
@@ -313431,7 +313491,7 @@ async function createContentGenerator(config2, gcConfig, sessionId) {
313431
313491
  gcConfig,
313432
313492
  sessionId
313433
313493
  ),
313434
- CCPA_AI_MODEL_MAPPINGS
313494
+ () => getBackendModelMappings(gcConfig, true)
313435
313495
  ),
313436
313496
  gcConfig
313437
313497
  );
@@ -313503,7 +313563,13 @@ async function createContentGenerator(config2, gcConfig, sessionId) {
313503
313563
  }
313504
313564
  }
313505
313565
  });
313506
- return new LoggingContentGenerator(googleGenAI.models, gcConfig);
313566
+ return new LoggingContentGenerator(
313567
+ new ModelMappingContentGenerator(
313568
+ googleGenAI.models,
313569
+ () => getBackendModelMappings(gcConfig, false)
313570
+ ),
313571
+ gcConfig
313572
+ );
313507
313573
  }
313508
313574
  throw new Error(
313509
313575
  `Error creating contentGenerator: Unsupported authType: ${config2.authType}`
@@ -338021,16 +338087,21 @@ function modelStringToModelConfigAlias(model) {
338021
338087
  case PREVIEW_GEMINI_3_1_MODEL:
338022
338088
  return "chat-compression-3-pro";
338023
338089
  case PREVIEW_GEMINI_FLASH_MODEL:
338090
+ case BASE_GEMINI_FLASH_MODEL:
338091
+ case LATEST_GEMINI_FLASH_MODEL:
338092
+ case LEGACY_CCPA_FLASH_MODEL:
338024
338093
  return "chat-compression-3-flash";
338025
338094
  case PREVIEW_GEMINI_FLASH_LITE_MODEL:
338026
338095
  // fallthrough
338096
+ case BASE_GEMINI_FLASH_LITE_MODEL:
338027
338097
  case DEFAULT_GEMINI_FLASH_LITE_MODEL:
338098
+ case LATEST_GEMINI_FLASH_LITE_MODEL:
338028
338099
  return "chat-compression-3.1-flash-lite";
338029
338100
  case "gemini-2.5-flash-lite":
338030
338101
  return "chat-compression-2.5-flash-lite";
338031
338102
  case DEFAULT_GEMINI_MODEL:
338032
338103
  return "chat-compression-2.5-pro";
338033
- case DEFAULT_GEMINI_FLASH_MODEL:
338104
+ case "gemini-2.5-flash":
338034
338105
  return "chat-compression-2.5-flash";
338035
338106
  default:
338036
338107
  return "chat-compression-default";
@@ -342859,7 +342930,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
342859
342930
  return provider;
342860
342931
  }
342861
342932
  case "oauth2": {
342862
- const { OAuth2AuthProvider } = await import("./oauth2-provider-ZC45IIOS.js");
342933
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-B67V2HIE.js");
342863
342934
  const provider = new OAuth2AuthProvider(
342864
342935
  authConfig,
342865
342936
  options.agentName ?? "unknown",
@@ -343030,7 +343101,7 @@ var ModelConfigService = class _ModelConfigService {
343030
343101
  const definitions = this.config.modelDefinitions ?? {};
343031
343102
  const shouldShowPreviewModels = context2.hasAccessToPreview ?? false;
343032
343103
  const useGemini31 = context2.useGemini3_1 ?? false;
343033
- const useGemini3_5Flash = context2.useGemini3_5Flash ?? false;
343104
+ const useLatestFlash = context2.useLatestFlash ?? false;
343034
343105
  const mainOptions = Object.entries(definitions).filter(([_, m]) => {
343035
343106
  if (m.isVisible !== true) return false;
343036
343107
  if (m.isPreview && !shouldShowPreviewModels) return false;
@@ -343042,7 +343113,7 @@ var ModelConfigService = class _ModelConfigService {
343042
343113
  description = getAutoModelDescription(
343043
343114
  shouldShowPreviewModels,
343044
343115
  useGemini31,
343045
- useGemini3_5Flash
343116
+ useLatestFlash
343046
343117
  );
343047
343118
  } else if (id === "auto-gemini-3" && useGemini31) {
343048
343119
  description = description.replace("gemini-3-pro", "gemini-3.1-pro");
@@ -343105,14 +343176,22 @@ var ModelConfigService = class _ModelConfigService {
343105
343176
  switch (key) {
343106
343177
  case "useGemini3_1":
343107
343178
  return value === context2.useGemini3_1;
343108
- case "useGemini3_1FlashLite":
343109
- return value === context2.useGemini3_1FlashLite;
343110
- case "useGemini3_5Flash":
343111
- return value === context2.useGemini3_5Flash;
343179
+ case "useLatestFlashLite":
343180
+ case "useGemini3_1FlashLite": {
343181
+ const actualValue = key === "useLatestFlashLite" ? context2.useLatestFlashLite ?? context2.useGemini3_1FlashLite : context2.useGemini3_1FlashLite ?? context2.useLatestFlashLite;
343182
+ return value === actualValue;
343183
+ }
343184
+ case "useLatestFlash":
343185
+ case "useGemini3_5Flash": {
343186
+ const actualValue = key === "useLatestFlash" ? context2.useLatestFlash ?? context2.useGemini3_5Flash : context2.useGemini3_5Flash ?? context2.useLatestFlash;
343187
+ return value === actualValue;
343188
+ }
343112
343189
  case "useCustomTools":
343113
343190
  return value === context2.useCustomTools;
343114
343191
  case "hasAccessToPreview":
343115
343192
  return value === context2.hasAccessToPreview;
343193
+ case "hasAccessToProModel":
343194
+ return value === context2.hasAccessToProModel;
343116
343195
  case "requestedModels":
343117
343196
  return Array.isArray(value) && !!context2.requestedModel && value.includes(context2.requestedModel);
343118
343197
  default:
@@ -364388,7 +364467,8 @@ ${formattedHistory}
364388
364467
  config2.getUseCustomToolModel(),
364389
364468
  config2.getHasAccessToPreviewModel()
364390
364469
  ]);
364391
- const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
364470
+ const useLatestFlash = config2.hasLatestFlashGAAccess?.() ?? false;
364471
+ const useLatestFlashLite = config2.hasLatestFlashLiteGAAccess?.() ?? false;
364392
364472
  const selectedModel = resolveClassifierModel(
364393
364473
  context2.requestedModel ?? config2.getModel(),
364394
364474
  routerResponse.model_choice,
@@ -364396,7 +364476,8 @@ ${formattedHistory}
364396
364476
  useCustomToolModel,
364397
364477
  hasAccessToPreview,
364398
364478
  config2,
364399
- useGemini3_5Flash
364479
+ useLatestFlash,
364480
+ useLatestFlashLite
364400
364481
  );
364401
364482
  return {
364402
364483
  model: selectedModel,
@@ -364423,7 +364504,8 @@ var DefaultStrategy = class {
364423
364504
  false,
364424
364505
  config2.getHasAccessToPreviewModel?.() ?? true,
364425
364506
  config2,
364426
- config2.hasGemini35FlashGAAccess?.() ?? false
364507
+ config2.hasLatestFlashGAAccess?.() ?? false,
364508
+ config2.hasLatestFlashLiteGAAccess?.() ?? false
364427
364509
  );
364428
364510
  return {
364429
364511
  model: defaultModel,
@@ -364569,7 +364651,8 @@ var ClassifierStrategy = class {
364569
364651
  config2.getGemini31Launched(),
364570
364652
  config2.getUseCustomToolModel()
364571
364653
  ]);
364572
- const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
364654
+ const useLatestFlash = config2.hasLatestFlashGAAccess?.() ?? false;
364655
+ const useLatestFlashLite = config2.hasLatestFlashLiteGAAccess?.() ?? false;
364573
364656
  const selectedModel = normalizeModelId(
364574
364657
  resolveClassifierModel(
364575
364658
  normalizeModelId(model),
@@ -364578,7 +364661,8 @@ var ClassifierStrategy = class {
364578
364661
  useCustomToolModel,
364579
364662
  config2.getHasAccessToPreviewModel?.() ?? true,
364580
364663
  config2,
364581
- useGemini3_5Flash
364664
+ useLatestFlash,
364665
+ useLatestFlashLite
364582
364666
  )
364583
364667
  );
364584
364668
  const service = config2.getModelAvailabilityService();
@@ -364727,7 +364811,8 @@ var NumericalClassifierStrategy = class {
364727
364811
  config2.getGemini31Launched(),
364728
364812
  config2.getUseCustomToolModel()
364729
364813
  ]);
364730
- const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
364814
+ const useLatestFlash = config2.hasLatestFlashGAAccess?.() ?? false;
364815
+ const useLatestFlashLite = config2.hasLatestFlashLiteGAAccess?.() ?? false;
364731
364816
  const selectedModel = normalizeModelId(
364732
364817
  resolveClassifierModel(
364733
364818
  normalizeModelId(model),
@@ -364736,7 +364821,8 @@ var NumericalClassifierStrategy = class {
364736
364821
  useCustomToolModel,
364737
364822
  config2.getHasAccessToPreviewModel?.() ?? true,
364738
364823
  config2,
364739
- useGemini3_5Flash
364824
+ useLatestFlash,
364825
+ useLatestFlashLite
364740
364826
  )
364741
364827
  );
364742
364828
  const service = config2.getModelAvailabilityService();
@@ -364860,7 +364946,8 @@ var FallbackStrategy = class {
364860
364946
  false,
364861
364947
  config2.getHasAccessToPreviewModel?.() ?? true,
364862
364948
  config2,
364863
- config2.hasGemini35FlashGAAccess?.() ?? false
364949
+ config2.hasLatestFlashGAAccess?.() ?? false,
364950
+ config2.hasLatestFlashLiteGAAccess?.() ?? false
364864
364951
  );
364865
364952
  const service = config2.getModelAvailabilityService();
364866
364953
  const snapshot = service.snapshot(resolvedModel);
@@ -364897,7 +364984,8 @@ var OverrideStrategy = class {
364897
364984
  false,
364898
364985
  config2.getHasAccessToPreviewModel?.() ?? true,
364899
364986
  config2,
364900
- config2.hasGemini35FlashGAAccess?.() ?? false
364987
+ config2.hasLatestFlashGAAccess?.() ?? false,
364988
+ config2.hasLatestFlashLiteGAAccess?.() ?? false
364901
364989
  ),
364902
364990
  metadata: {
364903
364991
  source: this.name,
@@ -364927,7 +365015,8 @@ var ApprovalModeStrategy = class {
364927
365015
  config2.getUseCustomToolModel(),
364928
365016
  config2.getHasAccessToPreviewModel()
364929
365017
  ]);
364930
- const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
365018
+ const useLatestFlash = config2.hasLatestFlashGAAccess?.() ?? false;
365019
+ const useLatestFlashLite = config2.hasLatestFlashLiteGAAccess?.() ?? false;
364931
365020
  if (approvalMode === "plan" /* PLAN */) {
364932
365021
  const proModel = resolveClassifierModel(
364933
365022
  model,
@@ -364936,7 +365025,8 @@ var ApprovalModeStrategy = class {
364936
365025
  useCustomToolModel,
364937
365026
  hasAccessToPreview,
364938
365027
  config2,
364939
- useGemini3_5Flash
365028
+ useLatestFlash,
365029
+ useLatestFlashLite
364940
365030
  );
364941
365031
  return {
364942
365032
  model: proModel,
@@ -364954,7 +365044,8 @@ var ApprovalModeStrategy = class {
364954
365044
  useCustomToolModel,
364955
365045
  hasAccessToPreview,
364956
365046
  config2,
364957
- useGemini3_5Flash
365047
+ useLatestFlash,
365048
+ useLatestFlashLite
364958
365049
  );
364959
365050
  return {
364960
365051
  model: flashModel,
@@ -365174,12 +365265,24 @@ var DEFAULT_MODEL_CONFIGS = {
365174
365265
  model: "gemini-3.1-flash-lite"
365175
365266
  }
365176
365267
  },
365268
+ "gemini-3.5-flash-lite": {
365269
+ extends: "chat-base-3",
365270
+ modelConfig: {
365271
+ model: "gemini-3.5-flash-lite"
365272
+ }
365273
+ },
365177
365274
  "gemini-3.5-flash": {
365178
365275
  extends: "chat-base-3",
365179
365276
  modelConfig: {
365180
365277
  model: "gemini-3.5-flash"
365181
365278
  }
365182
365279
  },
365280
+ "gemini-3.8-flash": {
365281
+ extends: "chat-base-3",
365282
+ modelConfig: {
365283
+ model: "gemini-3.8-flash"
365284
+ }
365285
+ },
365183
365286
  "gemma-4-31b-it": {
365184
365287
  extends: "chat-base-3",
365185
365288
  modelConfig: {
@@ -365390,6 +365493,13 @@ var DEFAULT_MODEL_CONFIGS = {
365390
365493
  isVisible: true,
365391
365494
  features: { thinking: false, multimodalToolUse: true }
365392
365495
  },
365496
+ "gemini-3.5-flash-lite": {
365497
+ tier: "flash-lite",
365498
+ family: "gemini-3",
365499
+ isPreview: false,
365500
+ isVisible: true,
365501
+ features: { thinking: false, multimodalToolUse: true }
365502
+ },
365393
365503
  "gemini-3.1-pro-preview": {
365394
365504
  tier: "pro",
365395
365505
  family: "gemini-3",
@@ -365425,6 +365535,13 @@ var DEFAULT_MODEL_CONFIGS = {
365425
365535
  isVisible: true,
365426
365536
  features: { thinking: false, multimodalToolUse: true }
365427
365537
  },
365538
+ "gemini-3.8-flash": {
365539
+ tier: "flash",
365540
+ family: "gemini-3",
365541
+ isPreview: false,
365542
+ isVisible: true,
365543
+ features: { thinking: false, multimodalToolUse: true }
365544
+ },
365428
365545
  "gemini-2.5-pro": {
365429
365546
  tier: "pro",
365430
365547
  family: "gemini-2.5",
@@ -365528,32 +365645,40 @@ var DEFAULT_MODEL_CONFIGS = {
365528
365645
  default: "gemini-3-flash-preview",
365529
365646
  contexts: [
365530
365647
  {
365531
- condition: { hasAccessToPreview: false, useGemini3_5Flash: true },
365532
- target: "gemini-3.5-flash"
365648
+ condition: { hasAccessToPreview: false, useLatestFlash: true },
365649
+ target: LATEST_GEMINI_FLASH_MODEL
365533
365650
  },
365534
365651
  {
365535
- condition: { hasAccessToPreview: false, useGemini3_5Flash: false },
365536
- target: "gemini-2.5-flash"
365652
+ condition: { hasAccessToPreview: false, useLatestFlash: false },
365653
+ target: BASE_GEMINI_FLASH_MODEL
365537
365654
  }
365538
365655
  ]
365539
365656
  },
365540
- "gemini-3.5-flash": {
365541
- default: "gemini-3.5-flash",
365657
+ [BASE_GEMINI_FLASH_MODEL]: {
365658
+ default: BASE_GEMINI_FLASH_MODEL,
365542
365659
  contexts: [
365543
365660
  {
365544
- condition: { useGemini3_5Flash: false, hasAccessToPreview: false },
365545
- target: "gemini-2.5-flash"
365546
- },
365661
+ condition: { useLatestFlash: true },
365662
+ target: LATEST_GEMINI_FLASH_MODEL
365663
+ }
365664
+ ]
365665
+ },
365666
+ [LATEST_GEMINI_FLASH_MODEL]: {
365667
+ default: LATEST_GEMINI_FLASH_MODEL,
365668
+ contexts: [
365547
365669
  {
365548
- condition: { useGemini3_5Flash: false },
365549
- target: "gemini-3-flash-preview"
365670
+ condition: { useLatestFlash: false },
365671
+ target: BASE_GEMINI_FLASH_MODEL
365550
365672
  }
365551
365673
  ]
365552
365674
  },
365553
365675
  "gemini-2.5-flash": {
365554
365676
  default: "gemini-2.5-flash",
365555
365677
  contexts: [
365556
- { condition: { useGemini3_5Flash: true }, target: "gemini-3.5-flash" }
365678
+ {
365679
+ condition: { useLatestFlash: true },
365680
+ target: LATEST_GEMINI_FLASH_MODEL
365681
+ }
365557
365682
  ]
365558
365683
  },
365559
365684
  "gemini-3-pro-preview": {
@@ -365598,21 +365723,45 @@ var DEFAULT_MODEL_CONFIGS = {
365598
365723
  }
365599
365724
  ]
365600
365725
  },
365601
- "gemini-3.1-flash-lite": {
365602
- default: "gemini-3.1-flash-lite"
365726
+ [BASE_GEMINI_FLASH_LITE_MODEL]: {
365727
+ default: BASE_GEMINI_FLASH_LITE_MODEL,
365728
+ contexts: [
365729
+ {
365730
+ condition: { useLatestFlashLite: true },
365731
+ target: LATEST_GEMINI_FLASH_LITE_MODEL
365732
+ }
365733
+ ]
365734
+ },
365735
+ [LATEST_GEMINI_FLASH_LITE_MODEL]: {
365736
+ default: LATEST_GEMINI_FLASH_LITE_MODEL,
365737
+ contexts: [
365738
+ {
365739
+ condition: { useLatestFlashLite: false },
365740
+ target: BASE_GEMINI_FLASH_LITE_MODEL
365741
+ }
365742
+ ]
365603
365743
  },
365604
365744
  flash: {
365605
365745
  default: "gemini-3-flash-preview",
365606
365746
  contexts: [
365607
- { condition: { useGemini3_5Flash: true }, target: "gemini-3.5-flash" },
365747
+ {
365748
+ condition: { useLatestFlash: true },
365749
+ target: LATEST_GEMINI_FLASH_MODEL
365750
+ },
365608
365751
  {
365609
365752
  condition: { hasAccessToPreview: false },
365610
- target: "gemini-2.5-flash"
365753
+ target: BASE_GEMINI_FLASH_MODEL
365611
365754
  }
365612
365755
  ]
365613
365756
  },
365614
365757
  "flash-lite": {
365615
- default: "gemini-3.1-flash-lite"
365758
+ default: BASE_GEMINI_FLASH_LITE_MODEL,
365759
+ contexts: [
365760
+ {
365761
+ condition: { useLatestFlashLite: true },
365762
+ target: LATEST_GEMINI_FLASH_LITE_MODEL
365763
+ }
365764
+ ]
365616
365765
  },
365617
365766
  "auto-gemini-3": {
365618
365767
  default: "gemini-3-pro-preview",
@@ -365636,14 +365785,17 @@ var DEFAULT_MODEL_CONFIGS = {
365636
365785
  flash: {
365637
365786
  default: "gemini-3-flash-preview",
365638
365787
  contexts: [
365639
- { condition: { useGemini3_5Flash: true }, target: "gemini-3.5-flash" },
365788
+ {
365789
+ condition: { useLatestFlash: true },
365790
+ target: LATEST_GEMINI_FLASH_MODEL
365791
+ },
365640
365792
  {
365641
365793
  condition: { hasAccessToPreview: false },
365642
- target: "gemini-2.5-flash"
365794
+ target: BASE_GEMINI_FLASH_MODEL
365643
365795
  },
365644
365796
  {
365645
365797
  condition: { requestedModels: ["gemini-2.5-pro", "auto-gemini-2.5"] },
365646
- target: "gemini-2.5-flash"
365798
+ target: BASE_GEMINI_FLASH_MODEL
365647
365799
  }
365648
365800
  ]
365649
365801
  },
@@ -365741,7 +365893,7 @@ var DEFAULT_MODEL_CONFIGS = {
365741
365893
  ],
365742
365894
  default: [
365743
365895
  {
365744
- model: "gemini-2.5-pro",
365896
+ model: DEFAULT_GEMINI_MODEL,
365745
365897
  actions: {
365746
365898
  terminal: "prompt",
365747
365899
  transient: "prompt",
@@ -365756,7 +365908,7 @@ var DEFAULT_MODEL_CONFIGS = {
365756
365908
  }
365757
365909
  },
365758
365910
  {
365759
- model: "gemini-2.5-flash",
365911
+ model: BASE_GEMINI_FLASH_MODEL,
365760
365912
  isLastResort: true,
365761
365913
  maxAttempts: 10,
365762
365914
  actions: {
@@ -365775,7 +365927,7 @@ var DEFAULT_MODEL_CONFIGS = {
365775
365927
  ],
365776
365928
  "auto-default": [
365777
365929
  {
365778
- model: "gemini-2.5-pro",
365930
+ model: DEFAULT_GEMINI_MODEL,
365779
365931
  maxAttempts: 3,
365780
365932
  actions: {
365781
365933
  terminal: "prompt",
@@ -365791,7 +365943,7 @@ var DEFAULT_MODEL_CONFIGS = {
365791
365943
  }
365792
365944
  },
365793
365945
  {
365794
- model: "gemini-2.5-flash",
365946
+ model: BASE_GEMINI_FLASH_MODEL,
365795
365947
  isLastResort: true,
365796
365948
  maxAttempts: 10,
365797
365949
  actions: {
@@ -365810,7 +365962,7 @@ var DEFAULT_MODEL_CONFIGS = {
365810
365962
  ],
365811
365963
  lite: [
365812
365964
  {
365813
- model: "flash-lite",
365965
+ model: BASE_GEMINI_FLASH_LITE_MODEL,
365814
365966
  actions: {
365815
365967
  terminal: "silent",
365816
365968
  transient: "silent",
@@ -365825,7 +365977,7 @@ var DEFAULT_MODEL_CONFIGS = {
365825
365977
  }
365826
365978
  },
365827
365979
  {
365828
- model: "gemini-2.5-flash",
365980
+ model: BASE_GEMINI_FLASH_MODEL,
365829
365981
  actions: {
365830
365982
  terminal: "silent",
365831
365983
  transient: "silent",
@@ -365840,7 +365992,7 @@ var DEFAULT_MODEL_CONFIGS = {
365840
365992
  }
365841
365993
  },
365842
365994
  {
365843
- model: "gemini-2.5-pro",
365995
+ model: DEFAULT_GEMINI_MODEL,
365844
365996
  isLastResort: true,
365845
365997
  actions: {
365846
365998
  terminal: "silent",
@@ -369497,6 +369649,9 @@ var ExperimentFlags = {
369497
369649
  GEMINI_3_1_PRO_LAUNCHED: 45760185,
369498
369650
  PRO_MODEL_NO_ACCESS: 45768879,
369499
369651
  DEFAULT_REQUEST_TIMEOUT: 45773134,
369652
+ LATEST_FLASH_GA_LAUNCHED: 45842815,
369653
+ LATEST_FLASH_LITE_GA_LAUNCHED: 45827489,
369654
+ /** @deprecated Use LATEST_FLASH_GA_LAUNCHED */
369500
369655
  GEMINI_3_5_FLASH_GA_LAUNCHED: 45780819
369501
369656
  };
369502
369657
 
@@ -385517,7 +385672,8 @@ var Config = class {
385517
385672
  this.getUseCustomToolModelSync(),
385518
385673
  this.getHasAccessToPreviewModel(),
385519
385674
  this,
385520
- this.hasGemini35FlashGAAccess()
385675
+ this.hasLatestFlashGAAccess(),
385676
+ this.hasLatestFlashLiteGAAccess()
385521
385677
  );
385522
385678
  const isPreview2 = isPreviewModel(primaryModel, this);
385523
385679
  const proModel = primaryModel;
@@ -385545,7 +385701,8 @@ var Config = class {
385545
385701
  this.getUseCustomToolModelSync(),
385546
385702
  this.getHasAccessToPreviewModel(),
385547
385703
  this,
385548
- this.hasGemini35FlashGAAccess()
385704
+ this.hasLatestFlashGAAccess(),
385705
+ this.hasLatestFlashLiteGAAccess()
385549
385706
  );
385550
385707
  return this.modelQuotas.get(primaryModel)?.remaining;
385551
385708
  }
@@ -385560,7 +385717,8 @@ var Config = class {
385560
385717
  this.getUseCustomToolModelSync(),
385561
385718
  this.getHasAccessToPreviewModel(),
385562
385719
  this,
385563
- this.hasGemini35FlashGAAccess()
385720
+ this.hasLatestFlashGAAccess(),
385721
+ this.hasLatestFlashLiteGAAccess()
385564
385722
  );
385565
385723
  return this.modelQuotas.get(primaryModel)?.limit;
385566
385724
  }
@@ -385575,7 +385733,8 @@ var Config = class {
385575
385733
  this.getUseCustomToolModelSync(),
385576
385734
  this.getHasAccessToPreviewModel(),
385577
385735
  this,
385578
- this.hasGemini35FlashGAAccess()
385736
+ this.hasLatestFlashGAAccess(),
385737
+ this.hasLatestFlashLiteGAAccess()
385579
385738
  );
385580
385739
  return this.modelQuotas.get(primaryModel)?.resetTime;
385581
385740
  }
@@ -385713,8 +385872,10 @@ var Config = class {
385713
385872
  continue;
385714
385873
  }
385715
385874
  let modelId = bucket.modelId;
385716
- if (modelId === SECONDARY_GEMINI_3_5_FLASH_MODEL) {
385717
- modelId = DEFAULT_GEMINI_3_5_FLASH_MODEL;
385875
+ if (modelId === LEGACY_CCPA_FLASH_MODEL || modelId === BASE_GEMINI_FLASH_MODEL || modelId === LATEST_GEMINI_FLASH_MODEL) {
385876
+ modelId = this.hasLatestFlashGAAccess() ? LATEST_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
385877
+ } else if (modelId === BASE_GEMINI_FLASH_LITE_MODEL || modelId === LATEST_GEMINI_FLASH_LITE_MODEL) {
385878
+ modelId = this.hasLatestFlashLiteGAAccess() ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL;
385718
385879
  }
385719
385880
  let remaining;
385720
385881
  let limit;
@@ -386630,29 +386791,47 @@ ${sections.join("\n")}
386630
386791
  return authType === "gemini-api-key" /* USE_GEMINI */ || authType === "vertex-ai" /* USE_VERTEX_AI */ || authType === "gateway" /* GATEWAY */;
386631
386792
  }
386632
386793
  /**
386633
- * Returns whether Gemini 3.5 Flash GA has been launched.
386634
- *
386635
- * Note: This method should only be called after startup, once experiments have been loaded.
386794
+ * Returns whether the latest Flash GA model (currently Gemini 3.8 Flash) has been launched.
386636
386795
  */
386637
- hasGemini35FlashGAAccess() {
386796
+ hasLatestFlashGAAccess() {
386638
386797
  const authType = this.contentGeneratorConfig?.authType;
386639
386798
  const hasAccess = (() => {
386640
386799
  if (this.isGemini31LaunchedForAuthType(authType)) {
386641
386800
  return true;
386642
386801
  }
386643
- return this.experiments?.flags[ExperimentFlags.GEMINI_3_5_FLASH_GA_LAUNCHED]?.boolValue ?? false;
386802
+ return this.experiments?.flags[ExperimentFlags.LATEST_FLASH_GA_LAUNCHED]?.boolValue ?? false;
386644
386803
  })();
386645
386804
  if (hasAccess) {
386646
386805
  if (authType === "gemini-api-key" /* USE_GEMINI */) {
386647
- setFlashModels("gemini-3-flash-preview", "gemini-3.5-flash");
386806
+ setFlashModels("gemini-3-flash-preview", LATEST_GEMINI_FLASH_MODEL);
386648
386807
  } else {
386649
- setFlashModels("gemini-3.5-flash", "gemini-3.5-flash");
386808
+ setFlashModels(LATEST_GEMINI_FLASH_MODEL, LATEST_GEMINI_FLASH_MODEL);
386650
386809
  }
386651
386810
  } else {
386652
- setFlashModels("gemini-3-flash-preview", "gemini-2.5-flash");
386811
+ setFlashModels("gemini-3-flash-preview", BASE_GEMINI_FLASH_MODEL);
386653
386812
  }
386654
386813
  return hasAccess;
386655
386814
  }
386815
+ /** @deprecated Use hasLatestFlashGAAccess() */
386816
+ hasGemini35FlashGAAccess() {
386817
+ return this.hasLatestFlashGAAccess();
386818
+ }
386819
+ /**
386820
+ * Returns whether the latest Flash Lite GA model (currently Gemini 3.5 Flash Lite) has been launched.
386821
+ */
386822
+ hasLatestFlashLiteGAAccess() {
386823
+ const authType = this.contentGeneratorConfig?.authType;
386824
+ const hasAccess = (() => {
386825
+ if (this.isGemini31LaunchedForAuthType(authType)) {
386826
+ return true;
386827
+ }
386828
+ return this.experiments?.flags[ExperimentFlags.LATEST_FLASH_LITE_GA_LAUNCHED]?.boolValue ?? false;
386829
+ })();
386830
+ setFlashLiteModel(
386831
+ hasAccess ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL
386832
+ );
386833
+ return hasAccess;
386834
+ }
386656
386835
  /**
386657
386836
  * Returns whether Gemini 3.1 has been launched.
386658
386837
  *
@@ -387145,6 +387324,8 @@ ${sections.join("\n")}
387145
387324
  compact: false
387146
387325
  });
387147
387326
  debugLogger.debug("Experiments loaded", summaryString);
387327
+ this.hasLatestFlashGAAccess();
387328
+ this.hasLatestFlashLiteGAAccess();
387148
387329
  }
387149
387330
  onAgentsRefreshed = async () => {
387150
387331
  const client = this.geminiClient;
@@ -404872,15 +405053,23 @@ export {
404872
405053
  PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
404873
405054
  PREVIEW_GEMINI_FLASH_MODEL,
404874
405055
  DEFAULT_GEMINI_MODEL,
404875
- DEFAULT_GEMINI_FLASH_MODEL,
405056
+ BASE_GEMINI_FLASH_MODEL,
405057
+ LATEST_GEMINI_FLASH_MODEL,
405058
+ LEGACY_CCPA_FLASH_MODEL,
404876
405059
  DEFAULT_GEMINI_3_5_FLASH_MODEL,
404877
405060
  SECONDARY_GEMINI_3_5_FLASH_MODEL,
404878
- setFlashModels,
405061
+ BASE_GEMINI_FLASH_LITE_MODEL,
405062
+ LATEST_GEMINI_FLASH_LITE_MODEL,
405063
+ DEFAULT_GEMINI_FLASH_MODEL,
404879
405064
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
405065
+ setFlashModels,
405066
+ setFlashLiteModel,
405067
+ resetModelsForTesting,
404880
405068
  PREVIEW_GEMINI_FLASH_LITE_MODEL,
404881
405069
  GEMMA_4_31B_IT_MODEL,
404882
405070
  GEMMA_4_26B_A4B_IT_MODEL,
404883
405071
  VALID_GEMINI_MODELS,
405072
+ getBackendModelMappings,
404884
405073
  PREVIEW_GEMINI_MODEL_AUTO,
404885
405074
  DEFAULT_GEMINI_MODEL_AUTO,
404886
405075
  GEMINI_MODEL_ALIAS_AUTO,