@google/gemini-cli 0.55.0-preview.2 → 0.55.0-preview.3

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 (66) hide show
  1. package/bundle/{chunk-57ZLFNIU.js → chunk-2K3N3YWJ.js} +1 -1
  2. package/bundle/{chunk-CYJHOZAD.js → chunk-2YAEBNH4.js} +1 -1
  3. package/bundle/{chunk-3OPKUUXP.js → chunk-3JEIIDY3.js} +1 -1
  4. package/bundle/{chunk-4SFKECJB.js → chunk-3KVUW3GS.js} +1 -1
  5. package/bundle/{chunk-2NTEXQZI.js → chunk-4MK4F3LQ.js} +2 -2
  6. package/bundle/{chunk-7IYUUE2H.js → chunk-4PVLKN7E.js} +1 -1
  7. package/bundle/{chunk-CBX65YIB.js → chunk-5C4IPSFG.js} +1 -1
  8. package/bundle/{chunk-L6Q242KC.js → chunk-6VBVRJ2T.js} +1 -1
  9. package/bundle/{chunk-KII3XXCP.js → chunk-7U5FKJMS.js} +3 -3
  10. package/bundle/{chunk-T36P7MFE.js → chunk-BXJWVB6T.js} +7 -7
  11. package/bundle/{chunk-J6DC57TM.js → chunk-CF6HJK4T.js} +1 -1
  12. package/bundle/{chunk-A4YWS44A.js → chunk-D7NKQXI3.js} +10 -6
  13. package/bundle/{chunk-DBPSBJMI.js → chunk-DIJFIQU5.js} +1 -1
  14. package/bundle/{chunk-O5GQF2L7.js → chunk-DW2J2NTU.js} +1 -1
  15. package/bundle/{chunk-PTZIAOG5.js → chunk-EBUEQDL4.js} +3 -3
  16. package/bundle/{chunk-4C7ON4TD.js → chunk-ENEDM4X3.js} +1 -1
  17. package/bundle/{chunk-LVOM4PEE.js → chunk-ETEDB3N6.js} +2 -2
  18. package/bundle/{chunk-J27NXCYL.js → chunk-FQNLDGXL.js} +1 -1
  19. package/bundle/{chunk-OC55SY62.js → chunk-GJBRSFPM.js} +7 -7
  20. package/bundle/{chunk-DSCF5EA6.js → chunk-IKOQM4YN.js} +3 -3
  21. package/bundle/{chunk-S3XRZJYO.js → chunk-MOTK2J3L.js} +1 -1
  22. package/bundle/{chunk-DRN2VYCZ.js → chunk-NQ7ACVH7.js} +2 -2
  23. package/bundle/{chunk-2ZWCUTMN.js → chunk-OKM3M2PX.js} +1 -1
  24. package/bundle/{chunk-QPGTVRXP.js → chunk-QJZS4YYR.js} +7 -7
  25. package/bundle/{chunk-MLTI5CK6.js → chunk-QY6VB26P.js} +9 -5
  26. package/bundle/{chunk-FH7GCVZY.js → chunk-S35HA76T.js} +2 -2
  27. package/bundle/{chunk-IHR5TZ6N.js → chunk-V6HSKTFR.js} +3 -3
  28. package/bundle/{chunk-HZZM77SO.js → chunk-VPMDE76T.js} +10 -6
  29. package/bundle/{chunk-R3S5PP5S.js → chunk-WWUS7UCO.js} +10 -6
  30. package/bundle/{chunk-XWGJPCDB.js → chunk-XLLOEYE5.js} +1 -1
  31. package/bundle/{chunk-SEHUSFSL.js → chunk-XNQ2USVV.js} +1 -1
  32. package/bundle/{chunk-UXD5COS4.js → chunk-YOSR3LGH.js} +7 -7
  33. package/bundle/{cleanup-PYHN72B4.js → cleanup-6PJC7KVH.js} +2 -2
  34. package/bundle/{cleanup-QOIB4MC5.js → cleanup-AA32XASX.js} +2 -2
  35. package/bundle/{cleanup-X7SPIVY6.js → cleanup-KJNT5CKE.js} +2 -2
  36. package/bundle/{cleanup-XHKLOUOX.js → cleanup-W4XFBOYU.js} +2 -2
  37. package/bundle/{core-TM4S2KC6.js → core-PJ4GTWLE.js} +1 -1
  38. package/bundle/{devtoolsService-QXH36QMO.js → devtoolsService-BPCHKSK6.js} +2 -2
  39. package/bundle/{devtoolsService-XNULR5OM.js → devtoolsService-DDIV43LO.js} +2 -2
  40. package/bundle/{devtoolsService-XP7RODGG.js → devtoolsService-SFT4J3TP.js} +2 -2
  41. package/bundle/{devtoolsService-YBK5NQJR.js → devtoolsService-X4SBEWHU.js} +2 -2
  42. package/bundle/{dist-DUXHKH4A.js → dist-6SIQ6JNU.js} +1 -1
  43. package/bundle/{dist-FCM7NH26.js → dist-UVDHLJPD.js} +1 -1
  44. package/bundle/{dist-LH5DRLX7.js → dist-VQ3F4FS5.js} +1 -1
  45. package/bundle/{gemini-HDAYOIW2.js → gemini-BMC63EGW.js} +13 -13
  46. package/bundle/{gemini-ORTIIX7J.js → gemini-EYTXXZKY.js} +14 -14
  47. package/bundle/{gemini-ZUILAPR6.js → gemini-MSC5T5EU.js} +14 -14
  48. package/bundle/{gemini-A7HOBIKY.js → gemini-PA23YMHK.js} +14 -14
  49. package/bundle/gemini.js +7 -7
  50. package/bundle/{interactiveCli-KX3U7SFD.js → interactiveCli-5Y6AY63C.js} +67 -25
  51. package/bundle/{interactiveCli-O4YSZIKG.js → interactiveCli-G6PWBLT5.js} +67 -25
  52. package/bundle/{interactiveCli-H524RKEH.js → interactiveCli-OUPTNZ47.js} +67 -25
  53. package/bundle/{interactiveCli-YAAI2B6S.js → interactiveCli-T32DVN2I.js} +67 -25
  54. package/bundle/{liteRtServerManager-FTW42YZF.js → liteRtServerManager-3MCOW5QD.js} +4 -4
  55. package/bundle/{liteRtServerManager-NW33H3DY.js → liteRtServerManager-7IWRFNTW.js} +4 -4
  56. package/bundle/{liteRtServerManager-PRXJGWUQ.js → liteRtServerManager-IRFTOINI.js} +4 -4
  57. package/bundle/{liteRtServerManager-RP2Z5PSZ.js → liteRtServerManager-LVW27XGD.js} +4 -4
  58. package/bundle/{oauth2-provider-JZQDXWRM.js → oauth2-provider-BPEC44QP.js} +1 -1
  59. package/bundle/{oauth2-provider-UKW3UFLQ.js → oauth2-provider-FSAA6HVA.js} +1 -1
  60. package/bundle/{oauth2-provider-AXFTVNOH.js → oauth2-provider-IVUO6NTZ.js} +1 -1
  61. package/bundle/{oauth2-provider-X4GQTJLG.js → oauth2-provider-PH6ZPS7W.js} +1 -1
  62. package/bundle/{start-EIHA5TWI.js → start-3M54SR5N.js} +6 -6
  63. package/bundle/{start-ODF2OV65.js → start-EEVFRHCK.js} +6 -6
  64. package/bundle/{start-ONHNJJG7.js → start-FC7N6JMG.js} +6 -6
  65. package/bundle/{start-TSZCFX4W.js → start-N5PPVI4S.js} +6 -6
  66. package/package.json +1 -1
@@ -157,10 +157,10 @@ import {
157
157
  widestLineFromStyledChars,
158
158
  wordBreakStyledChars,
159
159
  wrapStyledChars
160
- } from "./chunk-T36P7MFE.js";
160
+ } from "./chunk-BXJWVB6T.js";
161
161
  import {
162
162
  require_source
163
- } from "./chunk-CYJHOZAD.js";
163
+ } from "./chunk-2K3N3YWJ.js";
164
164
  import {
165
165
  appEvents
166
166
  } from "./chunk-5PS3AYFU.js";
@@ -214,24 +214,24 @@ import {
214
214
  stripAnsi,
215
215
  stripUnsafeCharacters,
216
216
  toCodePoints
217
- } from "./chunk-XWGJPCDB.js";
217
+ } from "./chunk-XLLOEYE5.js";
218
218
  import {
219
219
  handleAutoUpdate,
220
220
  isDevelopment,
221
221
  relaunchApp,
222
222
  setUpdateHandler
223
- } from "./chunk-FH7GCVZY.js";
223
+ } from "./chunk-S35HA76T.js";
224
224
  import {
225
225
  isTodoList,
226
226
  mapCoreStatusToDisplayStatus,
227
227
  require_react
228
- } from "./chunk-2ZWCUTMN.js";
228
+ } from "./chunk-OKM3M2PX.js";
229
229
  import {
230
230
  registerCleanup,
231
231
  removeCleanup,
232
232
  runExitCleanup,
233
233
  setupTtyCheck
234
- } from "./chunk-S3XRZJYO.js";
234
+ } from "./chunk-4PVLKN7E.js";
235
235
  import {
236
236
  ACTIVATE_SKILL_TOOL_NAME,
237
237
  AGENT_TOOL_NAME,
@@ -418,7 +418,7 @@ import {
418
418
  validatePlanContent,
419
419
  validatePlanPath,
420
420
  writeToStdout
421
- } from "./chunk-HZZM77SO.js";
421
+ } from "./chunk-VPMDE76T.js";
422
422
  import "./chunk-664ZODQF.js";
423
423
  import "./chunk-IUUIT4SU.js";
424
424
  import "./chunk-TUDYL3X4.js";
@@ -15519,6 +15519,7 @@ function ProQuotaDialog({
15519
15519
  message,
15520
15520
  isTerminalQuotaError,
15521
15521
  isModelNotFoundError,
15522
+ isCapacityExceeded,
15522
15523
  authType,
15523
15524
  tierName,
15524
15525
  onChoice
@@ -15537,6 +15538,24 @@ function ProQuotaDialog({
15537
15538
  key: "retry_later"
15538
15539
  }
15539
15540
  ];
15541
+ } else if (isCapacityExceeded) {
15542
+ items = [
15543
+ {
15544
+ label: "Keep trying",
15545
+ value: "retry_once",
15546
+ key: "retry_once"
15547
+ },
15548
+ {
15549
+ label: `Switch to ${fallbackModel}`,
15550
+ value: "retry_always",
15551
+ key: "retry_always"
15552
+ },
15553
+ {
15554
+ label: "Stop",
15555
+ value: "retry_later",
15556
+ key: "retry_later"
15557
+ }
15558
+ ];
15540
15559
  } else if (isModelNotFoundError || isTerminalQuotaError) {
15541
15560
  const isUltra = isUltraTier(tierName);
15542
15561
  items = [
@@ -17675,6 +17694,7 @@ var DialogManager = ({
17675
17694
  message: quotaState.proQuotaRequest.message,
17676
17695
  isTerminalQuotaError: quotaState.proQuotaRequest.isTerminalQuotaError,
17677
17696
  isModelNotFoundError: !!quotaState.proQuotaRequest.isModelNotFoundError,
17697
+ isCapacityExceeded: !!quotaState.proQuotaRequest.isCapacityExceeded,
17678
17698
  authType: quotaState.proQuotaRequest.authType,
17679
17699
  tierName: config?.getUserTierName(),
17680
17700
  onChoice: uiActions.handleProQuotaChoice
@@ -25398,6 +25418,7 @@ async function openG1Url(path14, campaign) {
25398
25418
  }
25399
25419
 
25400
25420
  // packages/cli/src/ui/hooks/useQuotaAndFallback.ts
25421
+ var isObject = (val) => typeof val === "object" && val !== null;
25401
25422
  function useQuotaAndFallback({
25402
25423
  config,
25403
25424
  historyManager,
@@ -25420,6 +25441,16 @@ function useQuotaAndFallback({
25420
25441
  let message;
25421
25442
  let isTerminalQuotaError = false;
25422
25443
  let isModelNotFoundError = false;
25444
+ const errorObj = isObject(error) ? error : null;
25445
+ const errorReasonValue = errorObj?.["reason"];
25446
+ const errorReason = typeof errorReasonValue === "string" ? errorReasonValue : void 0;
25447
+ const errorMessageValue = errorObj?.["message"];
25448
+ const errorMessage = typeof errorMessageValue === "string" ? errorMessageValue : void 0;
25449
+ const isCapacityExceeded = errorReason === "MODEL_CAPACITY_EXHAUSTED" || errorReason === "MODEL_CAPACITY_EXCEEDED" || typeof errorMessage === "string" && /exhausted your capacity|capacity exceeded|MODEL_CAPACITY_EXHAUSTED/i.test(
25450
+ errorMessage
25451
+ ) || typeof error === "string" && /exhausted your capacity|capacity exceeded|MODEL_CAPACITY_EXHAUSTED/i.test(
25452
+ error
25453
+ );
25423
25454
  const usageLimitReachedModel = isProModel(failedModel) ? "all Pro models" : failedModel;
25424
25455
  if (error instanceof TerminalQuotaError) {
25425
25456
  isTerminalQuotaError = true;
@@ -25443,14 +25474,24 @@ function useQuotaAndFallback({
25443
25474
  });
25444
25475
  if (creditsResult) return creditsResult;
25445
25476
  }
25446
- const messageLines = [
25447
- `Usage limit reached for ${usageLimitReachedModel}.`,
25448
- error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25449
- `/stats model for usage details`,
25450
- `/model to switch models.`,
25451
- contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25452
- ].filter(Boolean);
25453
- message = messageLines.join("\n");
25477
+ if (isCapacityExceeded) {
25478
+ const messageLines = [
25479
+ `We are currently experiencing high demand for ${usageLimitReachedModel}.`,
25480
+ "We apologize and appreciate your patience.",
25481
+ error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25482
+ `/model to switch models.`
25483
+ ].filter(Boolean);
25484
+ message = messageLines.join("\n");
25485
+ } else {
25486
+ const messageLines = [
25487
+ `Usage limit reached for ${usageLimitReachedModel}.`,
25488
+ error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25489
+ `/stats model for usage details`,
25490
+ `/model to switch models.`,
25491
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25492
+ ].filter(Boolean);
25493
+ message = messageLines.join("\n");
25494
+ }
25454
25495
  } else if (error instanceof ModelNotFoundError) {
25455
25496
  isModelNotFoundError = true;
25456
25497
  if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
@@ -25483,7 +25524,7 @@ function useQuotaAndFallback({
25483
25524
  ];
25484
25525
  message = messageLines.join("\n");
25485
25526
  }
25486
- if (errorVerbosity === "low" && !isTerminalQuotaError && !isModelNotFoundError) {
25527
+ if (errorVerbosity === "low" && (!isTerminalQuotaError || isCapacityExceeded) && !isModelNotFoundError) {
25487
25528
  return "retry_once";
25488
25529
  }
25489
25530
  setModelSwitchedFromQuotaError(true);
@@ -25501,6 +25542,7 @@ function useQuotaAndFallback({
25501
25542
  message,
25502
25543
  isTerminalQuotaError,
25503
25544
  isModelNotFoundError,
25545
+ isCapacityExceeded,
25504
25546
  authType: contentGeneratorConfig?.authType
25505
25547
  });
25506
25548
  }
@@ -30656,12 +30698,12 @@ var streamRequest = (request, onUploadProgress, originalBody) => {
30656
30698
  };
30657
30699
 
30658
30700
  // node_modules/ky/distribution/utils/is.js
30659
- var isObject = (value) => value !== null && typeof value === "object";
30701
+ var isObject2 = (value) => value !== null && typeof value === "object";
30660
30702
 
30661
30703
  // node_modules/ky/distribution/utils/merge.js
30662
30704
  var validateAndMerge = (...sources) => {
30663
30705
  for (const source of sources) {
30664
- if ((!isObject(source) || Array.isArray(source)) && source !== void 0) {
30706
+ if ((!isObject2(source) || Array.isArray(source)) && source !== void 0) {
30665
30707
  throw new TypeError("The `options` argument must be an object");
30666
30708
  }
30667
30709
  }
@@ -30706,7 +30748,7 @@ var appendSearchParameters = (target, source) => {
30706
30748
  }
30707
30749
  result.append(String(pair[0]), String(pair[1]));
30708
30750
  }
30709
- } else if (isObject(input)) {
30751
+ } else if (isObject2(input)) {
30710
30752
  for (const [key, value] of Object.entries(input)) {
30711
30753
  if (value !== void 0) {
30712
30754
  result.append(key, String(value));
@@ -30733,14 +30775,14 @@ var deepMerge = (...sources) => {
30733
30775
  returnValue = [];
30734
30776
  }
30735
30777
  returnValue = [...returnValue, ...source];
30736
- } else if (isObject(source)) {
30778
+ } else if (isObject2(source)) {
30737
30779
  for (let [key, value] of Object.entries(source)) {
30738
30780
  if (key === "signal" && value instanceof globalThis.AbortSignal) {
30739
30781
  signals.push(value);
30740
30782
  continue;
30741
30783
  }
30742
30784
  if (key === "context") {
30743
- if (value !== void 0 && value !== null && (!isObject(value) || Array.isArray(value))) {
30785
+ if (value !== void 0 && value !== null && (!isObject2(value) || Array.isArray(value))) {
30744
30786
  throw new TypeError("The `context` option must be an object");
30745
30787
  }
30746
30788
  returnValue = {
@@ -30757,16 +30799,16 @@ var deepMerge = (...sources) => {
30757
30799
  }
30758
30800
  continue;
30759
30801
  }
30760
- if (isObject(value) && key in returnValue) {
30802
+ if (isObject2(value) && key in returnValue) {
30761
30803
  value = deepMerge(returnValue[key], value);
30762
30804
  }
30763
30805
  returnValue = { ...returnValue, [key]: value };
30764
30806
  }
30765
- if (isObject(source.hooks)) {
30807
+ if (isObject2(source.hooks)) {
30766
30808
  hooks = mergeHooks(hooks, source.hooks);
30767
30809
  returnValue.hooks = hooks;
30768
30810
  }
30769
- if (isObject(source.headers)) {
30811
+ if (isObject2(source.headers)) {
30770
30812
  headers = mergeHeaders(headers, source.headers);
30771
30813
  returnValue.headers = headers;
30772
30814
  }
@@ -33874,7 +33916,7 @@ ${queuedText}` : queuedText;
33874
33916
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33875
33917
  if (settings.merged.general.devtools) {
33876
33918
  void (async () => {
33877
- const { toggleDevToolsPanel } = await import("./devtoolsService-XNULR5OM.js");
33919
+ const { toggleDevToolsPanel } = await import("./devtoolsService-DDIV43LO.js");
33878
33920
  await toggleDevToolsPanel(
33879
33921
  config,
33880
33922
  showErrorDetails,
@@ -157,10 +157,10 @@ import {
157
157
  widestLineFromStyledChars,
158
158
  wordBreakStyledChars,
159
159
  wrapStyledChars
160
- } from "./chunk-UXD5COS4.js";
160
+ } from "./chunk-YOSR3LGH.js";
161
161
  import {
162
162
  require_source
163
- } from "./chunk-J6DC57TM.js";
163
+ } from "./chunk-3JEIIDY3.js";
164
164
  import {
165
165
  appEvents
166
166
  } from "./chunk-5PS3AYFU.js";
@@ -214,24 +214,24 @@ import {
214
214
  stripAnsi,
215
215
  stripUnsafeCharacters,
216
216
  toCodePoints
217
- } from "./chunk-4SFKECJB.js";
217
+ } from "./chunk-3KVUW3GS.js";
218
218
  import {
219
219
  handleAutoUpdate,
220
220
  isDevelopment,
221
221
  relaunchApp,
222
222
  setUpdateHandler
223
- } from "./chunk-LVOM4PEE.js";
223
+ } from "./chunk-NQ7ACVH7.js";
224
224
  import {
225
225
  isTodoList,
226
226
  mapCoreStatusToDisplayStatus,
227
227
  require_react
228
- } from "./chunk-4C7ON4TD.js";
228
+ } from "./chunk-6VBVRJ2T.js";
229
229
  import {
230
230
  registerCleanup,
231
231
  removeCleanup,
232
232
  runExitCleanup,
233
233
  setupTtyCheck
234
- } from "./chunk-J27NXCYL.js";
234
+ } from "./chunk-5C4IPSFG.js";
235
235
  import {
236
236
  ACTIVATE_SKILL_TOOL_NAME,
237
237
  AGENT_TOOL_NAME,
@@ -437,7 +437,7 @@ import {
437
437
  validatePlanContent,
438
438
  validatePlanPath,
439
439
  writeToStdout
440
- } from "./chunk-A4YWS44A.js";
440
+ } from "./chunk-QY6VB26P.js";
441
441
  import "./chunk-664ZODQF.js";
442
442
  import "./chunk-IUUIT4SU.js";
443
443
  import "./chunk-TUDYL3X4.js";
@@ -15538,6 +15538,7 @@ function ProQuotaDialog({
15538
15538
  message,
15539
15539
  isTerminalQuotaError,
15540
15540
  isModelNotFoundError,
15541
+ isCapacityExceeded,
15541
15542
  authType,
15542
15543
  tierName,
15543
15544
  onChoice
@@ -15556,6 +15557,24 @@ function ProQuotaDialog({
15556
15557
  key: "retry_later"
15557
15558
  }
15558
15559
  ];
15560
+ } else if (isCapacityExceeded) {
15561
+ items = [
15562
+ {
15563
+ label: "Keep trying",
15564
+ value: "retry_once",
15565
+ key: "retry_once"
15566
+ },
15567
+ {
15568
+ label: `Switch to ${fallbackModel}`,
15569
+ value: "retry_always",
15570
+ key: "retry_always"
15571
+ },
15572
+ {
15573
+ label: "Stop",
15574
+ value: "retry_later",
15575
+ key: "retry_later"
15576
+ }
15577
+ ];
15559
15578
  } else if (isModelNotFoundError || isTerminalQuotaError) {
15560
15579
  const isUltra = isUltraTier(tierName);
15561
15580
  items = [
@@ -17694,6 +17713,7 @@ var DialogManager = ({
17694
17713
  message: quotaState.proQuotaRequest.message,
17695
17714
  isTerminalQuotaError: quotaState.proQuotaRequest.isTerminalQuotaError,
17696
17715
  isModelNotFoundError: !!quotaState.proQuotaRequest.isModelNotFoundError,
17716
+ isCapacityExceeded: !!quotaState.proQuotaRequest.isCapacityExceeded,
17697
17717
  authType: quotaState.proQuotaRequest.authType,
17698
17718
  tierName: config?.getUserTierName(),
17699
17719
  onChoice: uiActions.handleProQuotaChoice
@@ -25417,6 +25437,7 @@ async function openG1Url(path14, campaign) {
25417
25437
  }
25418
25438
 
25419
25439
  // packages/cli/src/ui/hooks/useQuotaAndFallback.ts
25440
+ var isObject = (val) => typeof val === "object" && val !== null;
25420
25441
  function useQuotaAndFallback({
25421
25442
  config,
25422
25443
  historyManager,
@@ -25439,6 +25460,16 @@ function useQuotaAndFallback({
25439
25460
  let message;
25440
25461
  let isTerminalQuotaError = false;
25441
25462
  let isModelNotFoundError = false;
25463
+ const errorObj = isObject(error) ? error : null;
25464
+ const errorReasonValue = errorObj?.["reason"];
25465
+ const errorReason = typeof errorReasonValue === "string" ? errorReasonValue : void 0;
25466
+ const errorMessageValue = errorObj?.["message"];
25467
+ const errorMessage = typeof errorMessageValue === "string" ? errorMessageValue : void 0;
25468
+ const isCapacityExceeded = errorReason === "MODEL_CAPACITY_EXHAUSTED" || errorReason === "MODEL_CAPACITY_EXCEEDED" || typeof errorMessage === "string" && /exhausted your capacity|capacity exceeded|MODEL_CAPACITY_EXHAUSTED/i.test(
25469
+ errorMessage
25470
+ ) || typeof error === "string" && /exhausted your capacity|capacity exceeded|MODEL_CAPACITY_EXHAUSTED/i.test(
25471
+ error
25472
+ );
25442
25473
  const usageLimitReachedModel = isProModel(failedModel) ? "all Pro models" : failedModel;
25443
25474
  if (error instanceof TerminalQuotaError) {
25444
25475
  isTerminalQuotaError = true;
@@ -25462,14 +25493,24 @@ function useQuotaAndFallback({
25462
25493
  });
25463
25494
  if (creditsResult) return creditsResult;
25464
25495
  }
25465
- const messageLines = [
25466
- `Usage limit reached for ${usageLimitReachedModel}.`,
25467
- error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25468
- `/stats model for usage details`,
25469
- `/model to switch models.`,
25470
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25471
- ].filter(Boolean);
25472
- message = messageLines.join("\n");
25496
+ if (isCapacityExceeded) {
25497
+ const messageLines = [
25498
+ `We are currently experiencing high demand for ${usageLimitReachedModel}.`,
25499
+ "We apologize and appreciate your patience.",
25500
+ error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25501
+ `/model to switch models.`
25502
+ ].filter(Boolean);
25503
+ message = messageLines.join("\n");
25504
+ } else {
25505
+ const messageLines = [
25506
+ `Usage limit reached for ${usageLimitReachedModel}.`,
25507
+ error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25508
+ `/stats model for usage details`,
25509
+ `/model to switch models.`,
25510
+ contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25511
+ ].filter(Boolean);
25512
+ message = messageLines.join("\n");
25513
+ }
25473
25514
  } else if (error instanceof ModelNotFoundError) {
25474
25515
  isModelNotFoundError = true;
25475
25516
  if (contentGeneratorConfig?.authType === AuthType.USE_VERTEX_AI && VALID_GEMINI_MODELS.has(failedModel)) {
@@ -25502,7 +25543,7 @@ function useQuotaAndFallback({
25502
25543
  ];
25503
25544
  message = messageLines.join("\n");
25504
25545
  }
25505
- if (errorVerbosity === "low" && !isTerminalQuotaError && !isModelNotFoundError) {
25546
+ if (errorVerbosity === "low" && (!isTerminalQuotaError || isCapacityExceeded) && !isModelNotFoundError) {
25506
25547
  return "retry_once";
25507
25548
  }
25508
25549
  setModelSwitchedFromQuotaError(true);
@@ -25520,6 +25561,7 @@ function useQuotaAndFallback({
25520
25561
  message,
25521
25562
  isTerminalQuotaError,
25522
25563
  isModelNotFoundError,
25564
+ isCapacityExceeded,
25523
25565
  authType: contentGeneratorConfig?.authType
25524
25566
  });
25525
25567
  }
@@ -30675,12 +30717,12 @@ var streamRequest = (request, onUploadProgress, originalBody) => {
30675
30717
  };
30676
30718
 
30677
30719
  // node_modules/ky/distribution/utils/is.js
30678
- var isObject = (value) => value !== null && typeof value === "object";
30720
+ var isObject2 = (value) => value !== null && typeof value === "object";
30679
30721
 
30680
30722
  // node_modules/ky/distribution/utils/merge.js
30681
30723
  var validateAndMerge = (...sources) => {
30682
30724
  for (const source of sources) {
30683
- if ((!isObject(source) || Array.isArray(source)) && source !== void 0) {
30725
+ if ((!isObject2(source) || Array.isArray(source)) && source !== void 0) {
30684
30726
  throw new TypeError("The `options` argument must be an object");
30685
30727
  }
30686
30728
  }
@@ -30725,7 +30767,7 @@ var appendSearchParameters = (target, source) => {
30725
30767
  }
30726
30768
  result.append(String(pair[0]), String(pair[1]));
30727
30769
  }
30728
- } else if (isObject(input)) {
30770
+ } else if (isObject2(input)) {
30729
30771
  for (const [key, value] of Object.entries(input)) {
30730
30772
  if (value !== void 0) {
30731
30773
  result.append(key, String(value));
@@ -30752,14 +30794,14 @@ var deepMerge = (...sources) => {
30752
30794
  returnValue = [];
30753
30795
  }
30754
30796
  returnValue = [...returnValue, ...source];
30755
- } else if (isObject(source)) {
30797
+ } else if (isObject2(source)) {
30756
30798
  for (let [key, value] of Object.entries(source)) {
30757
30799
  if (key === "signal" && value instanceof globalThis.AbortSignal) {
30758
30800
  signals.push(value);
30759
30801
  continue;
30760
30802
  }
30761
30803
  if (key === "context") {
30762
- if (value !== void 0 && value !== null && (!isObject(value) || Array.isArray(value))) {
30804
+ if (value !== void 0 && value !== null && (!isObject2(value) || Array.isArray(value))) {
30763
30805
  throw new TypeError("The `context` option must be an object");
30764
30806
  }
30765
30807
  returnValue = {
@@ -30776,16 +30818,16 @@ var deepMerge = (...sources) => {
30776
30818
  }
30777
30819
  continue;
30778
30820
  }
30779
- if (isObject(value) && key in returnValue) {
30821
+ if (isObject2(value) && key in returnValue) {
30780
30822
  value = deepMerge(returnValue[key], value);
30781
30823
  }
30782
30824
  returnValue = { ...returnValue, [key]: value };
30783
30825
  }
30784
- if (isObject(source.hooks)) {
30826
+ if (isObject2(source.hooks)) {
30785
30827
  hooks = mergeHooks(hooks, source.hooks);
30786
30828
  returnValue.hooks = hooks;
30787
30829
  }
30788
- if (isObject(source.headers)) {
30830
+ if (isObject2(source.headers)) {
30789
30831
  headers = mergeHeaders(headers, source.headers);
30790
30832
  returnValue.headers = headers;
30791
30833
  }
@@ -33893,7 +33935,7 @@ ${queuedText}` : queuedText;
33893
33935
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33894
33936
  if (settings.merged.general.devtools) {
33895
33937
  void (async () => {
33896
- const { toggleDevToolsPanel } = await import("./devtoolsService-XP7RODGG.js");
33938
+ const { toggleDevToolsPanel } = await import("./devtoolsService-SFT4J3TP.js");
33897
33939
  await toggleDevToolsPanel(
33898
33940
  config,
33899
33941
  showErrorDetails,
@@ -3,11 +3,11 @@ import {
3
3
  DEFAULT_PORT,
4
4
  getBinaryPath,
5
5
  isServerRunning
6
- } from "./chunk-XWGJPCDB.js";
7
- import "./chunk-2ZWCUTMN.js";
6
+ } from "./chunk-XNQ2USVV.js";
7
+ import "./chunk-ENEDM4X3.js";
8
8
  import {
9
9
  debugLogger
10
- } from "./chunk-HZZM77SO.js";
10
+ } from "./chunk-D7NKQXI3.js";
11
11
  import "./chunk-664ZODQF.js";
12
12
  import "./chunk-IUUIT4SU.js";
13
13
  import "./chunk-TUDYL3X4.js";
@@ -41,7 +41,7 @@ var LiteRtServerManager = class {
41
41
  `[LiteRtServerManager] Auto-starting LiteRT server on port ${port}...`
42
42
  );
43
43
  try {
44
- const { startServer } = await import("./start-EIHA5TWI.js");
44
+ const { startServer } = await import("./start-3M54SR5N.js");
45
45
  const started = await startServer(binaryPath, port);
46
46
  if (started) {
47
47
  debugLogger.log(`[LiteRtServerManager] Server started on port ${port}`);
@@ -3,11 +3,11 @@ import {
3
3
  DEFAULT_PORT,
4
4
  getBinaryPath,
5
5
  isServerRunning
6
- } from "./chunk-SEHUSFSL.js";
7
- import "./chunk-L6Q242KC.js";
6
+ } from "./chunk-DW2J2NTU.js";
7
+ import "./chunk-DIJFIQU5.js";
8
8
  import {
9
9
  debugLogger
10
- } from "./chunk-R3S5PP5S.js";
10
+ } from "./chunk-WWUS7UCO.js";
11
11
  import "./chunk-664ZODQF.js";
12
12
  import "./chunk-IUUIT4SU.js";
13
13
  import "./chunk-TUDYL3X4.js";
@@ -41,7 +41,7 @@ var LiteRtServerManager = class {
41
41
  `[LiteRtServerManager] Auto-starting LiteRT server on port ${port}...`
42
42
  );
43
43
  try {
44
- const { startServer } = await import("./start-ONHNJJG7.js");
44
+ const { startServer } = await import("./start-EEVFRHCK.js");
45
45
  const started = await startServer(binaryPath, port);
46
46
  if (started) {
47
47
  debugLogger.log(`[LiteRtServerManager] Server started on port ${port}`);
@@ -3,11 +3,11 @@ import {
3
3
  DEFAULT_PORT,
4
4
  getBinaryPath,
5
5
  isServerRunning
6
- } from "./chunk-O5GQF2L7.js";
7
- import "./chunk-DBPSBJMI.js";
6
+ } from "./chunk-XLLOEYE5.js";
7
+ import "./chunk-OKM3M2PX.js";
8
8
  import {
9
9
  debugLogger
10
- } from "./chunk-MLTI5CK6.js";
10
+ } from "./chunk-VPMDE76T.js";
11
11
  import "./chunk-664ZODQF.js";
12
12
  import "./chunk-IUUIT4SU.js";
13
13
  import "./chunk-TUDYL3X4.js";
@@ -41,7 +41,7 @@ var LiteRtServerManager = class {
41
41
  `[LiteRtServerManager] Auto-starting LiteRT server on port ${port}...`
42
42
  );
43
43
  try {
44
- const { startServer } = await import("./start-ODF2OV65.js");
44
+ const { startServer } = await import("./start-FC7N6JMG.js");
45
45
  const started = await startServer(binaryPath, port);
46
46
  if (started) {
47
47
  debugLogger.log(`[LiteRtServerManager] Server started on port ${port}`);
@@ -3,11 +3,11 @@ import {
3
3
  DEFAULT_PORT,
4
4
  getBinaryPath,
5
5
  isServerRunning
6
- } from "./chunk-4SFKECJB.js";
7
- import "./chunk-4C7ON4TD.js";
6
+ } from "./chunk-3KVUW3GS.js";
7
+ import "./chunk-6VBVRJ2T.js";
8
8
  import {
9
9
  debugLogger
10
- } from "./chunk-A4YWS44A.js";
10
+ } from "./chunk-QY6VB26P.js";
11
11
  import "./chunk-664ZODQF.js";
12
12
  import "./chunk-IUUIT4SU.js";
13
13
  import "./chunk-TUDYL3X4.js";
@@ -41,7 +41,7 @@ var LiteRtServerManager = class {
41
41
  `[LiteRtServerManager] Auto-starting LiteRT server on port ${port}...`
42
42
  );
43
43
  try {
44
- const { startServer } = await import("./start-TSZCFX4W.js");
44
+ const { startServer } = await import("./start-N5PPVI4S.js");
45
45
  const started = await startServer(binaryPath, port);
46
46
  if (started) {
47
47
  debugLogger.log(`[LiteRtServerManager] Server started on port ${port}`);
@@ -16,7 +16,7 @@ import {
16
16
  openBrowserSecurely,
17
17
  refreshAccessToken,
18
18
  startCallbackServer
19
- } from "./chunk-MLTI5CK6.js";
19
+ } from "./chunk-D7NKQXI3.js";
20
20
  import "./chunk-664ZODQF.js";
21
21
  import "./chunk-IUUIT4SU.js";
22
22
  import "./chunk-TUDYL3X4.js";
@@ -16,7 +16,7 @@ import {
16
16
  openBrowserSecurely,
17
17
  refreshAccessToken,
18
18
  startCallbackServer
19
- } from "./chunk-R3S5PP5S.js";
19
+ } from "./chunk-WWUS7UCO.js";
20
20
  import "./chunk-664ZODQF.js";
21
21
  import "./chunk-IUUIT4SU.js";
22
22
  import "./chunk-TUDYL3X4.js";
@@ -16,7 +16,7 @@ import {
16
16
  openBrowserSecurely,
17
17
  refreshAccessToken,
18
18
  startCallbackServer
19
- } from "./chunk-HZZM77SO.js";
19
+ } from "./chunk-VPMDE76T.js";
20
20
  import "./chunk-664ZODQF.js";
21
21
  import "./chunk-IUUIT4SU.js";
22
22
  import "./chunk-TUDYL3X4.js";
@@ -16,7 +16,7 @@ import {
16
16
  openBrowserSecurely,
17
17
  refreshAccessToken,
18
18
  startCallbackServer
19
- } from "./chunk-A4YWS44A.js";
19
+ } from "./chunk-QY6VB26P.js";
20
20
  import "./chunk-664ZODQF.js";
21
21
  import "./chunk-IUUIT4SU.js";
22
22
  import "./chunk-TUDYL3X4.js";
@@ -2,12 +2,12 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  startCommand,
4
4
  startServer
5
- } from "./chunk-PTZIAOG5.js";
6
- import "./chunk-CYJHOZAD.js";
7
- import "./chunk-XWGJPCDB.js";
8
- import "./chunk-2ZWCUTMN.js";
9
- import "./chunk-S3XRZJYO.js";
10
- import "./chunk-HZZM77SO.js";
5
+ } from "./chunk-V6HSKTFR.js";
6
+ import "./chunk-2YAEBNH4.js";
7
+ import "./chunk-XNQ2USVV.js";
8
+ import "./chunk-ENEDM4X3.js";
9
+ import "./chunk-MOTK2J3L.js";
10
+ import "./chunk-D7NKQXI3.js";
11
11
  import "./chunk-664ZODQF.js";
12
12
  import "./chunk-IUUIT4SU.js";
13
13
  import "./chunk-TUDYL3X4.js";
@@ -2,12 +2,12 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  startCommand,
4
4
  startServer
5
- } from "./chunk-DSCF5EA6.js";
6
- import "./chunk-57ZLFNIU.js";
7
- import "./chunk-O5GQF2L7.js";
8
- import "./chunk-DBPSBJMI.js";
9
- import "./chunk-7IYUUE2H.js";
10
- import "./chunk-MLTI5CK6.js";
5
+ } from "./chunk-IKOQM4YN.js";
6
+ import "./chunk-CF6HJK4T.js";
7
+ import "./chunk-DW2J2NTU.js";
8
+ import "./chunk-DIJFIQU5.js";
9
+ import "./chunk-FQNLDGXL.js";
10
+ import "./chunk-WWUS7UCO.js";
11
11
  import "./chunk-664ZODQF.js";
12
12
  import "./chunk-IUUIT4SU.js";
13
13
  import "./chunk-TUDYL3X4.js";
@@ -2,12 +2,12 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  startCommand,
4
4
  startServer
5
- } from "./chunk-IHR5TZ6N.js";
6
- import "./chunk-3OPKUUXP.js";
7
- import "./chunk-SEHUSFSL.js";
8
- import "./chunk-L6Q242KC.js";
9
- import "./chunk-CBX65YIB.js";
10
- import "./chunk-R3S5PP5S.js";
5
+ } from "./chunk-7U5FKJMS.js";
6
+ import "./chunk-2K3N3YWJ.js";
7
+ import "./chunk-XLLOEYE5.js";
8
+ import "./chunk-OKM3M2PX.js";
9
+ import "./chunk-4PVLKN7E.js";
10
+ import "./chunk-VPMDE76T.js";
11
11
  import "./chunk-664ZODQF.js";
12
12
  import "./chunk-IUUIT4SU.js";
13
13
  import "./chunk-TUDYL3X4.js";