@google/gemini-cli-a2a-server 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.
- package/dist/a2a-server.mjs +274 -135
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/a2a-server.mjs
CHANGED
|
@@ -140886,26 +140886,47 @@ function setFlashModels(preview, defaultFlash) {
|
|
|
140886
140886
|
PREVIEW_GEMINI_FLASH_MODEL = preview;
|
|
140887
140887
|
DEFAULT_GEMINI_FLASH_MODEL = defaultFlash;
|
|
140888
140888
|
}
|
|
140889
|
-
function
|
|
140889
|
+
function setFlashLiteModel(defaultFlashLite) {
|
|
140890
|
+
DEFAULT_GEMINI_FLASH_LITE_MODEL = defaultFlashLite;
|
|
140891
|
+
}
|
|
140892
|
+
function getBackendModelMappings(context2, isCodeAssistBackend = true) {
|
|
140893
|
+
const mappings = {};
|
|
140894
|
+
const useLatestFlash = context2?.hasLatestFlashGAAccess?.() ?? false;
|
|
140895
|
+
const useLatestFlashLite = context2?.hasLatestFlashLiteGAAccess?.() ?? false;
|
|
140896
|
+
if (useLatestFlash) {
|
|
140897
|
+
mappings[BASE_GEMINI_FLASH_MODEL] = LATEST_GEMINI_FLASH_MODEL;
|
|
140898
|
+
mappings[LEGACY_CCPA_FLASH_MODEL] = LATEST_GEMINI_FLASH_MODEL;
|
|
140899
|
+
} else if (isCodeAssistBackend) {
|
|
140900
|
+
mappings[BASE_GEMINI_FLASH_MODEL] = LEGACY_CCPA_FLASH_MODEL;
|
|
140901
|
+
}
|
|
140902
|
+
if (useLatestFlashLite) {
|
|
140903
|
+
mappings[BASE_GEMINI_FLASH_LITE_MODEL] = LATEST_GEMINI_FLASH_LITE_MODEL;
|
|
140904
|
+
}
|
|
140905
|
+
return mappings;
|
|
140906
|
+
}
|
|
140907
|
+
function getAutoModelDescription(hasAccessToPreview, useGemini3_1 = false, useLatestFlash = false) {
|
|
140890
140908
|
const proModel = hasAccessToPreview ? useGemini3_1 ? PREVIEW_GEMINI_3_1_MODEL : PREVIEW_GEMINI_MODEL : DEFAULT_GEMINI_MODEL;
|
|
140891
|
-
const flashModel = hasAccessToPreview ?
|
|
140909
|
+
const flashModel = hasAccessToPreview ? useLatestFlash ? LATEST_GEMINI_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
|
|
140892
140910
|
return `Let Gemini CLI decide the best model for the task: ${getDisplayString(proModel)}, ${getDisplayString(flashModel)}`;
|
|
140893
140911
|
}
|
|
140894
|
-
function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config2,
|
|
140912
|
+
function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config2, useLatestFlash = false, useLatestFlashLite = false) {
|
|
140895
140913
|
const normalizedModel = Array.isArray(requestedModel) ? String(requestedModel.at(-1) ?? "").trim() || "" : typeof requestedModel !== "string" ? String(requestedModel ?? "").trim() || "" : requestedModel.trim() || "";
|
|
140914
|
+
const effectiveUseLatestFlash = useLatestFlash || (config2?.hasLatestFlashGAAccess?.() ?? false);
|
|
140915
|
+
const effectiveUseLatestFlashLite = useLatestFlashLite || (config2?.hasLatestFlashLiteGAAccess?.() ?? false);
|
|
140896
140916
|
if (config2?.getExperimentalDynamicModelConfiguration?.() === true) {
|
|
140897
140917
|
const resolved2 = config2.modelConfigService.resolveModelId(normalizedModel, {
|
|
140898
140918
|
useGemini3_1,
|
|
140899
140919
|
useCustomTools: useCustomToolModel,
|
|
140900
140920
|
hasAccessToPreview,
|
|
140901
|
-
|
|
140921
|
+
useLatestFlash: effectiveUseLatestFlash,
|
|
140922
|
+
useLatestFlashLite: effectiveUseLatestFlashLite
|
|
140902
140923
|
});
|
|
140903
140924
|
if (!hasAccessToPreview && isPreviewModel(resolved2, config2)) {
|
|
140904
140925
|
if (resolved2.includes("flash-lite")) {
|
|
140905
|
-
return
|
|
140926
|
+
return effectiveUseLatestFlashLite ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL;
|
|
140906
140927
|
}
|
|
140907
140928
|
if (resolved2.includes("flash")) {
|
|
140908
|
-
return
|
|
140929
|
+
return effectiveUseLatestFlash ? LATEST_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
|
|
140909
140930
|
}
|
|
140910
140931
|
return DEFAULT_GEMINI_MODEL;
|
|
140911
140932
|
}
|
|
@@ -140934,11 +140955,11 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
|
|
|
140934
140955
|
break;
|
|
140935
140956
|
}
|
|
140936
140957
|
case GEMINI_MODEL_ALIAS_FLASH: {
|
|
140937
|
-
resolved =
|
|
140958
|
+
resolved = effectiveUseLatestFlash ? LATEST_GEMINI_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL;
|
|
140938
140959
|
break;
|
|
140939
140960
|
}
|
|
140940
140961
|
case GEMINI_MODEL_ALIAS_FLASH_LITE: {
|
|
140941
|
-
resolved =
|
|
140962
|
+
resolved = effectiveUseLatestFlashLite ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL;
|
|
140942
140963
|
break;
|
|
140943
140964
|
}
|
|
140944
140965
|
default: {
|
|
@@ -140947,25 +140968,28 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
|
|
|
140947
140968
|
}
|
|
140948
140969
|
}
|
|
140949
140970
|
if (resolved === "none") {
|
|
140950
|
-
return
|
|
140971
|
+
return effectiveUseLatestFlashLite ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL;
|
|
140972
|
+
}
|
|
140973
|
+
if (effectiveUseLatestFlash && isPromotableFlashModel(resolved) && normalizedModel !== PREVIEW_GEMINI_FLASH_MODEL) {
|
|
140974
|
+
return LATEST_GEMINI_FLASH_MODEL;
|
|
140951
140975
|
}
|
|
140952
|
-
if (
|
|
140953
|
-
return
|
|
140976
|
+
if (effectiveUseLatestFlashLite && isPromotableFlashLiteModel(resolved)) {
|
|
140977
|
+
return LATEST_GEMINI_FLASH_LITE_MODEL;
|
|
140954
140978
|
}
|
|
140955
140979
|
if (!hasAccessToPreview && isPreviewModel(resolved)) {
|
|
140956
140980
|
switch (resolved) {
|
|
140957
140981
|
case PREVIEW_GEMINI_FLASH_MODEL:
|
|
140958
|
-
return
|
|
140982
|
+
return effectiveUseLatestFlash ? LATEST_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
|
|
140959
140983
|
case PREVIEW_GEMINI_MODEL:
|
|
140960
140984
|
case PREVIEW_GEMINI_3_1_MODEL:
|
|
140961
140985
|
case PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL:
|
|
140962
140986
|
return DEFAULT_GEMINI_MODEL;
|
|
140963
140987
|
default:
|
|
140964
140988
|
if (resolved.includes("flash-lite")) {
|
|
140965
|
-
return
|
|
140989
|
+
return effectiveUseLatestFlashLite ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL;
|
|
140966
140990
|
}
|
|
140967
140991
|
if (resolved.includes("flash")) {
|
|
140968
|
-
return
|
|
140992
|
+
return effectiveUseLatestFlash ? LATEST_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
|
|
140969
140993
|
}
|
|
140970
140994
|
return DEFAULT_GEMINI_MODEL;
|
|
140971
140995
|
}
|
|
@@ -140973,30 +140997,40 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
|
|
|
140973
140997
|
return resolved;
|
|
140974
140998
|
}
|
|
140975
140999
|
function isPromotableFlashModel(model) {
|
|
140976
|
-
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;
|
|
141000
|
+
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;
|
|
141001
|
+
}
|
|
141002
|
+
function isPromotableFlashLiteModel(model) {
|
|
141003
|
+
return model === DEFAULT_GEMINI_FLASH_LITE_MODEL || model === BASE_GEMINI_FLASH_LITE_MODEL || model === GEMINI_MODEL_ALIAS_FLASH_LITE;
|
|
140977
141004
|
}
|
|
140978
|
-
function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config2,
|
|
141005
|
+
function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config2, useLatestFlash = false, useLatestFlashLite = false) {
|
|
141006
|
+
const effectiveUseLatestFlash = useLatestFlash || (config2?.hasLatestFlashGAAccess?.() ?? false);
|
|
141007
|
+
const effectiveUseLatestFlashLite = useLatestFlashLite || (config2?.hasLatestFlashLiteGAAccess?.() ?? false);
|
|
141008
|
+
const effectiveHasAccessToPreview = hasAccessToPreview || (config2?.getHasAccessToPreviewModel?.() ?? false);
|
|
140979
141009
|
if (config2?.getExperimentalDynamicModelConfiguration?.() === true) {
|
|
140980
141010
|
return config2.modelConfigService.resolveClassifierModelId(modelAlias, requestedModel, {
|
|
140981
141011
|
useGemini3_1,
|
|
140982
141012
|
useCustomTools: useCustomToolModel,
|
|
140983
|
-
hasAccessToPreview,
|
|
140984
|
-
|
|
141013
|
+
hasAccessToPreview: effectiveHasAccessToPreview,
|
|
141014
|
+
useLatestFlash: effectiveUseLatestFlash,
|
|
141015
|
+
useLatestFlashLite: effectiveUseLatestFlashLite
|
|
140985
141016
|
});
|
|
140986
141017
|
}
|
|
140987
141018
|
if (modelAlias === GEMINI_MODEL_ALIAS_FLASH) {
|
|
140988
141019
|
if (requestedModel === DEFAULT_GEMINI_MODEL_AUTO || requestedModel === DEFAULT_GEMINI_MODEL) {
|
|
140989
|
-
return
|
|
141020
|
+
return effectiveUseLatestFlash ? LATEST_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
|
|
140990
141021
|
}
|
|
140991
141022
|
if (requestedModel === PREVIEW_GEMINI_MODEL_AUTO || requestedModel === PREVIEW_GEMINI_MODEL || requestedModel === GEMINI_MODEL_ALIAS_AUTO) {
|
|
140992
|
-
if (
|
|
140993
|
-
return
|
|
141023
|
+
if (effectiveUseLatestFlash) {
|
|
141024
|
+
return LATEST_GEMINI_FLASH_MODEL;
|
|
140994
141025
|
}
|
|
140995
|
-
return
|
|
141026
|
+
return effectiveHasAccessToPreview ? PREVIEW_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
|
|
140996
141027
|
}
|
|
140997
|
-
return resolveModel(GEMINI_MODEL_ALIAS_FLASH, false, false,
|
|
141028
|
+
return resolveModel(GEMINI_MODEL_ALIAS_FLASH, false, false, effectiveHasAccessToPreview, config2, effectiveUseLatestFlash, effectiveUseLatestFlashLite);
|
|
141029
|
+
}
|
|
141030
|
+
if (modelAlias === GEMINI_MODEL_ALIAS_FLASH_LITE) {
|
|
141031
|
+
return resolveModel(GEMINI_MODEL_ALIAS_FLASH_LITE, false, false, effectiveHasAccessToPreview, config2, effectiveUseLatestFlash, effectiveUseLatestFlashLite);
|
|
140998
141032
|
}
|
|
140999
|
-
return resolveModel(requestedModel, useGemini3_1, useCustomToolModel,
|
|
141033
|
+
return resolveModel(requestedModel, useGemini3_1, useCustomToolModel, effectiveHasAccessToPreview, config2, effectiveUseLatestFlash, effectiveUseLatestFlashLite);
|
|
141000
141034
|
}
|
|
141001
141035
|
function getDisplayString(model, config2) {
|
|
141002
141036
|
if (config2?.getExperimentalDynamicModelConfiguration?.() === true) {
|
|
@@ -141005,9 +141039,14 @@ function getDisplayString(model, config2) {
|
|
|
141005
141039
|
return definition.displayName;
|
|
141006
141040
|
}
|
|
141007
141041
|
}
|
|
141042
|
+
const useLatestFlash = config2?.hasLatestFlashGAAccess?.() ?? false;
|
|
141043
|
+
const useLatestFlashLite = config2?.hasLatestFlashLiteGAAccess?.() ?? false;
|
|
141008
141044
|
switch (model) {
|
|
141009
|
-
case
|
|
141010
|
-
|
|
141045
|
+
case LEGACY_CCPA_FLASH_MODEL:
|
|
141046
|
+
case BASE_GEMINI_FLASH_MODEL:
|
|
141047
|
+
return useLatestFlash ? LATEST_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
|
|
141048
|
+
case BASE_GEMINI_FLASH_LITE_MODEL:
|
|
141049
|
+
return useLatestFlashLite ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL;
|
|
141011
141050
|
case GEMINI_MODEL_ALIAS_AUTO:
|
|
141012
141051
|
return "Auto";
|
|
141013
141052
|
case PREVIEW_GEMINI_MODEL_AUTO:
|
|
@@ -141081,7 +141120,7 @@ function supportsMultimodalFunctionResponse(model, config2) {
|
|
|
141081
141120
|
}
|
|
141082
141121
|
return model.startsWith("gemini-3-");
|
|
141083
141122
|
}
|
|
141084
|
-
var PREVIEW_GEMINI_MODEL, PREVIEW_GEMINI_3_1_MODEL, PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL, PREVIEW_GEMINI_FLASH_MODEL, DEFAULT_GEMINI_MODEL,
|
|
141123
|
+
var PREVIEW_GEMINI_MODEL, PREVIEW_GEMINI_3_1_MODEL, PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL, PREVIEW_GEMINI_FLASH_MODEL, DEFAULT_GEMINI_MODEL, BASE_GEMINI_FLASH_MODEL, LATEST_GEMINI_FLASH_MODEL, LEGACY_CCPA_FLASH_MODEL, DEFAULT_GEMINI_3_5_FLASH_MODEL, SECONDARY_GEMINI_3_5_FLASH_MODEL, BASE_GEMINI_FLASH_LITE_MODEL, LATEST_GEMINI_FLASH_LITE_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, CCPA_AI_MODEL_MAPPINGS;
|
|
141085
141124
|
var init_models = __esm({
|
|
141086
141125
|
"packages/core/dist/src/config/models.js"() {
|
|
141087
141126
|
"use strict";
|
|
@@ -141090,10 +141129,15 @@ var init_models = __esm({
|
|
|
141090
141129
|
PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL = "gemini-3.1-pro-preview-customtools";
|
|
141091
141130
|
PREVIEW_GEMINI_FLASH_MODEL = "gemini-3-flash-preview";
|
|
141092
141131
|
DEFAULT_GEMINI_MODEL = "gemini-2.5-pro";
|
|
141093
|
-
|
|
141094
|
-
|
|
141095
|
-
|
|
141096
|
-
|
|
141132
|
+
BASE_GEMINI_FLASH_MODEL = "gemini-3.5-flash";
|
|
141133
|
+
LATEST_GEMINI_FLASH_MODEL = "gemini-3.8-flash";
|
|
141134
|
+
LEGACY_CCPA_FLASH_MODEL = "gemini-3-flash";
|
|
141135
|
+
DEFAULT_GEMINI_3_5_FLASH_MODEL = BASE_GEMINI_FLASH_MODEL;
|
|
141136
|
+
SECONDARY_GEMINI_3_5_FLASH_MODEL = LEGACY_CCPA_FLASH_MODEL;
|
|
141137
|
+
BASE_GEMINI_FLASH_LITE_MODEL = "gemini-3.1-flash-lite";
|
|
141138
|
+
LATEST_GEMINI_FLASH_LITE_MODEL = "gemini-3.5-flash-lite";
|
|
141139
|
+
DEFAULT_GEMINI_FLASH_MODEL = BASE_GEMINI_FLASH_MODEL;
|
|
141140
|
+
DEFAULT_GEMINI_FLASH_LITE_MODEL = BASE_GEMINI_FLASH_LITE_MODEL;
|
|
141097
141141
|
PREVIEW_GEMINI_FLASH_LITE_MODEL = "none";
|
|
141098
141142
|
GEMMA_4_31B_IT_MODEL = "gemma-4-31b-it";
|
|
141099
141143
|
GEMMA_4_26B_A4B_IT_MODEL = "gemma-4-26b-a4b-it";
|
|
@@ -221685,8 +221729,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
|
|
|
221685
221729
|
var init_git_commit = __esm({
|
|
221686
221730
|
"packages/core/dist/src/generated/git-commit.js"() {
|
|
221687
221731
|
"use strict";
|
|
221688
|
-
GIT_COMMIT_INFO = "
|
|
221689
|
-
CLI_VERSION = "0.61.0
|
|
221732
|
+
GIT_COMMIT_INFO = "cc0107ed2";
|
|
221733
|
+
CLI_VERSION = "0.61.0";
|
|
221690
221734
|
}
|
|
221691
221735
|
});
|
|
221692
221736
|
|
|
@@ -337417,7 +337461,7 @@ function getVersion() {
|
|
|
337417
337461
|
}
|
|
337418
337462
|
versionPromise = (async () => {
|
|
337419
337463
|
const pkgJson = await getPackageJson(__dirname4);
|
|
337420
|
-
return "0.61.0
|
|
337464
|
+
return "0.61.0";
|
|
337421
337465
|
})();
|
|
337422
337466
|
return versionPromise;
|
|
337423
337467
|
}
|
|
@@ -338310,7 +338354,7 @@ var init_errorClassification = __esm({
|
|
|
338310
338354
|
function getModelPolicyChain(options) {
|
|
338311
338355
|
const isAuto = options.isAutoSelection ?? false;
|
|
338312
338356
|
if (options.previewEnabled) {
|
|
338313
|
-
const proModel = resolveModel(PREVIEW_GEMINI_MODEL, options.useGemini31, options.useCustomToolModel, true, void 0, options.
|
|
338357
|
+
const proModel = resolveModel(PREVIEW_GEMINI_MODEL, options.useGemini31, options.useCustomToolModel, true, void 0, options.useLatestFlash, options.useLatestFlashLite);
|
|
338314
338358
|
return [
|
|
338315
338359
|
definePolicy({
|
|
338316
338360
|
model: proModel,
|
|
@@ -338343,7 +338387,21 @@ function createSingleModelChain(model) {
|
|
|
338343
338387
|
return [definePolicy({ model, isLastResort: true })];
|
|
338344
338388
|
}
|
|
338345
338389
|
function getFlashLitePolicyChain() {
|
|
338346
|
-
return
|
|
338390
|
+
return [
|
|
338391
|
+
definePolicy({
|
|
338392
|
+
model: DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
338393
|
+
actions: SILENT_ACTIONS
|
|
338394
|
+
}),
|
|
338395
|
+
definePolicy({
|
|
338396
|
+
model: DEFAULT_GEMINI_FLASH_MODEL,
|
|
338397
|
+
actions: SILENT_ACTIONS
|
|
338398
|
+
}),
|
|
338399
|
+
definePolicy({
|
|
338400
|
+
model: DEFAULT_GEMINI_MODEL,
|
|
338401
|
+
isLastResort: true,
|
|
338402
|
+
actions: SILENT_ACTIONS
|
|
338403
|
+
})
|
|
338404
|
+
];
|
|
338347
338405
|
}
|
|
338348
338406
|
function createDefaultPolicy(model, options) {
|
|
338349
338407
|
return definePolicy({ model, isLastResort: options?.isLastResort });
|
|
@@ -338360,17 +338418,7 @@ function definePolicy(config2) {
|
|
|
338360
338418
|
}
|
|
338361
338419
|
};
|
|
338362
338420
|
}
|
|
338363
|
-
|
|
338364
|
-
return {
|
|
338365
|
-
...policy,
|
|
338366
|
-
actions: { ...policy.actions },
|
|
338367
|
-
stateTransitions: { ...policy.stateTransitions }
|
|
338368
|
-
};
|
|
338369
|
-
}
|
|
338370
|
-
function cloneChain(chain2) {
|
|
338371
|
-
return chain2.map(clonePolicy);
|
|
338372
|
-
}
|
|
338373
|
-
var DEFAULT_ACTIONS, SILENT_ACTIONS, DEFAULT_STATE, AUTO_ROUTING_OVERRIDES, FLASH_LITE_CHAIN;
|
|
338421
|
+
var DEFAULT_ACTIONS, SILENT_ACTIONS, DEFAULT_STATE, AUTO_ROUTING_OVERRIDES;
|
|
338374
338422
|
var init_policyCatalog = __esm({
|
|
338375
338423
|
"packages/core/dist/src/availability/policyCatalog.js"() {
|
|
338376
338424
|
"use strict";
|
|
@@ -338401,21 +338449,6 @@ var init_policyCatalog = __esm({
|
|
|
338401
338449
|
transient: "sticky_retry"
|
|
338402
338450
|
}
|
|
338403
338451
|
};
|
|
338404
|
-
FLASH_LITE_CHAIN = [
|
|
338405
|
-
definePolicy({
|
|
338406
|
-
model: DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
338407
|
-
actions: SILENT_ACTIONS
|
|
338408
|
-
}),
|
|
338409
|
-
definePolicy({
|
|
338410
|
-
model: DEFAULT_GEMINI_FLASH_MODEL,
|
|
338411
|
-
actions: SILENT_ACTIONS
|
|
338412
|
-
}),
|
|
338413
|
-
definePolicy({
|
|
338414
|
-
model: DEFAULT_GEMINI_MODEL,
|
|
338415
|
-
isLastResort: true,
|
|
338416
|
-
actions: SILENT_ACTIONS
|
|
338417
|
-
})
|
|
338418
|
-
];
|
|
338419
338452
|
}
|
|
338420
338453
|
});
|
|
338421
338454
|
|
|
@@ -338438,9 +338471,10 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
|
|
|
338438
338471
|
const useGemini31 = config2.getGemini31LaunchedSync?.() ?? false;
|
|
338439
338472
|
const useCustomToolModel = config2.getUseCustomToolModelSync?.() ?? false;
|
|
338440
338473
|
const hasAccessToPreview = config2.getHasAccessToPreviewModel?.() ?? false;
|
|
338441
|
-
const
|
|
338474
|
+
const useLatestFlash = config2.hasLatestFlashGAAccess?.() ?? false;
|
|
338475
|
+
const useLatestFlashLite = config2.hasLatestFlashLiteGAAccess?.() ?? false;
|
|
338442
338476
|
const isOriginallyGemini3 = isGemini3Model(modelFromConfig, config2);
|
|
338443
|
-
const resolvedModel = normalizeModelId(resolveModel(modelFromConfig, useGemini31, useCustomToolModel, hasAccessToPreview, config2,
|
|
338477
|
+
const resolvedModel = normalizeModelId(resolveModel(modelFromConfig, useGemini31, useCustomToolModel, hasAccessToPreview, config2, useLatestFlash, useLatestFlashLite));
|
|
338444
338478
|
const isAutoPreferred = normalizedPreferredModel ? isAutoModel(normalizedPreferredModel, config2) : false;
|
|
338445
338479
|
const isAutoConfigured = isAutoModel(configuredModel, config2);
|
|
338446
338480
|
const effectiveWrapsAround = wrapsAround || isAutoPreferred || isAutoConfigured || isOriginallyGemini3;
|
|
@@ -338448,7 +338482,8 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
|
|
|
338448
338482
|
const context2 = {
|
|
338449
338483
|
useGemini3_1: useGemini31,
|
|
338450
338484
|
useCustomTools: useCustomToolModel,
|
|
338451
|
-
|
|
338485
|
+
useLatestFlash,
|
|
338486
|
+
useLatestFlashLite
|
|
338452
338487
|
};
|
|
338453
338488
|
if (resolvedModel === DEFAULT_GEMINI_FLASH_LITE_MODEL) {
|
|
338454
338489
|
chain2 = config2.modelConfigService.resolveChain("lite", context2);
|
|
@@ -338458,7 +338493,7 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
|
|
|
338458
338493
|
}
|
|
338459
338494
|
if (!chain2) {
|
|
338460
338495
|
const isAutoSelection = isAutoPreferred || isAutoConfigured;
|
|
338461
|
-
const previewEnabled = hasAccessToPreview && (isGemini3Model(resolvedModel, config2) || normalizedPreferredModel === PREVIEW_GEMINI_MODEL_AUTO || configuredModel === PREVIEW_GEMINI_MODEL_AUTO);
|
|
338496
|
+
const previewEnabled = hasAccessToPreview && configuredModel !== DEFAULT_GEMINI_MODEL_AUTO && (isGemini3Model(resolvedModel, config2) || normalizedPreferredModel === PREVIEW_GEMINI_MODEL_AUTO || configuredModel === PREVIEW_GEMINI_MODEL_AUTO);
|
|
338462
338497
|
const autoPrefix = isAutoSelection ? "auto-" : "";
|
|
338463
338498
|
const chainKey = previewEnabled ? "preview" : "default";
|
|
338464
338499
|
chain2 = config2.modelConfigService.resolveChain(`${autoPrefix}${chainKey}`, context2);
|
|
@@ -338474,14 +338509,15 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
|
|
|
338474
338509
|
} else if (isOriginallyGemini3 || isAutoPreferred || isAutoConfigured) {
|
|
338475
338510
|
const isAutoSelection = isAutoPreferred || isAutoConfigured;
|
|
338476
338511
|
if (hasAccessToPreview) {
|
|
338477
|
-
const previewEnabled = isOriginallyGemini3 || normalizedPreferredModel === PREVIEW_GEMINI_MODEL_AUTO || configuredModel === PREVIEW_GEMINI_MODEL_AUTO;
|
|
338512
|
+
const previewEnabled = configuredModel !== DEFAULT_GEMINI_MODEL_AUTO && (isOriginallyGemini3 || normalizedPreferredModel === PREVIEW_GEMINI_MODEL_AUTO || configuredModel === PREVIEW_GEMINI_MODEL_AUTO);
|
|
338478
338513
|
chain2 = getModelPolicyChain({
|
|
338479
338514
|
previewEnabled,
|
|
338480
338515
|
isAutoSelection,
|
|
338481
338516
|
userTier: config2.getUserTier(),
|
|
338482
338517
|
useGemini31,
|
|
338483
338518
|
useCustomToolModel,
|
|
338484
|
-
|
|
338519
|
+
useLatestFlash,
|
|
338520
|
+
useLatestFlashLite
|
|
338485
338521
|
});
|
|
338486
338522
|
} else {
|
|
338487
338523
|
chain2 = getModelPolicyChain({
|
|
@@ -338490,7 +338526,8 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
|
|
|
338490
338526
|
userTier: config2.getUserTier(),
|
|
338491
338527
|
useGemini31,
|
|
338492
338528
|
useCustomToolModel,
|
|
338493
|
-
|
|
338529
|
+
useLatestFlash,
|
|
338530
|
+
useLatestFlashLite
|
|
338494
338531
|
});
|
|
338495
338532
|
}
|
|
338496
338533
|
} else {
|
|
@@ -338540,8 +338577,8 @@ function createAvailabilityContextProvider(config2, modelGetter) {
|
|
|
338540
338577
|
}
|
|
338541
338578
|
function selectModelForAvailability(config2, requestedModel) {
|
|
338542
338579
|
const chain2 = resolvePolicyChain(config2, requestedModel);
|
|
338543
|
-
const selection = config2.getModelAvailabilityService()
|
|
338544
|
-
if (selection
|
|
338580
|
+
const selection = config2.getModelAvailabilityService?.()?.selectFirstAvailable(chain2.map((p2) => p2.model));
|
|
338581
|
+
if (selection?.selectedModel)
|
|
338545
338582
|
return selection;
|
|
338546
338583
|
const backupModel = chain2.find((p2) => p2.isLastResort)?.model ?? DEFAULT_GEMINI_MODEL;
|
|
338547
338584
|
return { selectedModel: backupModel, skipped: [] };
|
|
@@ -342716,11 +342753,12 @@ var init_modelMappingContentGenerator = __esm({
|
|
|
342716
342753
|
}
|
|
342717
342754
|
mapModel(req) {
|
|
342718
342755
|
if (req.model) {
|
|
342756
|
+
const activeMappings = typeof this.mappings === "function" ? this.mappings() : this.mappings;
|
|
342719
342757
|
const normalizedModel = normalizeModelId(req.model);
|
|
342720
|
-
if (
|
|
342758
|
+
if (activeMappings[normalizedModel]) {
|
|
342721
342759
|
return {
|
|
342722
342760
|
...req,
|
|
342723
|
-
model: req.model.startsWith("models/") ? `models/${
|
|
342761
|
+
model: req.model.startsWith("models/") ? `models/${activeMappings[normalizedModel]}` : activeMappings[normalizedModel]
|
|
342724
342762
|
};
|
|
342725
342763
|
}
|
|
342726
342764
|
}
|
|
@@ -343123,7 +343161,7 @@ async function createContentGenerator(config2, gcConfig, sessionId) {
|
|
|
343123
343161
|
}
|
|
343124
343162
|
if (config2.authType === AuthType2.LOGIN_WITH_GOOGLE || config2.authType === AuthType2.COMPUTE_ADC) {
|
|
343125
343163
|
const httpOptions = { headers: baseHeaders };
|
|
343126
|
-
return new LoggingContentGenerator(new ModelMappingContentGenerator(await createCodeAssistContentGenerator(httpOptions, config2.authType, gcConfig, sessionId),
|
|
343164
|
+
return new LoggingContentGenerator(new ModelMappingContentGenerator(await createCodeAssistContentGenerator(httpOptions, config2.authType, gcConfig, sessionId), () => getBackendModelMappings(gcConfig, true)), gcConfig);
|
|
343127
343165
|
}
|
|
343128
343166
|
if (config2.authType === AuthType2.USE_GEMINI || config2.authType === AuthType2.USE_VERTEX_AI || config2.authType === AuthType2.GATEWAY) {
|
|
343129
343167
|
let headers = { ...baseHeaders };
|
|
@@ -343192,7 +343230,7 @@ async function createContentGenerator(config2, gcConfig, sessionId) {
|
|
|
343192
343230
|
}
|
|
343193
343231
|
}
|
|
343194
343232
|
});
|
|
343195
|
-
return new LoggingContentGenerator(googleGenAI.models, gcConfig);
|
|
343233
|
+
return new LoggingContentGenerator(new ModelMappingContentGenerator(googleGenAI.models, () => getBackendModelMappings(gcConfig, false)), gcConfig);
|
|
343196
343234
|
}
|
|
343197
343235
|
throw new Error(`Error creating contentGenerator: Unsupported authType: ${config2.authType}`);
|
|
343198
343236
|
})();
|
|
@@ -371405,16 +371443,21 @@ function modelStringToModelConfigAlias(model) {
|
|
|
371405
371443
|
case PREVIEW_GEMINI_3_1_MODEL:
|
|
371406
371444
|
return "chat-compression-3-pro";
|
|
371407
371445
|
case PREVIEW_GEMINI_FLASH_MODEL:
|
|
371446
|
+
case BASE_GEMINI_FLASH_MODEL:
|
|
371447
|
+
case LATEST_GEMINI_FLASH_MODEL:
|
|
371448
|
+
case LEGACY_CCPA_FLASH_MODEL:
|
|
371408
371449
|
return "chat-compression-3-flash";
|
|
371409
371450
|
case PREVIEW_GEMINI_FLASH_LITE_MODEL:
|
|
371410
371451
|
// fallthrough
|
|
371452
|
+
case BASE_GEMINI_FLASH_LITE_MODEL:
|
|
371411
371453
|
case DEFAULT_GEMINI_FLASH_LITE_MODEL:
|
|
371454
|
+
case LATEST_GEMINI_FLASH_LITE_MODEL:
|
|
371412
371455
|
return "chat-compression-3.1-flash-lite";
|
|
371413
371456
|
case "gemini-2.5-flash-lite":
|
|
371414
371457
|
return "chat-compression-2.5-flash-lite";
|
|
371415
371458
|
case DEFAULT_GEMINI_MODEL:
|
|
371416
371459
|
return "chat-compression-2.5-pro";
|
|
371417
|
-
case
|
|
371460
|
+
case "gemini-2.5-flash":
|
|
371418
371461
|
return "chat-compression-2.5-flash";
|
|
371419
371462
|
default:
|
|
371420
371463
|
return "chat-compression-default";
|
|
@@ -380361,7 +380404,7 @@ var init_modelConfigService = __esm({
|
|
|
380361
380404
|
const definitions = this.config.modelDefinitions ?? {};
|
|
380362
380405
|
const shouldShowPreviewModels = context2.hasAccessToPreview ?? false;
|
|
380363
380406
|
const useGemini31 = context2.useGemini3_1 ?? false;
|
|
380364
|
-
const
|
|
380407
|
+
const useLatestFlash = context2.useLatestFlash ?? false;
|
|
380365
380408
|
const mainOptions = Object.entries(definitions).filter(([_2, m3]) => {
|
|
380366
380409
|
if (m3.isVisible !== true)
|
|
380367
380410
|
return false;
|
|
@@ -380373,7 +380416,7 @@ var init_modelConfigService = __esm({
|
|
|
380373
380416
|
}).map(([id, m3]) => {
|
|
380374
380417
|
let description = m3.dialogDescription ?? "";
|
|
380375
380418
|
if (id === "auto") {
|
|
380376
|
-
description = getAutoModelDescription(shouldShowPreviewModels, useGemini31,
|
|
380419
|
+
description = getAutoModelDescription(shouldShowPreviewModels, useGemini31, useLatestFlash);
|
|
380377
380420
|
} else if (id === "auto-gemini-3" && useGemini31) {
|
|
380378
380421
|
description = description.replace("gemini-3-pro", "gemini-3.1-pro");
|
|
380379
380422
|
}
|
|
@@ -380441,14 +380484,22 @@ var init_modelConfigService = __esm({
|
|
|
380441
380484
|
switch (key) {
|
|
380442
380485
|
case "useGemini3_1":
|
|
380443
380486
|
return value === context2.useGemini3_1;
|
|
380444
|
-
case "
|
|
380445
|
-
|
|
380446
|
-
|
|
380447
|
-
return value ===
|
|
380487
|
+
case "useLatestFlashLite":
|
|
380488
|
+
case "useGemini3_1FlashLite": {
|
|
380489
|
+
const actualValue = key === "useLatestFlashLite" ? context2.useLatestFlashLite ?? context2.useGemini3_1FlashLite : context2.useGemini3_1FlashLite ?? context2.useLatestFlashLite;
|
|
380490
|
+
return value === actualValue;
|
|
380491
|
+
}
|
|
380492
|
+
case "useLatestFlash":
|
|
380493
|
+
case "useGemini3_5Flash": {
|
|
380494
|
+
const actualValue = key === "useLatestFlash" ? context2.useLatestFlash ?? context2.useGemini3_5Flash : context2.useGemini3_5Flash ?? context2.useLatestFlash;
|
|
380495
|
+
return value === actualValue;
|
|
380496
|
+
}
|
|
380448
380497
|
case "useCustomTools":
|
|
380449
380498
|
return value === context2.useCustomTools;
|
|
380450
380499
|
case "hasAccessToPreview":
|
|
380451
380500
|
return value === context2.hasAccessToPreview;
|
|
380501
|
+
case "hasAccessToProModel":
|
|
380502
|
+
return value === context2.hasAccessToProModel;
|
|
380452
380503
|
case "requestedModels":
|
|
380453
380504
|
return Array.isArray(value) && !!context2.requestedModel && value.includes(context2.requestedModel);
|
|
380454
380505
|
default:
|
|
@@ -400802,8 +400853,9 @@ ${formattedHistory}
|
|
|
400802
400853
|
config2.getUseCustomToolModel(),
|
|
400803
400854
|
config2.getHasAccessToPreviewModel()
|
|
400804
400855
|
]);
|
|
400805
|
-
const
|
|
400806
|
-
const
|
|
400856
|
+
const useLatestFlash = config2.hasLatestFlashGAAccess?.() ?? false;
|
|
400857
|
+
const useLatestFlashLite = config2.hasLatestFlashLiteGAAccess?.() ?? false;
|
|
400858
|
+
const selectedModel = resolveClassifierModel(context2.requestedModel ?? config2.getModel(), routerResponse.model_choice, useGemini3_1, useCustomToolModel, hasAccessToPreview, config2, useLatestFlash, useLatestFlashLite);
|
|
400807
400859
|
return {
|
|
400808
400860
|
model: selectedModel,
|
|
400809
400861
|
metadata: {
|
|
@@ -400830,7 +400882,7 @@ var init_defaultStrategy = __esm({
|
|
|
400830
400882
|
DefaultStrategy = class {
|
|
400831
400883
|
name = "default";
|
|
400832
400884
|
async route(_context, config2, _baseLlmClient, _localLiteRtLmClient) {
|
|
400833
|
-
const defaultModel = resolveModel(config2.getModel(), config2.getGemini31LaunchedSync?.() ?? false, false, config2.getHasAccessToPreviewModel?.() ?? true, config2, config2.
|
|
400885
|
+
const defaultModel = resolveModel(config2.getModel(), config2.getGemini31LaunchedSync?.() ?? false, false, config2.getHasAccessToPreviewModel?.() ?? true, config2, config2.hasLatestFlashGAAccess?.() ?? false, config2.hasLatestFlashLiteGAAccess?.() ?? false);
|
|
400834
400886
|
return {
|
|
400835
400887
|
model: defaultModel,
|
|
400836
400888
|
metadata: {
|
|
@@ -400985,8 +401037,9 @@ Respond *only* in JSON format according to the following schema. Do not include
|
|
|
400985
401037
|
config2.getGemini31Launched(),
|
|
400986
401038
|
config2.getUseCustomToolModel()
|
|
400987
401039
|
]);
|
|
400988
|
-
const
|
|
400989
|
-
const
|
|
401040
|
+
const useLatestFlash = config2.hasLatestFlashGAAccess?.() ?? false;
|
|
401041
|
+
const useLatestFlashLite = config2.hasLatestFlashLiteGAAccess?.() ?? false;
|
|
401042
|
+
const selectedModel = normalizeModelId(resolveClassifierModel(normalizeModelId(model), routerResponse.model_choice, useGemini3_1, useCustomToolModel, config2.getHasAccessToPreviewModel?.() ?? true, config2, useLatestFlash, useLatestFlashLite));
|
|
400990
401043
|
const service = config2.getModelAvailabilityService();
|
|
400991
401044
|
const snapshot = service.snapshot(selectedModel);
|
|
400992
401045
|
if (!snapshot.available) {
|
|
@@ -401143,8 +401196,9 @@ Model: {"complexity_reasoning": "High-level architecture and strategic planning.
|
|
|
401143
401196
|
config2.getGemini31Launched(),
|
|
401144
401197
|
config2.getUseCustomToolModel()
|
|
401145
401198
|
]);
|
|
401146
|
-
const
|
|
401147
|
-
const
|
|
401199
|
+
const useLatestFlash = config2.hasLatestFlashGAAccess?.() ?? false;
|
|
401200
|
+
const useLatestFlashLite = config2.hasLatestFlashLiteGAAccess?.() ?? false;
|
|
401201
|
+
const selectedModel = normalizeModelId(resolveClassifierModel(normalizeModelId(model), modelAlias, useGemini3_1, useCustomToolModel, config2.getHasAccessToPreviewModel?.() ?? true, config2, useLatestFlash, useLatestFlashLite));
|
|
401148
401202
|
const service = config2.getModelAvailabilityService();
|
|
401149
401203
|
const snapshot = service.snapshot(selectedModel);
|
|
401150
401204
|
if (!snapshot.available) {
|
|
@@ -401254,7 +401308,7 @@ var init_fallbackStrategy = __esm({
|
|
|
401254
401308
|
name = "fallback";
|
|
401255
401309
|
async route(context2, config2, _baseLlmClient, _localLiteRtLmClient) {
|
|
401256
401310
|
const requestedModel = context2.requestedModel ?? config2.getModel();
|
|
401257
|
-
const resolvedModel = resolveModel(requestedModel, config2.getGemini31LaunchedSync?.() ?? false, false, config2.getHasAccessToPreviewModel?.() ?? true, config2, config2.
|
|
401311
|
+
const resolvedModel = resolveModel(requestedModel, config2.getGemini31LaunchedSync?.() ?? false, false, config2.getHasAccessToPreviewModel?.() ?? true, config2, config2.hasLatestFlashGAAccess?.() ?? false, config2.hasLatestFlashLiteGAAccess?.() ?? false);
|
|
401258
401312
|
const service = config2.getModelAvailabilityService();
|
|
401259
401313
|
const snapshot = service.snapshot(resolvedModel);
|
|
401260
401314
|
if (snapshot.available) {
|
|
@@ -401291,7 +401345,7 @@ var init_overrideStrategy = __esm({
|
|
|
401291
401345
|
return null;
|
|
401292
401346
|
}
|
|
401293
401347
|
return {
|
|
401294
|
-
model: resolveModel(overrideModel, config2.getGemini31LaunchedSync?.() ?? false, false, config2.getHasAccessToPreviewModel?.() ?? true, config2, config2.
|
|
401348
|
+
model: resolveModel(overrideModel, config2.getGemini31LaunchedSync?.() ?? false, false, config2.getHasAccessToPreviewModel?.() ?? true, config2, config2.hasLatestFlashGAAccess?.() ?? false, config2.hasLatestFlashLiteGAAccess?.() ?? false),
|
|
401295
401349
|
metadata: {
|
|
401296
401350
|
source: this.name,
|
|
401297
401351
|
latencyMs: 0,
|
|
@@ -401328,9 +401382,10 @@ var init_approvalModeStrategy = __esm({
|
|
|
401328
401382
|
config2.getUseCustomToolModel(),
|
|
401329
401383
|
config2.getHasAccessToPreviewModel()
|
|
401330
401384
|
]);
|
|
401331
|
-
const
|
|
401385
|
+
const useLatestFlash = config2.hasLatestFlashGAAccess?.() ?? false;
|
|
401386
|
+
const useLatestFlashLite = config2.hasLatestFlashLiteGAAccess?.() ?? false;
|
|
401332
401387
|
if (approvalMode === ApprovalMode.PLAN) {
|
|
401333
|
-
const proModel = resolveClassifierModel(model, GEMINI_MODEL_ALIAS_PRO, useGemini3_1, useCustomToolModel, hasAccessToPreview, config2,
|
|
401388
|
+
const proModel = resolveClassifierModel(model, GEMINI_MODEL_ALIAS_PRO, useGemini3_1, useCustomToolModel, hasAccessToPreview, config2, useLatestFlash, useLatestFlashLite);
|
|
401334
401389
|
return {
|
|
401335
401390
|
model: proModel,
|
|
401336
401391
|
metadata: {
|
|
@@ -401340,7 +401395,7 @@ var init_approvalModeStrategy = __esm({
|
|
|
401340
401395
|
}
|
|
401341
401396
|
};
|
|
401342
401397
|
} else if (approvedPlanPath) {
|
|
401343
|
-
const flashModel = resolveClassifierModel(model, GEMINI_MODEL_ALIAS_FLASH, useGemini3_1, useCustomToolModel, hasAccessToPreview, config2,
|
|
401398
|
+
const flashModel = resolveClassifierModel(model, GEMINI_MODEL_ALIAS_FLASH, useGemini3_1, useCustomToolModel, hasAccessToPreview, config2, useLatestFlash, useLatestFlashLite);
|
|
401344
401399
|
return {
|
|
401345
401400
|
model: flashModel,
|
|
401346
401401
|
metadata: {
|
|
@@ -401566,12 +401621,24 @@ var init_defaultModelConfigs = __esm({
|
|
|
401566
401621
|
model: "gemini-3.1-flash-lite"
|
|
401567
401622
|
}
|
|
401568
401623
|
},
|
|
401624
|
+
"gemini-3.5-flash-lite": {
|
|
401625
|
+
extends: "chat-base-3",
|
|
401626
|
+
modelConfig: {
|
|
401627
|
+
model: "gemini-3.5-flash-lite"
|
|
401628
|
+
}
|
|
401629
|
+
},
|
|
401569
401630
|
"gemini-3.5-flash": {
|
|
401570
401631
|
extends: "chat-base-3",
|
|
401571
401632
|
modelConfig: {
|
|
401572
401633
|
model: "gemini-3.5-flash"
|
|
401573
401634
|
}
|
|
401574
401635
|
},
|
|
401636
|
+
"gemini-3.8-flash": {
|
|
401637
|
+
extends: "chat-base-3",
|
|
401638
|
+
modelConfig: {
|
|
401639
|
+
model: "gemini-3.8-flash"
|
|
401640
|
+
}
|
|
401641
|
+
},
|
|
401575
401642
|
"gemma-4-31b-it": {
|
|
401576
401643
|
extends: "chat-base-3",
|
|
401577
401644
|
modelConfig: {
|
|
@@ -401782,6 +401849,13 @@ var init_defaultModelConfigs = __esm({
|
|
|
401782
401849
|
isVisible: true,
|
|
401783
401850
|
features: { thinking: false, multimodalToolUse: true }
|
|
401784
401851
|
},
|
|
401852
|
+
"gemini-3.5-flash-lite": {
|
|
401853
|
+
tier: "flash-lite",
|
|
401854
|
+
family: "gemini-3",
|
|
401855
|
+
isPreview: false,
|
|
401856
|
+
isVisible: true,
|
|
401857
|
+
features: { thinking: false, multimodalToolUse: true }
|
|
401858
|
+
},
|
|
401785
401859
|
"gemini-3.1-pro-preview": {
|
|
401786
401860
|
tier: "pro",
|
|
401787
401861
|
family: "gemini-3",
|
|
@@ -401817,6 +401891,13 @@ var init_defaultModelConfigs = __esm({
|
|
|
401817
401891
|
isVisible: true,
|
|
401818
401892
|
features: { thinking: false, multimodalToolUse: true }
|
|
401819
401893
|
},
|
|
401894
|
+
"gemini-3.8-flash": {
|
|
401895
|
+
tier: "flash",
|
|
401896
|
+
family: "gemini-3",
|
|
401897
|
+
isPreview: false,
|
|
401898
|
+
isVisible: true,
|
|
401899
|
+
features: { thinking: false, multimodalToolUse: true }
|
|
401900
|
+
},
|
|
401820
401901
|
"gemini-2.5-pro": {
|
|
401821
401902
|
tier: "pro",
|
|
401822
401903
|
family: "gemini-2.5",
|
|
@@ -401920,32 +402001,40 @@ var init_defaultModelConfigs = __esm({
|
|
|
401920
402001
|
default: "gemini-3-flash-preview",
|
|
401921
402002
|
contexts: [
|
|
401922
402003
|
{
|
|
401923
|
-
condition: { hasAccessToPreview: false,
|
|
401924
|
-
target:
|
|
402004
|
+
condition: { hasAccessToPreview: false, useLatestFlash: true },
|
|
402005
|
+
target: LATEST_GEMINI_FLASH_MODEL
|
|
401925
402006
|
},
|
|
401926
402007
|
{
|
|
401927
|
-
condition: { hasAccessToPreview: false,
|
|
401928
|
-
target:
|
|
402008
|
+
condition: { hasAccessToPreview: false, useLatestFlash: false },
|
|
402009
|
+
target: BASE_GEMINI_FLASH_MODEL
|
|
401929
402010
|
}
|
|
401930
402011
|
]
|
|
401931
402012
|
},
|
|
401932
|
-
|
|
401933
|
-
default:
|
|
402013
|
+
[BASE_GEMINI_FLASH_MODEL]: {
|
|
402014
|
+
default: BASE_GEMINI_FLASH_MODEL,
|
|
401934
402015
|
contexts: [
|
|
401935
402016
|
{
|
|
401936
|
-
condition: {
|
|
401937
|
-
target:
|
|
401938
|
-
}
|
|
402017
|
+
condition: { useLatestFlash: true },
|
|
402018
|
+
target: LATEST_GEMINI_FLASH_MODEL
|
|
402019
|
+
}
|
|
402020
|
+
]
|
|
402021
|
+
},
|
|
402022
|
+
[LATEST_GEMINI_FLASH_MODEL]: {
|
|
402023
|
+
default: LATEST_GEMINI_FLASH_MODEL,
|
|
402024
|
+
contexts: [
|
|
401939
402025
|
{
|
|
401940
|
-
condition: {
|
|
401941
|
-
target:
|
|
402026
|
+
condition: { useLatestFlash: false },
|
|
402027
|
+
target: BASE_GEMINI_FLASH_MODEL
|
|
401942
402028
|
}
|
|
401943
402029
|
]
|
|
401944
402030
|
},
|
|
401945
402031
|
"gemini-2.5-flash": {
|
|
401946
402032
|
default: "gemini-2.5-flash",
|
|
401947
402033
|
contexts: [
|
|
401948
|
-
{
|
|
402034
|
+
{
|
|
402035
|
+
condition: { useLatestFlash: true },
|
|
402036
|
+
target: LATEST_GEMINI_FLASH_MODEL
|
|
402037
|
+
}
|
|
401949
402038
|
]
|
|
401950
402039
|
},
|
|
401951
402040
|
"gemini-3-pro-preview": {
|
|
@@ -401990,21 +402079,45 @@ var init_defaultModelConfigs = __esm({
|
|
|
401990
402079
|
}
|
|
401991
402080
|
]
|
|
401992
402081
|
},
|
|
401993
|
-
|
|
401994
|
-
default:
|
|
402082
|
+
[BASE_GEMINI_FLASH_LITE_MODEL]: {
|
|
402083
|
+
default: BASE_GEMINI_FLASH_LITE_MODEL,
|
|
402084
|
+
contexts: [
|
|
402085
|
+
{
|
|
402086
|
+
condition: { useLatestFlashLite: true },
|
|
402087
|
+
target: LATEST_GEMINI_FLASH_LITE_MODEL
|
|
402088
|
+
}
|
|
402089
|
+
]
|
|
402090
|
+
},
|
|
402091
|
+
[LATEST_GEMINI_FLASH_LITE_MODEL]: {
|
|
402092
|
+
default: LATEST_GEMINI_FLASH_LITE_MODEL,
|
|
402093
|
+
contexts: [
|
|
402094
|
+
{
|
|
402095
|
+
condition: { useLatestFlashLite: false },
|
|
402096
|
+
target: BASE_GEMINI_FLASH_LITE_MODEL
|
|
402097
|
+
}
|
|
402098
|
+
]
|
|
401995
402099
|
},
|
|
401996
402100
|
flash: {
|
|
401997
402101
|
default: "gemini-3-flash-preview",
|
|
401998
402102
|
contexts: [
|
|
401999
|
-
{
|
|
402103
|
+
{
|
|
402104
|
+
condition: { useLatestFlash: true },
|
|
402105
|
+
target: LATEST_GEMINI_FLASH_MODEL
|
|
402106
|
+
},
|
|
402000
402107
|
{
|
|
402001
402108
|
condition: { hasAccessToPreview: false },
|
|
402002
|
-
target:
|
|
402109
|
+
target: BASE_GEMINI_FLASH_MODEL
|
|
402003
402110
|
}
|
|
402004
402111
|
]
|
|
402005
402112
|
},
|
|
402006
402113
|
"flash-lite": {
|
|
402007
|
-
default:
|
|
402114
|
+
default: BASE_GEMINI_FLASH_LITE_MODEL,
|
|
402115
|
+
contexts: [
|
|
402116
|
+
{
|
|
402117
|
+
condition: { useLatestFlashLite: true },
|
|
402118
|
+
target: LATEST_GEMINI_FLASH_LITE_MODEL
|
|
402119
|
+
}
|
|
402120
|
+
]
|
|
402008
402121
|
},
|
|
402009
402122
|
"auto-gemini-3": {
|
|
402010
402123
|
default: "gemini-3-pro-preview",
|
|
@@ -402028,14 +402141,17 @@ var init_defaultModelConfigs = __esm({
|
|
|
402028
402141
|
flash: {
|
|
402029
402142
|
default: "gemini-3-flash-preview",
|
|
402030
402143
|
contexts: [
|
|
402031
|
-
{
|
|
402144
|
+
{
|
|
402145
|
+
condition: { useLatestFlash: true },
|
|
402146
|
+
target: LATEST_GEMINI_FLASH_MODEL
|
|
402147
|
+
},
|
|
402032
402148
|
{
|
|
402033
402149
|
condition: { hasAccessToPreview: false },
|
|
402034
|
-
target:
|
|
402150
|
+
target: BASE_GEMINI_FLASH_MODEL
|
|
402035
402151
|
},
|
|
402036
402152
|
{
|
|
402037
402153
|
condition: { requestedModels: ["gemini-2.5-pro", "auto-gemini-2.5"] },
|
|
402038
|
-
target:
|
|
402154
|
+
target: BASE_GEMINI_FLASH_MODEL
|
|
402039
402155
|
}
|
|
402040
402156
|
]
|
|
402041
402157
|
},
|
|
@@ -402133,7 +402249,7 @@ var init_defaultModelConfigs = __esm({
|
|
|
402133
402249
|
],
|
|
402134
402250
|
default: [
|
|
402135
402251
|
{
|
|
402136
|
-
model:
|
|
402252
|
+
model: DEFAULT_GEMINI_MODEL,
|
|
402137
402253
|
actions: {
|
|
402138
402254
|
terminal: "prompt",
|
|
402139
402255
|
transient: "prompt",
|
|
@@ -402148,7 +402264,7 @@ var init_defaultModelConfigs = __esm({
|
|
|
402148
402264
|
}
|
|
402149
402265
|
},
|
|
402150
402266
|
{
|
|
402151
|
-
model:
|
|
402267
|
+
model: BASE_GEMINI_FLASH_MODEL,
|
|
402152
402268
|
isLastResort: true,
|
|
402153
402269
|
maxAttempts: 10,
|
|
402154
402270
|
actions: {
|
|
@@ -402167,7 +402283,7 @@ var init_defaultModelConfigs = __esm({
|
|
|
402167
402283
|
],
|
|
402168
402284
|
"auto-default": [
|
|
402169
402285
|
{
|
|
402170
|
-
model:
|
|
402286
|
+
model: DEFAULT_GEMINI_MODEL,
|
|
402171
402287
|
maxAttempts: 3,
|
|
402172
402288
|
actions: {
|
|
402173
402289
|
terminal: "prompt",
|
|
@@ -402183,7 +402299,7 @@ var init_defaultModelConfigs = __esm({
|
|
|
402183
402299
|
}
|
|
402184
402300
|
},
|
|
402185
402301
|
{
|
|
402186
|
-
model:
|
|
402302
|
+
model: BASE_GEMINI_FLASH_MODEL,
|
|
402187
402303
|
isLastResort: true,
|
|
402188
402304
|
maxAttempts: 10,
|
|
402189
402305
|
actions: {
|
|
@@ -402202,7 +402318,7 @@ var init_defaultModelConfigs = __esm({
|
|
|
402202
402318
|
],
|
|
402203
402319
|
lite: [
|
|
402204
402320
|
{
|
|
402205
|
-
model:
|
|
402321
|
+
model: BASE_GEMINI_FLASH_LITE_MODEL,
|
|
402206
402322
|
actions: {
|
|
402207
402323
|
terminal: "silent",
|
|
402208
402324
|
transient: "silent",
|
|
@@ -402217,7 +402333,7 @@ var init_defaultModelConfigs = __esm({
|
|
|
402217
402333
|
}
|
|
402218
402334
|
},
|
|
402219
402335
|
{
|
|
402220
|
-
model:
|
|
402336
|
+
model: BASE_GEMINI_FLASH_MODEL,
|
|
402221
402337
|
actions: {
|
|
402222
402338
|
terminal: "silent",
|
|
402223
402339
|
transient: "silent",
|
|
@@ -402232,7 +402348,7 @@ var init_defaultModelConfigs = __esm({
|
|
|
402232
402348
|
}
|
|
402233
402349
|
},
|
|
402234
402350
|
{
|
|
402235
|
-
model:
|
|
402351
|
+
model: DEFAULT_GEMINI_MODEL,
|
|
402236
402352
|
isLastResort: true,
|
|
402237
402353
|
actions: {
|
|
402238
402354
|
terminal: "silent",
|
|
@@ -405620,6 +405736,9 @@ var init_flagNames = __esm({
|
|
|
405620
405736
|
GEMINI_3_1_PRO_LAUNCHED: 45760185,
|
|
405621
405737
|
PRO_MODEL_NO_ACCESS: 45768879,
|
|
405622
405738
|
DEFAULT_REQUEST_TIMEOUT: 45773134,
|
|
405739
|
+
LATEST_FLASH_GA_LAUNCHED: 45842815,
|
|
405740
|
+
LATEST_FLASH_LITE_GA_LAUNCHED: 45827489,
|
|
405741
|
+
/** @deprecated Use LATEST_FLASH_GA_LAUNCHED */
|
|
405623
405742
|
GEMINI_3_5_FLASH_GA_LAUNCHED: 45780819
|
|
405624
405743
|
};
|
|
405625
405744
|
}
|
|
@@ -416944,7 +417063,7 @@ var init_config4 = __esm({
|
|
|
416944
417063
|
if (!isAutoModel(model, this)) {
|
|
416945
417064
|
return {};
|
|
416946
417065
|
}
|
|
416947
|
-
const primaryModel = resolveModel(model, this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this, this.
|
|
417066
|
+
const primaryModel = resolveModel(model, this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this, this.hasLatestFlashGAAccess(), this.hasLatestFlashLiteGAAccess());
|
|
416948
417067
|
const isPreview = isPreviewModel(primaryModel, this);
|
|
416949
417068
|
const proModel = primaryModel;
|
|
416950
417069
|
const flashModel = isPreview ? PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
|
|
@@ -416965,7 +417084,7 @@ var init_config4 = __esm({
|
|
|
416965
417084
|
if (pooled.remaining !== void 0) {
|
|
416966
417085
|
return pooled.remaining;
|
|
416967
417086
|
}
|
|
416968
|
-
const primaryModel = resolveModel(this.getModel(), this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this, this.
|
|
417087
|
+
const primaryModel = resolveModel(this.getModel(), this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this, this.hasLatestFlashGAAccess(), this.hasLatestFlashLiteGAAccess());
|
|
416969
417088
|
return this.modelQuotas.get(primaryModel)?.remaining;
|
|
416970
417089
|
}
|
|
416971
417090
|
getQuotaLimit() {
|
|
@@ -416973,7 +417092,7 @@ var init_config4 = __esm({
|
|
|
416973
417092
|
if (pooled.limit !== void 0) {
|
|
416974
417093
|
return pooled.limit;
|
|
416975
417094
|
}
|
|
416976
|
-
const primaryModel = resolveModel(this.getModel(), this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this, this.
|
|
417095
|
+
const primaryModel = resolveModel(this.getModel(), this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this, this.hasLatestFlashGAAccess(), this.hasLatestFlashLiteGAAccess());
|
|
416977
417096
|
return this.modelQuotas.get(primaryModel)?.limit;
|
|
416978
417097
|
}
|
|
416979
417098
|
getQuotaResetTime() {
|
|
@@ -416981,7 +417100,7 @@ var init_config4 = __esm({
|
|
|
416981
417100
|
if (pooled.resetTime !== void 0) {
|
|
416982
417101
|
return pooled.resetTime;
|
|
416983
417102
|
}
|
|
416984
|
-
const primaryModel = resolveModel(this.getModel(), this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this, this.
|
|
417103
|
+
const primaryModel = resolveModel(this.getModel(), this.getGemini31LaunchedSync(), this.getUseCustomToolModelSync(), this.getHasAccessToPreviewModel(), this, this.hasLatestFlashGAAccess(), this.hasLatestFlashLiteGAAccess());
|
|
416985
417104
|
return this.modelQuotas.get(primaryModel)?.resetTime;
|
|
416986
417105
|
}
|
|
416987
417106
|
getEmbeddingModel() {
|
|
@@ -417118,8 +417237,10 @@ var init_config4 = __esm({
|
|
|
417118
417237
|
continue;
|
|
417119
417238
|
}
|
|
417120
417239
|
let modelId = bucket.modelId;
|
|
417121
|
-
if (modelId ===
|
|
417122
|
-
modelId =
|
|
417240
|
+
if (modelId === LEGACY_CCPA_FLASH_MODEL || modelId === BASE_GEMINI_FLASH_MODEL || modelId === LATEST_GEMINI_FLASH_MODEL) {
|
|
417241
|
+
modelId = this.hasLatestFlashGAAccess() ? LATEST_GEMINI_FLASH_MODEL : BASE_GEMINI_FLASH_MODEL;
|
|
417242
|
+
} else if (modelId === BASE_GEMINI_FLASH_LITE_MODEL || modelId === LATEST_GEMINI_FLASH_LITE_MODEL) {
|
|
417243
|
+
modelId = this.hasLatestFlashLiteGAAccess() ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL;
|
|
417123
417244
|
}
|
|
417124
417245
|
let remaining;
|
|
417125
417246
|
let limit;
|
|
@@ -417979,29 +418100,45 @@ ${sections.join("\n")}
|
|
|
417979
418100
|
return authType === AuthType2.USE_GEMINI || authType === AuthType2.USE_VERTEX_AI || authType === AuthType2.GATEWAY;
|
|
417980
418101
|
}
|
|
417981
418102
|
/**
|
|
417982
|
-
* Returns whether Gemini 3.
|
|
417983
|
-
*
|
|
417984
|
-
* Note: This method should only be called after startup, once experiments have been loaded.
|
|
418103
|
+
* Returns whether the latest Flash GA model (currently Gemini 3.8 Flash) has been launched.
|
|
417985
418104
|
*/
|
|
417986
|
-
|
|
418105
|
+
hasLatestFlashGAAccess() {
|
|
417987
418106
|
const authType = this.contentGeneratorConfig?.authType;
|
|
417988
418107
|
const hasAccess = (() => {
|
|
417989
418108
|
if (this.isGemini31LaunchedForAuthType(authType)) {
|
|
417990
418109
|
return true;
|
|
417991
418110
|
}
|
|
417992
|
-
return this.experiments?.flags[ExperimentFlags.
|
|
418111
|
+
return this.experiments?.flags[ExperimentFlags.LATEST_FLASH_GA_LAUNCHED]?.boolValue ?? false;
|
|
417993
418112
|
})();
|
|
417994
418113
|
if (hasAccess) {
|
|
417995
418114
|
if (authType === AuthType2.USE_GEMINI) {
|
|
417996
|
-
setFlashModels("gemini-3-flash-preview",
|
|
418115
|
+
setFlashModels("gemini-3-flash-preview", LATEST_GEMINI_FLASH_MODEL);
|
|
417997
418116
|
} else {
|
|
417998
|
-
setFlashModels(
|
|
418117
|
+
setFlashModels(LATEST_GEMINI_FLASH_MODEL, LATEST_GEMINI_FLASH_MODEL);
|
|
417999
418118
|
}
|
|
418000
418119
|
} else {
|
|
418001
|
-
setFlashModels("gemini-3-flash-preview",
|
|
418120
|
+
setFlashModels("gemini-3-flash-preview", BASE_GEMINI_FLASH_MODEL);
|
|
418002
418121
|
}
|
|
418003
418122
|
return hasAccess;
|
|
418004
418123
|
}
|
|
418124
|
+
/** @deprecated Use hasLatestFlashGAAccess() */
|
|
418125
|
+
hasGemini35FlashGAAccess() {
|
|
418126
|
+
return this.hasLatestFlashGAAccess();
|
|
418127
|
+
}
|
|
418128
|
+
/**
|
|
418129
|
+
* Returns whether the latest Flash Lite GA model (currently Gemini 3.5 Flash Lite) has been launched.
|
|
418130
|
+
*/
|
|
418131
|
+
hasLatestFlashLiteGAAccess() {
|
|
418132
|
+
const authType = this.contentGeneratorConfig?.authType;
|
|
418133
|
+
const hasAccess = (() => {
|
|
418134
|
+
if (this.isGemini31LaunchedForAuthType(authType)) {
|
|
418135
|
+
return true;
|
|
418136
|
+
}
|
|
418137
|
+
return this.experiments?.flags[ExperimentFlags.LATEST_FLASH_LITE_GA_LAUNCHED]?.boolValue ?? false;
|
|
418138
|
+
})();
|
|
418139
|
+
setFlashLiteModel(hasAccess ? LATEST_GEMINI_FLASH_LITE_MODEL : BASE_GEMINI_FLASH_LITE_MODEL);
|
|
418140
|
+
return hasAccess;
|
|
418141
|
+
}
|
|
418005
418142
|
/**
|
|
418006
418143
|
* Returns whether Gemini 3.1 has been launched.
|
|
418007
418144
|
*
|
|
@@ -418394,6 +418531,8 @@ ${sections.join("\n")}
|
|
|
418394
418531
|
compact: false
|
|
418395
418532
|
});
|
|
418396
418533
|
debugLogger.debug("Experiments loaded", summaryString);
|
|
418534
|
+
this.hasLatestFlashGAAccess();
|
|
418535
|
+
this.hasLatestFlashLiteGAAccess();
|
|
418397
418536
|
}
|
|
418398
418537
|
onAgentsRefreshed = async () => {
|
|
418399
418538
|
const client = this.geminiClient;
|