@google/gemini-cli-a2a-server 0.45.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.
@@ -130327,18 +130327,23 @@ var init_types8 = __esm({
130327
130327
  });
130328
130328
 
130329
130329
  // packages/core/dist/src/config/models.js
130330
- function getAutoModelDescription(hasAccessToPreview, useGemini3_1 = false) {
130330
+ function setFlashModels(preview, defaultFlash) {
130331
+ PREVIEW_GEMINI_FLASH_MODEL = preview;
130332
+ DEFAULT_GEMINI_FLASH_MODEL = defaultFlash;
130333
+ }
130334
+ function getAutoModelDescription(hasAccessToPreview, useGemini3_1 = false, useGemini3_5Flash = false) {
130331
130335
  const proModel = hasAccessToPreview ? useGemini3_1 ? PREVIEW_GEMINI_3_1_MODEL : PREVIEW_GEMINI_MODEL : DEFAULT_GEMINI_MODEL;
130332
- const flashModel = hasAccessToPreview ? PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
130333
- return `Let Gemini CLI decide the best model for the task: ${proModel}, ${flashModel}`;
130336
+ const flashModel = hasAccessToPreview ? useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
130337
+ return `Let Gemini CLI decide the best model for the task: ${getDisplayString(proModel)}, ${getDisplayString(flashModel)}`;
130334
130338
  }
130335
- function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config3) {
130339
+ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config3, useGemini3_5Flash = false) {
130336
130340
  const normalizedModel = Array.isArray(requestedModel) ? String(requestedModel.at(-1) ?? "").trim() || "" : typeof requestedModel !== "string" ? String(requestedModel ?? "").trim() || "" : requestedModel.trim() || "";
130337
130341
  if (config3?.getExperimentalDynamicModelConfiguration?.() === true) {
130338
130342
  const resolved2 = config3.modelConfigService.resolveModelId(normalizedModel, {
130339
130343
  useGemini3_1,
130340
130344
  useCustomTools: useCustomToolModel,
130341
- hasAccessToPreview
130345
+ hasAccessToPreview,
130346
+ useGemini3_5Flash
130342
130347
  });
130343
130348
  if (!hasAccessToPreview && isPreviewModel(resolved2, config3)) {
130344
130349
  if (resolved2.includes("flash-lite")) {
@@ -130374,7 +130379,7 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
130374
130379
  break;
130375
130380
  }
130376
130381
  case GEMINI_MODEL_ALIAS_FLASH: {
130377
- resolved = PREVIEW_GEMINI_FLASH_MODEL;
130382
+ resolved = useGemini3_5Flash ? DEFAULT_GEMINI_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL;
130378
130383
  break;
130379
130384
  }
130380
130385
  case GEMINI_MODEL_ALIAS_FLASH_LITE: {
@@ -130389,6 +130394,9 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
130389
130394
  if (resolved === "none") {
130390
130395
  return DEFAULT_GEMINI_FLASH_LITE_MODEL;
130391
130396
  }
130397
+ if (useGemini3_5Flash && isFlashModel(resolved) && normalizedModel !== PREVIEW_GEMINI_FLASH_MODEL) {
130398
+ return DEFAULT_GEMINI_FLASH_MODEL;
130399
+ }
130392
130400
  if (!hasAccessToPreview && isPreviewModel(resolved)) {
130393
130401
  switch (resolved) {
130394
130402
  case PREVIEW_GEMINI_FLASH_MODEL:
@@ -130409,12 +130417,16 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
130409
130417
  }
130410
130418
  return resolved;
130411
130419
  }
130412
- function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config3) {
130420
+ function isFlashModel(model) {
130421
+ 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");
130422
+ }
130423
+ function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config3, useGemini3_5Flash = false) {
130413
130424
  if (config3?.getExperimentalDynamicModelConfiguration?.() === true) {
130414
130425
  return config3.modelConfigService.resolveClassifierModelId(modelAlias, requestedModel, {
130415
130426
  useGemini3_1,
130416
130427
  useCustomTools: useCustomToolModel,
130417
- hasAccessToPreview
130428
+ hasAccessToPreview,
130429
+ useGemini3_5Flash
130418
130430
  });
130419
130431
  }
130420
130432
  if (modelAlias === GEMINI_MODEL_ALIAS_FLASH) {
@@ -130422,11 +130434,14 @@ function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false
130422
130434
  return DEFAULT_GEMINI_FLASH_MODEL;
130423
130435
  }
130424
130436
  if (requestedModel === PREVIEW_GEMINI_MODEL_AUTO || requestedModel === PREVIEW_GEMINI_MODEL || requestedModel === GEMINI_MODEL_ALIAS_AUTO) {
130437
+ if (useGemini3_5Flash) {
130438
+ return DEFAULT_GEMINI_FLASH_MODEL;
130439
+ }
130425
130440
  return hasAccessToPreview ? PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
130426
130441
  }
130427
- return resolveModel(GEMINI_MODEL_ALIAS_FLASH, false, false, hasAccessToPreview);
130442
+ return resolveModel(GEMINI_MODEL_ALIAS_FLASH, false, false, hasAccessToPreview, config3, useGemini3_5Flash);
130428
130443
  }
130429
- return resolveModel(requestedModel, useGemini3_1, useCustomToolModel, hasAccessToPreview, config3);
130444
+ return resolveModel(requestedModel, useGemini3_1, useCustomToolModel, hasAccessToPreview, config3, useGemini3_5Flash);
130430
130445
  }
130431
130446
  function getDisplayString(model, config3) {
130432
130447
  if (config3?.getExperimentalDynamicModelConfiguration?.() === true) {
@@ -130436,6 +130451,8 @@ function getDisplayString(model, config3) {
130436
130451
  }
130437
130452
  }
130438
130453
  switch (model) {
130454
+ case "gemini-3-flash":
130455
+ return DEFAULT_GEMINI_3_5_FLASH_MODEL;
130439
130456
  case GEMINI_MODEL_ALIAS_AUTO:
130440
130457
  return "Auto";
130441
130458
  case PREVIEW_GEMINI_MODEL_AUTO:
@@ -130509,7 +130526,7 @@ function supportsMultimodalFunctionResponse(model, config3) {
130509
130526
  }
130510
130527
  return model.startsWith("gemini-3-");
130511
130528
  }
130512
- var PREVIEW_GEMINI_MODEL, PREVIEW_GEMINI_3_1_MODEL, PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL, PREVIEW_GEMINI_FLASH_MODEL, DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_FLASH_MODEL, DEFAULT_GEMINI_FLASH_LITE_MODEL, PREVIEW_GEMINI_FLASH_LITE_MODEL, GEMMA_4_31B_IT_MODEL, GEMMA_4_26B_A4B_IT_MODEL, PREVIEW_GEMINI_MODEL_AUTO, DEFAULT_GEMINI_MODEL_AUTO, GEMINI_MODEL_ALIAS_AUTO, GEMINI_MODEL_ALIAS_PRO, GEMINI_MODEL_ALIAS_FLASH, GEMINI_MODEL_ALIAS_FLASH_LITE, DEFAULT_GEMINI_EMBEDDING_MODEL, DEFAULT_THINKING_MODE;
130529
+ var PREVIEW_GEMINI_MODEL, PREVIEW_GEMINI_3_1_MODEL, PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL, PREVIEW_GEMINI_FLASH_MODEL, DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_FLASH_MODEL, DEFAULT_GEMINI_3_5_FLASH_MODEL, SECONDARY_GEMINI_3_5_FLASH_MODEL, DEFAULT_GEMINI_FLASH_LITE_MODEL, PREVIEW_GEMINI_FLASH_LITE_MODEL, GEMMA_4_31B_IT_MODEL, GEMMA_4_26B_A4B_IT_MODEL, PREVIEW_GEMINI_MODEL_AUTO, DEFAULT_GEMINI_MODEL_AUTO, GEMINI_MODEL_ALIAS_AUTO, GEMINI_MODEL_ALIAS_PRO, GEMINI_MODEL_ALIAS_FLASH, GEMINI_MODEL_ALIAS_FLASH_LITE, DEFAULT_GEMINI_EMBEDDING_MODEL, DEFAULT_THINKING_MODE;
130513
130530
  var init_models = __esm({
130514
130531
  "packages/core/dist/src/config/models.js"() {
130515
130532
  "use strict";
@@ -130519,6 +130536,8 @@ var init_models = __esm({
130519
130536
  PREVIEW_GEMINI_FLASH_MODEL = "gemini-3-flash-preview";
130520
130537
  DEFAULT_GEMINI_MODEL = "gemini-2.5-pro";
130521
130538
  DEFAULT_GEMINI_FLASH_MODEL = "gemini-2.5-flash";
130539
+ DEFAULT_GEMINI_3_5_FLASH_MODEL = "gemini-3.5-flash";
130540
+ SECONDARY_GEMINI_3_5_FLASH_MODEL = "gemini-3-flash";
130522
130541
  DEFAULT_GEMINI_FLASH_LITE_MODEL = "gemini-3.1-flash-lite";
130523
130542
  PREVIEW_GEMINI_FLASH_LITE_MODEL = "none";
130524
130543
  GEMMA_4_31B_IT_MODEL = "gemma-4-31b-it";
@@ -211638,8 +211657,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
211638
211657
  var init_git_commit = __esm({
211639
211658
  "packages/core/dist/src/generated/git-commit.js"() {
211640
211659
  "use strict";
211641
- GIT_COMMIT_INFO = "8acfe0c4a";
211642
- CLI_VERSION = "0.45.0";
211660
+ GIT_COMMIT_INFO = "700c96118";
211661
+ CLI_VERSION = "0.46.0-preview.1";
211643
211662
  }
211644
211663
  });
211645
211664
 
@@ -332664,7 +332683,7 @@ function getVersion() {
332664
332683
  }
332665
332684
  versionPromise = (async () => {
332666
332685
  const pkgJson = await getPackageJson(__dirname4);
332667
- return "0.45.0";
332686
+ return "0.46.0-preview.1";
332668
332687
  })();
332669
332688
  return versionPromise;
332670
332689
  }
@@ -333503,7 +333522,7 @@ var init_errorClassification = __esm({
333503
333522
  function getModelPolicyChain(options) {
333504
333523
  const isAuto = options.isAutoSelection ?? false;
333505
333524
  if (options.previewEnabled) {
333506
- const proModel = resolveModel(PREVIEW_GEMINI_MODEL, options.useGemini31, options.useCustomToolModel);
333525
+ const proModel = resolveModel(PREVIEW_GEMINI_MODEL, options.useGemini31, options.useCustomToolModel, true, void 0, options.useGemini3_5Flash);
333507
333526
  return [
333508
333527
  definePolicy({
333509
333528
  model: proModel,
@@ -333631,15 +333650,17 @@ function resolvePolicyChain(config3, preferredModel, wrapsAround = false) {
333631
333650
  const useGemini31 = config3.getGemini31LaunchedSync?.() ?? false;
333632
333651
  const useCustomToolModel = config3.getUseCustomToolModelSync?.() ?? false;
333633
333652
  const hasAccessToPreview = config3.getHasAccessToPreviewModel?.() ?? false;
333653
+ const useGemini3_5Flash = config3.hasGemini35FlashGAAccess?.() ?? false;
333634
333654
  const isOriginallyGemini3 = isGemini3Model(modelFromConfig, config3);
333635
- const resolvedModel = normalizeModelId(resolveModel(modelFromConfig, useGemini31, useCustomToolModel, hasAccessToPreview, config3));
333655
+ const resolvedModel = normalizeModelId(resolveModel(modelFromConfig, useGemini31, useCustomToolModel, hasAccessToPreview, config3, useGemini3_5Flash));
333636
333656
  const isAutoPreferred = normalizedPreferredModel ? isAutoModel(normalizedPreferredModel, config3) : false;
333637
333657
  const isAutoConfigured = isAutoModel(configuredModel, config3);
333638
333658
  const effectiveWrapsAround = wrapsAround || isAutoPreferred || isAutoConfigured || isOriginallyGemini3;
333639
333659
  if (config3.getExperimentalDynamicModelConfiguration?.() === true) {
333640
333660
  const context2 = {
333641
333661
  useGemini3_1: useGemini31,
333642
- useCustomTools: useCustomToolModel
333662
+ useCustomTools: useCustomToolModel,
333663
+ useGemini3_5Flash
333643
333664
  };
333644
333665
  if (resolvedModel === DEFAULT_GEMINI_FLASH_LITE_MODEL) {
333645
333666
  chain2 = config3.modelConfigService.resolveChain("lite", context2);
@@ -333671,7 +333692,8 @@ function resolvePolicyChain(config3, preferredModel, wrapsAround = false) {
333671
333692
  isAutoSelection,
333672
333693
  userTier: config3.getUserTier(),
333673
333694
  useGemini31,
333674
- useCustomToolModel
333695
+ useCustomToolModel,
333696
+ useGemini3_5Flash
333675
333697
  });
333676
333698
  } else {
333677
333699
  chain2 = getModelPolicyChain({
@@ -333679,7 +333701,8 @@ function resolvePolicyChain(config3, preferredModel, wrapsAround = false) {
333679
333701
  isAutoSelection,
333680
333702
  userTier: config3.getUserTier(),
333681
333703
  useGemini31,
333682
- useCustomToolModel
333704
+ useCustomToolModel,
333705
+ useGemini3_5Flash
333683
333706
  });
333684
333707
  }
333685
333708
  } else {
@@ -337747,7 +337770,7 @@ async function createContentGenerator(config3, gcConfig, sessionId) {
337747
337770
  return new LoggingContentGenerator(fakeGenerator, gcConfig);
337748
337771
  }
337749
337772
  const version4 = await getVersion();
337750
- const model = resolveModel(gcConfig.getModel(), config3.authType === AuthType2.USE_GEMINI || config3.authType === AuthType2.USE_VERTEX_AI || (await gcConfig.getGemini31Launched?.() ?? false), false, gcConfig.getHasAccessToPreviewModel?.() ?? true, gcConfig);
337773
+ const model = resolveModel(gcConfig.getModel(), config3.authType === AuthType2.USE_GEMINI || config3.authType === AuthType2.USE_VERTEX_AI || (await gcConfig.getGemini31Launched?.() ?? false), false, gcConfig.getHasAccessToPreviewModel?.() ?? true, gcConfig, gcConfig.hasGemini35FlashGAAccess?.() ?? false);
337751
337774
  const customHeadersEnv = process.env["GEMINI_CLI_CUSTOM_HEADERS"] || void 0;
337752
337775
  const clientName = gcConfig.getClientName();
337753
337776
  const surface = determineSurface2();
@@ -354920,16 +354943,18 @@ ${result2.output}`;
354920
354943
  }
354921
354944
  signal.removeEventListener("abort", onAbort);
354922
354945
  timeoutController.signal.removeEventListener("abort", onAbort);
354923
- if (tempFilePath) {
354924
- try {
354925
- await fsPromises9.unlink(tempFilePath);
354926
- } catch {
354946
+ if (!this.params.is_background) {
354947
+ if (tempFilePath) {
354948
+ try {
354949
+ await fsPromises9.unlink(tempFilePath);
354950
+ } catch {
354951
+ }
354927
354952
  }
354928
- }
354929
- if (tempDir) {
354930
- try {
354931
- await fsPromises9.rm(tempDir, { recursive: true, force: true });
354932
- } catch {
354953
+ if (tempDir) {
354954
+ try {
354955
+ await fsPromises9.rm(tempDir, { recursive: true, force: true });
354956
+ } catch {
354957
+ }
354933
354958
  }
354934
354959
  }
354935
354960
  }
@@ -362255,9 +362280,9 @@ var init_geminiChat = __esm({
362255
362280
  const apiCall = async () => {
362256
362281
  const useGemini3_1 = await this.context.config.getGemini31Launched?.() ?? false;
362257
362282
  const hasAccessToPreview = this.context.config.getHasAccessToPreviewModel?.() ?? true;
362258
- let modelToUse = resolveModel(lastModelToUse, useGemini3_1, false, hasAccessToPreview, this.context.config);
362283
+ let modelToUse = resolveModel(lastModelToUse, useGemini3_1, false, hasAccessToPreview, this.context.config, this.context.config.hasGemini35FlashGAAccess?.() ?? false);
362259
362284
  if (this.context.config.getActiveModel() !== initialActiveModel) {
362260
- modelToUse = resolveModel(this.context.config.getActiveModel(), useGemini3_1, false, hasAccessToPreview, this.context.config);
362285
+ modelToUse = resolveModel(this.context.config.getActiveModel(), useGemini3_1, false, hasAccessToPreview, this.context.config, this.context.config.hasGemini35FlashGAAccess?.() ?? false);
362261
362286
  }
362262
362287
  if (modelToUse !== lastModelToUse) {
362263
362288
  const { generateContentConfig: newConfig } = this.context.config.modelConfigService.getResolvedConfig({
@@ -362296,7 +362321,7 @@ var init_geminiChat = __esm({
362296
362321
  throw new AgentExecutionBlockedError(beforeModelResult.reason || "Model call blocked by hook", syntheticResponse);
362297
362322
  }
362298
362323
  if (beforeModelResult.modifiedModel) {
362299
- modelToUse = resolveModel(beforeModelResult.modifiedModel, useGemini3_1, false, hasAccessToPreview, this.context.config);
362324
+ modelToUse = resolveModel(beforeModelResult.modifiedModel, useGemini3_1, false, hasAccessToPreview, this.context.config, this.context.config.hasGemini35FlashGAAccess?.() ?? false);
362300
362325
  lastModelToUse = modelToUse;
362301
362326
  contentsToUse = supportsModernFeatures(modelToUse) ? [...contentsForPreviewModel] : [...requestContents];
362302
362327
  }
@@ -364694,7 +364719,7 @@ var init_promptProvider = __esm({
364694
364719
  const isTopicUpdateNarrationEnabled = topicUpdateNarrationOverride ?? context2.config.isTopicUpdateNarrationEnabled();
364695
364720
  const enabledToolNames = new Set(toolNames);
364696
364721
  const approvedPlanPath = context2.config.getApprovedPlanPath();
364697
- const desiredModel = resolveModel(context2.config.getActiveModel(), context2.config.getGemini31LaunchedSync?.() ?? false, false, context2.config.getHasAccessToPreviewModel?.() ?? true, context2.config);
364722
+ const desiredModel = resolveModel(context2.config.getActiveModel(), context2.config.getGemini31LaunchedSync?.() ?? false, false, context2.config.getHasAccessToPreviewModel?.() ?? true, context2.config, context2.config.hasGemini35FlashGAAccess?.() ?? false);
364698
364723
  const isModernModel = supportsModernFeatures(desiredModel);
364699
364724
  const activeSnippets = isModernModel ? snippets_exports : snippets_legacy_exports;
364700
364725
  const contextFilenames = getAllGeminiMdFilenames();
@@ -364812,7 +364837,7 @@ var init_promptProvider = __esm({
364812
364837
  return sanitizedPrompt;
364813
364838
  }
364814
364839
  getCompressionPrompt(context2) {
364815
- const desiredModel = resolveModel(context2.config.getActiveModel(), context2.config.getGemini31LaunchedSync?.() ?? false, false, context2.config.getHasAccessToPreviewModel?.() ?? true, context2.config);
364840
+ const desiredModel = resolveModel(context2.config.getActiveModel(), context2.config.getGemini31LaunchedSync?.() ?? false, false, context2.config.getHasAccessToPreviewModel?.() ?? true, context2.config, context2.config.hasGemini35FlashGAAccess?.() ?? false);
364816
364841
  const isModernModel = supportsModernFeatures(desiredModel);
364817
364842
  const activeSnippets = isModernModel ? snippets_exports : snippets_legacy_exports;
364818
364843
  return activeSnippets.getCompressionPrompt(context2.config.getApprovedPlanPath());
@@ -374163,6 +374188,7 @@ var init_modelConfigService = __esm({
374163
374188
  const definitions = this.config.modelDefinitions ?? {};
374164
374189
  const shouldShowPreviewModels = context2.hasAccessToPreview ?? false;
374165
374190
  const useGemini31 = context2.useGemini3_1 ?? false;
374191
+ const useGemini3_5Flash = context2.useGemini3_5Flash ?? false;
374166
374192
  const mainOptions = Object.entries(definitions).filter(([_3, m3]) => {
374167
374193
  if (m3.isVisible !== true)
374168
374194
  return false;
@@ -374174,7 +374200,7 @@ var init_modelConfigService = __esm({
374174
374200
  }).map(([id, m3]) => {
374175
374201
  let description = m3.dialogDescription ?? "";
374176
374202
  if (id === "auto") {
374177
- description = getAutoModelDescription(shouldShowPreviewModels, useGemini31);
374203
+ description = getAutoModelDescription(shouldShowPreviewModels, useGemini31, useGemini3_5Flash);
374178
374204
  } else if (id === "auto-gemini-3" && useGemini31) {
374179
374205
  description = description.replace("gemini-3-pro", "gemini-3.1-pro");
374180
374206
  }
@@ -374244,6 +374270,8 @@ var init_modelConfigService = __esm({
374244
374270
  return value === context2.useGemini3_1;
374245
374271
  case "useGemini3_1FlashLite":
374246
374272
  return value === context2.useGemini3_1FlashLite;
374273
+ case "useGemini3_5Flash":
374274
+ return value === context2.useGemini3_5Flash;
374247
374275
  case "useCustomTools":
374248
374276
  return value === context2.useCustomTools;
374249
374277
  case "hasAccessToPreview":
@@ -380801,7 +380829,7 @@ var init_client4 = __esm({
380801
380829
  if (this.currentSequenceModel) {
380802
380830
  return this.currentSequenceModel;
380803
380831
  }
380804
- return resolveModel(this.config.getActiveModel(), this.config.getGemini31LaunchedSync?.() ?? false, false, this.config.getHasAccessToPreviewModel?.() ?? true, this.config);
380832
+ return resolveModel(this.config.getActiveModel(), this.config.getGemini31LaunchedSync?.() ?? false, false, this.config.getHasAccessToPreviewModel?.() ?? true, this.config, this.config.hasGemini35FlashGAAccess?.() ?? false);
380805
380833
  }
380806
380834
  async *processTurn(request, signal, prompt_id, boundedTurns, displayContent) {
380807
380835
  let turn = new Turn(this.getChat(), prompt_id);
@@ -394703,7 +394731,8 @@ ${formattedHistory}
394703
394731
  config3.getUseCustomToolModel(),
394704
394732
  config3.getHasAccessToPreviewModel()
394705
394733
  ]);
394706
- const selectedModel = resolveClassifierModel(context2.requestedModel ?? config3.getModel(), routerResponse.model_choice, useGemini3_1, useCustomToolModel, hasAccessToPreview, config3);
394734
+ const useGemini3_5Flash = config3.hasGemini35FlashGAAccess?.() ?? false;
394735
+ const selectedModel = resolveClassifierModel(context2.requestedModel ?? config3.getModel(), routerResponse.model_choice, useGemini3_1, useCustomToolModel, hasAccessToPreview, config3, useGemini3_5Flash);
394707
394736
  return {
394708
394737
  model: selectedModel,
394709
394738
  metadata: {
@@ -394730,7 +394759,7 @@ var init_defaultStrategy = __esm({
394730
394759
  DefaultStrategy = class {
394731
394760
  name = "default";
394732
394761
  async route(_context, config3, _baseLlmClient, _localLiteRtLmClient) {
394733
- const defaultModel = resolveModel(config3.getModel(), config3.getGemini31LaunchedSync?.() ?? false, false, config3.getHasAccessToPreviewModel?.() ?? true, config3);
394762
+ const defaultModel = resolveModel(config3.getModel(), config3.getGemini31LaunchedSync?.() ?? false, false, config3.getHasAccessToPreviewModel?.() ?? true, config3, config3.hasGemini35FlashGAAccess?.() ?? false);
394734
394763
  return {
394735
394764
  model: defaultModel,
394736
394765
  metadata: {
@@ -394885,7 +394914,8 @@ Respond *only* in JSON format according to the following schema. Do not include
394885
394914
  config3.getGemini31Launched(),
394886
394915
  config3.getUseCustomToolModel()
394887
394916
  ]);
394888
- const selectedModel = normalizeModelId(resolveClassifierModel(normalizeModelId(model), routerResponse.model_choice, useGemini3_1, useCustomToolModel, config3.getHasAccessToPreviewModel?.() ?? true, config3));
394917
+ const useGemini3_5Flash = config3.hasGemini35FlashGAAccess?.() ?? false;
394918
+ const selectedModel = normalizeModelId(resolveClassifierModel(normalizeModelId(model), routerResponse.model_choice, useGemini3_1, useCustomToolModel, config3.getHasAccessToPreviewModel?.() ?? true, config3, useGemini3_5Flash));
394889
394919
  const service = config3.getModelAvailabilityService();
394890
394920
  const snapshot = service.snapshot(selectedModel);
394891
394921
  if (!snapshot.available) {
@@ -395042,7 +395072,8 @@ Model: {"complexity_reasoning": "High-level architecture and strategic planning.
395042
395072
  config3.getGemini31Launched(),
395043
395073
  config3.getUseCustomToolModel()
395044
395074
  ]);
395045
- const selectedModel = normalizeModelId(resolveClassifierModel(normalizeModelId(model), modelAlias, useGemini3_1, useCustomToolModel, config3.getHasAccessToPreviewModel?.() ?? true, config3));
395075
+ const useGemini3_5Flash = config3.hasGemini35FlashGAAccess?.() ?? false;
395076
+ const selectedModel = normalizeModelId(resolveClassifierModel(normalizeModelId(model), modelAlias, useGemini3_1, useCustomToolModel, config3.getHasAccessToPreviewModel?.() ?? true, config3, useGemini3_5Flash));
395046
395077
  const service = config3.getModelAvailabilityService();
395047
395078
  const snapshot = service.snapshot(selectedModel);
395048
395079
  if (!snapshot.available) {
@@ -395152,7 +395183,7 @@ var init_fallbackStrategy = __esm({
395152
395183
  name = "fallback";
395153
395184
  async route(context2, config3, _baseLlmClient, _localLiteRtLmClient) {
395154
395185
  const requestedModel = context2.requestedModel ?? config3.getModel();
395155
- const resolvedModel = resolveModel(requestedModel, config3.getGemini31LaunchedSync?.() ?? false, false, config3.getHasAccessToPreviewModel?.() ?? true, config3);
395186
+ const resolvedModel = resolveModel(requestedModel, config3.getGemini31LaunchedSync?.() ?? false, false, config3.getHasAccessToPreviewModel?.() ?? true, config3, config3.hasGemini35FlashGAAccess?.() ?? false);
395156
395187
  const service = config3.getModelAvailabilityService();
395157
395188
  const snapshot = service.snapshot(resolvedModel);
395158
395189
  if (snapshot.available) {
@@ -395189,7 +395220,7 @@ var init_overrideStrategy = __esm({
395189
395220
  return null;
395190
395221
  }
395191
395222
  return {
395192
- model: resolveModel(overrideModel, config3.getGemini31LaunchedSync?.() ?? false, false, config3.getHasAccessToPreviewModel?.() ?? true, config3),
395223
+ model: resolveModel(overrideModel, config3.getGemini31LaunchedSync?.() ?? false, false, config3.getHasAccessToPreviewModel?.() ?? true, config3, config3.hasGemini35FlashGAAccess?.() ?? false),
395193
395224
  metadata: {
395194
395225
  source: this.name,
395195
395226
  latencyMs: 0,
@@ -395226,8 +395257,9 @@ var init_approvalModeStrategy = __esm({
395226
395257
  config3.getUseCustomToolModel(),
395227
395258
  config3.getHasAccessToPreviewModel()
395228
395259
  ]);
395260
+ const useGemini3_5Flash = config3.hasGemini35FlashGAAccess?.() ?? false;
395229
395261
  if (approvalMode === ApprovalMode.PLAN) {
395230
- const proModel = resolveClassifierModel(model, GEMINI_MODEL_ALIAS_PRO, useGemini3_1, useCustomToolModel, hasAccessToPreview, config3);
395262
+ const proModel = resolveClassifierModel(model, GEMINI_MODEL_ALIAS_PRO, useGemini3_1, useCustomToolModel, hasAccessToPreview, config3, useGemini3_5Flash);
395231
395263
  return {
395232
395264
  model: proModel,
395233
395265
  metadata: {
@@ -395237,7 +395269,7 @@ var init_approvalModeStrategy = __esm({
395237
395269
  }
395238
395270
  };
395239
395271
  } else if (approvedPlanPath) {
395240
- const flashModel = resolveClassifierModel(model, GEMINI_MODEL_ALIAS_FLASH, useGemini3_1, useCustomToolModel, hasAccessToPreview, config3);
395272
+ const flashModel = resolveClassifierModel(model, GEMINI_MODEL_ALIAS_FLASH, useGemini3_1, useCustomToolModel, hasAccessToPreview, config3, useGemini3_5Flash);
395241
395273
  return {
395242
395274
  model: flashModel,
395243
395275
  metadata: {
@@ -395463,6 +395495,12 @@ var init_defaultModelConfigs = __esm({
395463
395495
  model: "gemini-3.1-flash-lite"
395464
395496
  }
395465
395497
  },
395498
+ "gemini-3.5-flash": {
395499
+ extends: "chat-base-3",
395500
+ modelConfig: {
395501
+ model: "gemini-3.5-flash"
395502
+ }
395503
+ },
395466
395504
  "gemma-4-31b-it": {
395467
395505
  extends: "chat-base-3",
395468
395506
  modelConfig: {
@@ -395488,6 +395526,12 @@ var init_defaultModelConfigs = __esm({
395488
395526
  model: "gemini-3-flash-preview"
395489
395527
  }
395490
395528
  },
395529
+ "gemini-3.5-flash-base": {
395530
+ extends: "base",
395531
+ modelConfig: {
395532
+ model: "gemini-3.5-flash"
395533
+ }
395534
+ },
395491
395535
  classifier: {
395492
395536
  extends: "base",
395493
395537
  modelConfig: {
@@ -395695,6 +395739,13 @@ var init_defaultModelConfigs = __esm({
395695
395739
  isVisible: true,
395696
395740
  features: { thinking: false, multimodalToolUse: true }
395697
395741
  },
395742
+ "gemini-3.5-flash": {
395743
+ tier: "flash",
395744
+ family: "gemini-3",
395745
+ isPreview: false,
395746
+ isVisible: true,
395747
+ features: { thinking: false, multimodalToolUse: true }
395748
+ },
395698
395749
  "gemini-2.5-pro": {
395699
395750
  tier: "pro",
395700
395751
  family: "gemini-2.5",
@@ -395798,11 +395849,34 @@ var init_defaultModelConfigs = __esm({
395798
395849
  default: "gemini-3-flash-preview",
395799
395850
  contexts: [
395800
395851
  {
395801
- condition: { hasAccessToPreview: false },
395852
+ condition: { hasAccessToPreview: false, useGemini3_5Flash: true },
395853
+ target: "gemini-3.5-flash"
395854
+ },
395855
+ {
395856
+ condition: { hasAccessToPreview: false, useGemini3_5Flash: false },
395802
395857
  target: "gemini-2.5-flash"
395803
395858
  }
395804
395859
  ]
395805
395860
  },
395861
+ "gemini-3.5-flash": {
395862
+ default: "gemini-3.5-flash",
395863
+ contexts: [
395864
+ {
395865
+ condition: { useGemini3_5Flash: false, hasAccessToPreview: false },
395866
+ target: "gemini-2.5-flash"
395867
+ },
395868
+ {
395869
+ condition: { useGemini3_5Flash: false },
395870
+ target: "gemini-3-flash-preview"
395871
+ }
395872
+ ]
395873
+ },
395874
+ "gemini-2.5-flash": {
395875
+ default: "gemini-2.5-flash",
395876
+ contexts: [
395877
+ { condition: { useGemini3_5Flash: true }, target: "gemini-3.5-flash" }
395878
+ ]
395879
+ },
395806
395880
  "gemini-3-pro-preview": {
395807
395881
  default: "gemini-3-pro-preview",
395808
395882
  contexts: [
@@ -395851,6 +395925,7 @@ var init_defaultModelConfigs = __esm({
395851
395925
  flash: {
395852
395926
  default: "gemini-3-flash-preview",
395853
395927
  contexts: [
395928
+ { condition: { useGemini3_5Flash: true }, target: "gemini-3.5-flash" },
395854
395929
  {
395855
395930
  condition: { hasAccessToPreview: false },
395856
395931
  target: "gemini-2.5-flash"
@@ -395882,6 +395957,7 @@ var init_defaultModelConfigs = __esm({
395882
395957
  flash: {
395883
395958
  default: "gemini-3-flash-preview",
395884
395959
  contexts: [
395960
+ { condition: { useGemini3_5Flash: true }, target: "gemini-3.5-flash" },
395885
395961
  {
395886
395962
  condition: { hasAccessToPreview: false },
395887
395963
  target: "gemini-2.5-flash"
@@ -399350,7 +399426,8 @@ var init_flagNames = __esm({
399350
399426
  MASKING_PROTECT_LATEST_TURN: 45758819,
399351
399427
  GEMINI_3_1_PRO_LAUNCHED: 45760185,
399352
399428
  PRO_MODEL_NO_ACCESS: 45768879,
399353
- DEFAULT_REQUEST_TIMEOUT: 45773134
399429
+ DEFAULT_REQUEST_TIMEOUT: 45773134,
399430
+ GEMINI_3_5_FLASH_GA_LAUNCHED: 45780819
399354
399431
  };
399355
399432
  }
399356
399433
  });
@@ -410418,7 +410495,7 @@ var init_config4 = __esm({
410418
410495
  if (!isAutoModel(model, this)) {
410419
410496
  return {};
410420
410497
  }
410421
- const primaryModel = resolveModel(model, this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this);
410498
+ const primaryModel = resolveModel(model, this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this, this.hasGemini35FlashGAAccess());
410422
410499
  const isPreview = isPreviewModel(primaryModel, this);
410423
410500
  const proModel = primaryModel;
410424
410501
  const flashModel = isPreview ? PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
@@ -410439,7 +410516,7 @@ var init_config4 = __esm({
410439
410516
  if (pooled.remaining !== void 0) {
410440
410517
  return pooled.remaining;
410441
410518
  }
410442
- const primaryModel = resolveModel(this.getModel(), this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this);
410519
+ const primaryModel = resolveModel(this.getModel(), this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this, this.hasGemini35FlashGAAccess());
410443
410520
  return this.modelQuotas.get(primaryModel)?.remaining;
410444
410521
  }
410445
410522
  getQuotaLimit() {
@@ -410447,7 +410524,7 @@ var init_config4 = __esm({
410447
410524
  if (pooled.limit !== void 0) {
410448
410525
  return pooled.limit;
410449
410526
  }
410450
- const primaryModel = resolveModel(this.getModel(), this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this);
410527
+ const primaryModel = resolveModel(this.getModel(), this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this, this.hasGemini35FlashGAAccess());
410451
410528
  return this.modelQuotas.get(primaryModel)?.limit;
410452
410529
  }
410453
410530
  getQuotaResetTime() {
@@ -410455,7 +410532,7 @@ var init_config4 = __esm({
410455
410532
  if (pooled.resetTime !== void 0) {
410456
410533
  return pooled.resetTime;
410457
410534
  }
410458
- const primaryModel = resolveModel(this.getModel(), this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this);
410535
+ const primaryModel = resolveModel(this.getModel(), this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this, this.hasGemini35FlashGAAccess());
410459
410536
  return this.modelQuotas.get(primaryModel)?.resetTime;
410460
410537
  }
410461
410538
  getEmbeddingModel() {
@@ -411439,6 +411516,30 @@ ${sections.join("\n")}
411439
411516
  isGemini31LaunchedForAuthType(authType) {
411440
411517
  return authType === AuthType2.USE_GEMINI || authType === AuthType2.USE_VERTEX_AI || authType === AuthType2.GATEWAY;
411441
411518
  }
411519
+ /**
411520
+ * Returns whether Gemini 3.5 Flash GA has been launched.
411521
+ *
411522
+ * Note: This method should only be called after startup, once experiments have been loaded.
411523
+ */
411524
+ hasGemini35FlashGAAccess() {
411525
+ const authType = this.contentGeneratorConfig?.authType;
411526
+ const hasAccess = (() => {
411527
+ if (this.isGemini31LaunchedForAuthType(authType)) {
411528
+ return true;
411529
+ }
411530
+ return this.experiments?.flags[ExperimentFlags.GEMINI_3_5_FLASH_GA_LAUNCHED]?.boolValue ?? false;
411531
+ })();
411532
+ if (hasAccess) {
411533
+ if (authType === AuthType2.USE_GEMINI) {
411534
+ setFlashModels("gemini-3-flash-preview", "gemini-3.5-flash");
411535
+ } else {
411536
+ setFlashModels("gemini-3-flash", "gemini-3-flash");
411537
+ }
411538
+ } else {
411539
+ setFlashModels("gemini-3-flash-preview", "gemini-2.5-flash");
411540
+ }
411541
+ return hasAccess;
411542
+ }
411442
411543
  /**
411443
411544
  * Returns whether Gemini 3.1 has been launched.
411444
411545
  *