@gullabs/google 0.12.1 → 0.13.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/README.md +38 -6
- package/dist/index.cjs +826 -331
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -41
- package/dist/index.d.ts +41 -41
- package/dist/index.js +825 -331
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -153,11 +153,22 @@ function isGoogleTransportError(rawErr) {
|
|
|
153
153
|
}
|
|
154
154
|
return false;
|
|
155
155
|
}
|
|
156
|
+
function isGoogleModelNotFound(rawErr) {
|
|
157
|
+
if (!(rawErr instanceof Error)) return false;
|
|
158
|
+
if (rawErr.status !== 404) return false;
|
|
159
|
+
try {
|
|
160
|
+
const parsed = JSON.parse(rawErr.message);
|
|
161
|
+
return parsed.error?.code === 404 && parsed.error.status === "NOT_FOUND";
|
|
162
|
+
} catch {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
156
166
|
function classifyGoogleError(rawErr, extra) {
|
|
157
167
|
const base = core.classifyError(rawErr);
|
|
158
168
|
const reclassifyAsTransport = base.kind === "unknown" && isGoogleTransportError(rawErr);
|
|
169
|
+
const reclassifyAsBadRequest = base.kind === "unknown" && isGoogleModelNotFound(rawErr);
|
|
159
170
|
return new core.LlmError(base.message, {
|
|
160
|
-
kind: reclassifyAsTransport ? "server" : base.kind,
|
|
171
|
+
kind: reclassifyAsTransport ? "server" : reclassifyAsBadRequest ? "bad_request" : base.kind,
|
|
161
172
|
retryable: reclassifyAsTransport ? true : base.retryable,
|
|
162
173
|
...base.httpStatus !== void 0 ? { httpStatus: base.httpStatus } : {},
|
|
163
174
|
...base.retryAfterMs !== void 0 ? { retryAfterMs: base.retryAfterMs } : {},
|
|
@@ -195,19 +206,6 @@ var RESERVED_GOOGLE_PROVIDER_OPTION_KEYS = /* @__PURE__ */ new Set([
|
|
|
195
206
|
"topP",
|
|
196
207
|
"_responseJsonSchema"
|
|
197
208
|
]);
|
|
198
|
-
var GOOGLE_SEARCH_SUPPORTED_MODELS = /* @__PURE__ */ new Set([
|
|
199
|
-
"gemini-2.5-flash",
|
|
200
|
-
"gemini-2.5-flash-lite",
|
|
201
|
-
"gemini-2.5-pro",
|
|
202
|
-
"gemini-3-flash-preview",
|
|
203
|
-
"gemini-3.1-flash-lite",
|
|
204
|
-
"gemini-3.1-pro-preview",
|
|
205
|
-
"gemini-3.5-flash"
|
|
206
|
-
]);
|
|
207
|
-
var STRUCTURED_OUTPUT_GOOGLE_SEARCH_ALLOWLIST = /* @__PURE__ */ new Set([
|
|
208
|
-
"gemini-3.1-pro-preview",
|
|
209
|
-
"gemini-3.5-flash"
|
|
210
|
-
]);
|
|
211
209
|
function isPlainRecord(value) {
|
|
212
210
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
213
211
|
}
|
|
@@ -275,7 +273,13 @@ function parseGoogleSafetySetting(setting, index, model) {
|
|
|
275
273
|
threshold: setting["threshold"]
|
|
276
274
|
};
|
|
277
275
|
}
|
|
278
|
-
function mapGoogleProviderOptions(
|
|
276
|
+
function mapGoogleProviderOptions({
|
|
277
|
+
googleOpts,
|
|
278
|
+
model,
|
|
279
|
+
structuredOutputRequested,
|
|
280
|
+
descriptorGrounding,
|
|
281
|
+
structuredOutputWithTools
|
|
282
|
+
}) {
|
|
279
283
|
if (googleOpts === void 0) {
|
|
280
284
|
return {};
|
|
281
285
|
}
|
|
@@ -366,15 +370,14 @@ function mapGoogleProviderOptions(googleOpts, model, structuredOutputRequested,
|
|
|
366
370
|
);
|
|
367
371
|
}
|
|
368
372
|
const tools = googleOpts["tools"].map((tool) => parseGoogleTool(tool, model));
|
|
369
|
-
|
|
370
|
-
if (!groundingSupported) {
|
|
373
|
+
if (descriptorGrounding !== true) {
|
|
371
374
|
throw badGoogleProviderOptions(
|
|
372
375
|
`providerOptions.google.tools is not supported for model "${model}".`
|
|
373
376
|
);
|
|
374
377
|
}
|
|
375
|
-
if (structuredOutputRequested &&
|
|
378
|
+
if (structuredOutputRequested && structuredOutputWithTools !== true) {
|
|
376
379
|
throw badGoogleProviderOptions(
|
|
377
|
-
`Structured output with googleSearch is supported
|
|
380
|
+
`Structured output with googleSearch is not supported for model "${model}".`
|
|
378
381
|
);
|
|
379
382
|
}
|
|
380
383
|
mapped.tools = tools;
|
|
@@ -528,6 +531,19 @@ function geminiAdapter(opts) {
|
|
|
528
531
|
}
|
|
529
532
|
const warnings = [];
|
|
530
533
|
const model = req.model;
|
|
534
|
+
const descriptor = req.modelDescriptor;
|
|
535
|
+
if (descriptor?.model !== model || descriptor.provider !== "google") {
|
|
536
|
+
throw new core.LlmError(`No matching Google model descriptor for "${model}".`, {
|
|
537
|
+
kind: "bad_request",
|
|
538
|
+
retryable: false
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
if (req.transientProviderState !== void 0) {
|
|
542
|
+
throw new core.LlmError(`Model "${model}" does not admit transientProviderState.`, {
|
|
543
|
+
kind: "bad_request",
|
|
544
|
+
retryable: false
|
|
545
|
+
});
|
|
546
|
+
}
|
|
531
547
|
const contents = mapMessagesToGeminiContents(req.messages);
|
|
532
548
|
const genConfig = req.config;
|
|
533
549
|
const config = {};
|
|
@@ -550,9 +566,9 @@ function geminiAdapter(opts) {
|
|
|
550
566
|
config.stopSequences = genConfig.stopSequences;
|
|
551
567
|
}
|
|
552
568
|
const explicit = genConfig.serviceTier;
|
|
553
|
-
const supported =
|
|
569
|
+
const supported = descriptor.capabilities?.serviceTiers;
|
|
554
570
|
if (explicit !== void 0) {
|
|
555
|
-
if (
|
|
571
|
+
if (supported === void 0 || !supported.includes(explicit)) {
|
|
556
572
|
throw new core.LlmError(
|
|
557
573
|
`serviceTier "${explicit}" is not supported for model "${model}".`,
|
|
558
574
|
{ kind: "bad_request", retryable: false }
|
|
@@ -562,7 +578,13 @@ function geminiAdapter(opts) {
|
|
|
562
578
|
}
|
|
563
579
|
const reasoning = genConfig.reasoning;
|
|
564
580
|
if (reasoning !== void 0) {
|
|
565
|
-
const reasoningApi =
|
|
581
|
+
const reasoningApi = descriptor.capabilities?.reasoningApi;
|
|
582
|
+
if (reasoning.effort === "max") {
|
|
583
|
+
throw new core.LlmError(
|
|
584
|
+
`reasoning.effort "max" is not supported for model "${model}".`,
|
|
585
|
+
{ kind: "bad_request", retryable: false }
|
|
586
|
+
);
|
|
587
|
+
}
|
|
566
588
|
if (reasoning.effort !== void 0 && reasoning.budgetTokens !== void 0) {
|
|
567
589
|
throw new core.LlmError(
|
|
568
590
|
`Provide either reasoning.effort or reasoning.budgetTokens, not both, for model "${model}".`,
|
|
@@ -570,6 +592,12 @@ function geminiAdapter(opts) {
|
|
|
570
592
|
);
|
|
571
593
|
}
|
|
572
594
|
if (reasoningApi === "budget") {
|
|
595
|
+
if (reasoning.effort === "none" && descriptor.capabilities?.admittedReasoningEfforts?.includes("none") !== true) {
|
|
596
|
+
throw new core.LlmError(
|
|
597
|
+
`reasoning.effort "none" is not supported for model "${model}".`,
|
|
598
|
+
{ kind: "bad_request", retryable: false }
|
|
599
|
+
);
|
|
600
|
+
}
|
|
573
601
|
if (reasoning.effort === "xhigh") {
|
|
574
602
|
throw new core.LlmError(
|
|
575
603
|
`reasoning.effort "xhigh" is not supported for model "${model}".`,
|
|
@@ -588,10 +616,18 @@ function geminiAdapter(opts) {
|
|
|
588
616
|
{ kind: "bad_request", retryable: false }
|
|
589
617
|
);
|
|
590
618
|
}
|
|
619
|
+
const admitted = descriptor.capabilities?.admittedReasoningEfforts;
|
|
620
|
+
const admitsNone = admitted?.includes("none") === true;
|
|
591
621
|
let thinkingLevel;
|
|
592
622
|
if (reasoning.effort !== void 0) {
|
|
593
623
|
switch (reasoning.effort) {
|
|
594
624
|
case "none":
|
|
625
|
+
if (!admitsNone) {
|
|
626
|
+
throw new core.LlmError(
|
|
627
|
+
`reasoning.effort "none" is not supported for model "${model}"; thinkingLevel MINIMAL is not emitted.`,
|
|
628
|
+
{ kind: "bad_request", retryable: false }
|
|
629
|
+
);
|
|
630
|
+
}
|
|
595
631
|
thinkingLevel = "MINIMAL";
|
|
596
632
|
break;
|
|
597
633
|
case "low":
|
|
@@ -605,7 +641,7 @@ function geminiAdapter(opts) {
|
|
|
605
641
|
break;
|
|
606
642
|
case "xhigh":
|
|
607
643
|
throw new core.LlmError(
|
|
608
|
-
`reasoning.effort "
|
|
644
|
+
`reasoning.effort "${reasoning.effort}" is not supported for model "${model}".`,
|
|
609
645
|
{ kind: "bad_request", retryable: false }
|
|
610
646
|
);
|
|
611
647
|
default:
|
|
@@ -625,18 +661,19 @@ function geminiAdapter(opts) {
|
|
|
625
661
|
}
|
|
626
662
|
const structuredOutputRequested = req.outputJsonSchema !== void 0;
|
|
627
663
|
if (structuredOutputRequested) {
|
|
628
|
-
const nativeStructuredOutput =
|
|
664
|
+
const nativeStructuredOutput = descriptor.capabilities?.nativeStructuredOutput !== false;
|
|
629
665
|
if (nativeStructuredOutput) {
|
|
630
666
|
config.responseMimeType = "application/json";
|
|
631
667
|
config.responseSchema = req.outputJsonSchema;
|
|
632
668
|
}
|
|
633
669
|
}
|
|
634
|
-
const googleProviderConfig = mapGoogleProviderOptions(
|
|
635
|
-
genConfig.providerOptions?.["google"],
|
|
670
|
+
const googleProviderConfig = mapGoogleProviderOptions({
|
|
671
|
+
googleOpts: genConfig.providerOptions?.["google"],
|
|
636
672
|
model,
|
|
637
673
|
structuredOutputRequested,
|
|
638
|
-
|
|
639
|
-
|
|
674
|
+
descriptorGrounding: descriptor.capabilities?.grounding,
|
|
675
|
+
structuredOutputWithTools: descriptor.capabilities?.structuredOutputWithTools
|
|
676
|
+
});
|
|
640
677
|
if (googleProviderConfig.cachedContent !== void 0) {
|
|
641
678
|
config.cachedContent = googleProviderConfig.cachedContent;
|
|
642
679
|
}
|
|
@@ -765,30 +802,46 @@ function geminiAdapter(opts) {
|
|
|
765
802
|
} finally {
|
|
766
803
|
clearTierTimeout();
|
|
767
804
|
}
|
|
805
|
+
const echoedTier = response.usageMetadata?.serviceTier;
|
|
806
|
+
if (typeof echoedTier === "string" && echoedTier.length > 0) {
|
|
807
|
+
if (config.serviceTier !== void 0 && echoedTier !== config.serviceTier) {
|
|
808
|
+
warnings.push({
|
|
809
|
+
type: "other",
|
|
810
|
+
message: `google: requested serviceTier "${config.serviceTier}" but provider served "${echoedTier}"; billing uses the served tier.`
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
servedServiceTier = echoedTier;
|
|
814
|
+
}
|
|
768
815
|
const hasBlockReason = response.promptFeedback?.blockReason !== void 0;
|
|
769
816
|
const hasCandidates = response.candidates !== void 0 && response.candidates.length > 0;
|
|
770
817
|
if (hasBlockReason || !hasCandidates) {
|
|
771
818
|
const reason = response.promptFeedback?.blockReason ?? "NO_CANDIDATES";
|
|
772
|
-
throw new core.LlmError(`Gemini response
|
|
773
|
-
kind: "content_filter",
|
|
774
|
-
retryable:
|
|
775
|
-
provider: "google"
|
|
819
|
+
throw new core.LlmError(`Gemini response has no usable candidate: ${reason}`, {
|
|
820
|
+
kind: hasBlockReason ? "content_filter" : "server",
|
|
821
|
+
retryable: !hasBlockReason,
|
|
822
|
+
provider: "google",
|
|
823
|
+
...response.usageMetadata !== void 0 ? { usage: mapUsage(response.usageMetadata) } : {},
|
|
824
|
+
...servedServiceTier !== void 0 ? { servedServiceTier } : {}
|
|
776
825
|
});
|
|
777
826
|
}
|
|
778
827
|
const candidates = response.candidates;
|
|
779
828
|
if (candidates === void 0 || candidates.length === 0) {
|
|
780
|
-
throw new core.LlmError("Gemini response
|
|
781
|
-
kind: "
|
|
782
|
-
retryable:
|
|
783
|
-
provider: "google"
|
|
829
|
+
throw new core.LlmError("Gemini response has no usable candidate: NO_CANDIDATES", {
|
|
830
|
+
kind: "server",
|
|
831
|
+
retryable: true,
|
|
832
|
+
provider: "google",
|
|
833
|
+
...response.usageMetadata !== void 0 ? { usage: mapUsage(response.usageMetadata) } : {},
|
|
834
|
+
...servedServiceTier !== void 0 ? { servedServiceTier } : {}
|
|
784
835
|
});
|
|
785
836
|
}
|
|
786
837
|
const candidate = candidates[0];
|
|
787
838
|
if (candidate === void 0) {
|
|
788
|
-
throw new core.LlmError("Gemini response
|
|
789
|
-
kind: "
|
|
790
|
-
retryable:
|
|
791
|
-
provider: "google"
|
|
839
|
+
throw new core.LlmError("Gemini response has no usable candidate: NO_CANDIDATES", {
|
|
840
|
+
kind: "server",
|
|
841
|
+
retryable: true,
|
|
842
|
+
provider: "google",
|
|
843
|
+
...response.usageMetadata !== void 0 ? { usage: mapUsage(response.usageMetadata) } : {},
|
|
844
|
+
...servedServiceTier !== void 0 ? { servedServiceTier } : {}
|
|
792
845
|
});
|
|
793
846
|
}
|
|
794
847
|
const parts = candidate.content?.parts ?? [];
|
|
@@ -919,89 +972,121 @@ function geminiAdapter(opts) {
|
|
|
919
972
|
}
|
|
920
973
|
|
|
921
974
|
// src/pricing.ts
|
|
922
|
-
var pricingVersion = "gemini-2026-
|
|
923
|
-
var
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
});
|
|
975
|
+
var pricingVersion = "gemini-2026-09-25";
|
|
976
|
+
var GEMINI_PRICED_TIERS = ["standard", "flex", "batch"];
|
|
977
|
+
function tiers(standard, flex, batch) {
|
|
978
|
+
return Object.freeze({ standard, flex, batch });
|
|
979
|
+
}
|
|
928
980
|
var GEMINI_PRICING = Object.freeze({
|
|
929
|
-
//
|
|
930
|
-
"gemini-2.5-pro":
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
inputPerM: 25e5,
|
|
936
|
-
|
|
937
|
-
|
|
981
|
+
// Gemini 2.5 Pro. Flex/batch cached equals standard on both context bands.
|
|
982
|
+
"gemini-2.5-pro": tiers(
|
|
983
|
+
{
|
|
984
|
+
inputPerM: 125e4,
|
|
985
|
+
cachedPerM: 125e3,
|
|
986
|
+
outputPerM: 1e7,
|
|
987
|
+
gt200k: { inputPerM: 25e5, cachedPerM: 25e4, outputPerM: 15e6 }
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
inputPerM: 625e3,
|
|
991
|
+
cachedPerM: 125e3,
|
|
992
|
+
outputPerM: 5e6,
|
|
993
|
+
gt200k: { inputPerM: 125e4, cachedPerM: 25e4, outputPerM: 75e5 }
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
inputPerM: 625e3,
|
|
997
|
+
cachedPerM: 125e3,
|
|
998
|
+
outputPerM: 5e6,
|
|
999
|
+
gt200k: { inputPerM: 125e4, cachedPerM: 25e4, outputPerM: 75e5 }
|
|
938
1000
|
}
|
|
939
|
-
|
|
940
|
-
//
|
|
941
|
-
"gemini-2.5-flash":
|
|
942
|
-
inputPerM: 3e5,
|
|
943
|
-
cachedPerM: 3e4,
|
|
944
|
-
outputPerM:
|
|
945
|
-
|
|
946
|
-
//
|
|
947
|
-
"gemini-2.5-flash-lite":
|
|
948
|
-
inputPerM: 1e5,
|
|
949
|
-
cachedPerM: 1e4,
|
|
950
|
-
outputPerM:
|
|
951
|
-
|
|
952
|
-
//
|
|
953
|
-
"gemini-3.
|
|
954
|
-
inputPerM: 15e5,
|
|
955
|
-
cachedPerM:
|
|
956
|
-
outputPerM:
|
|
957
|
-
|
|
958
|
-
//
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
cachedPerM:
|
|
962
|
-
outputPerM:
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
"gemini-3.
|
|
966
|
-
inputPerM:
|
|
967
|
-
cachedPerM:
|
|
968
|
-
outputPerM:
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1001
|
+
),
|
|
1002
|
+
// Gemini 2.5 Flash. Flex/batch cached stays $0.03.
|
|
1003
|
+
"gemini-2.5-flash": tiers(
|
|
1004
|
+
{ inputPerM: 3e5, cachedPerM: 3e4, outputPerM: 25e5 },
|
|
1005
|
+
{ inputPerM: 15e4, cachedPerM: 3e4, outputPerM: 125e4 },
|
|
1006
|
+
{ inputPerM: 15e4, cachedPerM: 3e4, outputPerM: 125e4 }
|
|
1007
|
+
),
|
|
1008
|
+
// Gemini 2.5 Flash-Lite. Flex/batch cached stays $0.01.
|
|
1009
|
+
"gemini-2.5-flash-lite": tiers(
|
|
1010
|
+
{ inputPerM: 1e5, cachedPerM: 1e4, outputPerM: 4e5 },
|
|
1011
|
+
{ inputPerM: 5e4, cachedPerM: 1e4, outputPerM: 2e5 },
|
|
1012
|
+
{ inputPerM: 5e4, cachedPerM: 1e4, outputPerM: 2e5 }
|
|
1013
|
+
),
|
|
1014
|
+
// Gemini 3.1 Flash-Lite. Flex/batch cached is the published $0.0125.
|
|
1015
|
+
"gemini-3.1-flash-lite": tiers(
|
|
1016
|
+
{ inputPerM: 25e4, cachedPerM: 25e3, outputPerM: 15e5 },
|
|
1017
|
+
{ inputPerM: 125e3, cachedPerM: 12500, outputPerM: 75e4 },
|
|
1018
|
+
{ inputPerM: 125e3, cachedPerM: 12500, outputPerM: 75e4 }
|
|
1019
|
+
),
|
|
1020
|
+
// Gemini 3.8 / 3.7 / 3.6 Flash intro rates (2026-09-25). Flex/batch cached
|
|
1021
|
+
// is half of the intro cached rate. Re-snapshot on 2027-01-01.
|
|
1022
|
+
"gemini-3.8-flash": tiers(
|
|
1023
|
+
{ inputPerM: 75e4, cachedPerM: 75e3, outputPerM: 375e4 },
|
|
1024
|
+
{ inputPerM: 375e3, cachedPerM: 37500, outputPerM: 1875e3 },
|
|
1025
|
+
{ inputPerM: 375e3, cachedPerM: 37500, outputPerM: 1875e3 }
|
|
1026
|
+
),
|
|
1027
|
+
"gemini-3.7-flash": tiers(
|
|
1028
|
+
{ inputPerM: 75e4, cachedPerM: 75e3, outputPerM: 375e4 },
|
|
1029
|
+
{ inputPerM: 375e3, cachedPerM: 37500, outputPerM: 1875e3 },
|
|
1030
|
+
{ inputPerM: 375e3, cachedPerM: 37500, outputPerM: 1875e3 }
|
|
1031
|
+
),
|
|
1032
|
+
"gemini-3.6-flash": tiers(
|
|
1033
|
+
{ inputPerM: 75e4, cachedPerM: 75e3, outputPerM: 375e4 },
|
|
1034
|
+
{ inputPerM: 375e3, cachedPerM: 37500, outputPerM: 1875e3 },
|
|
1035
|
+
{ inputPerM: 375e3, cachedPerM: 37500, outputPerM: 1875e3 }
|
|
1036
|
+
),
|
|
1037
|
+
// Gemini 3.5 Flash-Lite. Flex/batch cached is the published $0.02, not half of $0.03.
|
|
1038
|
+
"gemini-3.5-flash-lite": tiers(
|
|
1039
|
+
{ inputPerM: 3e5, cachedPerM: 3e4, outputPerM: 25e5 },
|
|
1040
|
+
{ inputPerM: 15e4, cachedPerM: 2e4, outputPerM: 125e4 },
|
|
1041
|
+
{ inputPerM: 15e4, cachedPerM: 2e4, outputPerM: 125e4 }
|
|
1042
|
+
),
|
|
1043
|
+
// Gemini 3.1 Pro Preview. Flex/batch cached equals standard on both bands.
|
|
1044
|
+
"gemini-3.1-pro-preview": tiers(
|
|
1045
|
+
{
|
|
1046
|
+
inputPerM: 2e6,
|
|
1047
|
+
cachedPerM: 2e5,
|
|
1048
|
+
outputPerM: 12e6,
|
|
1049
|
+
gt200k: { inputPerM: 4e6, cachedPerM: 4e5, outputPerM: 18e6 }
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
inputPerM: 1e6,
|
|
1053
|
+
cachedPerM: 2e5,
|
|
1054
|
+
outputPerM: 6e6,
|
|
1055
|
+
gt200k: { inputPerM: 2e6, cachedPerM: 4e5, outputPerM: 9e6 }
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
inputPerM: 1e6,
|
|
1059
|
+
cachedPerM: 2e5,
|
|
1060
|
+
outputPerM: 6e6,
|
|
1061
|
+
gt200k: { inputPerM: 2e6, cachedPerM: 4e5, outputPerM: 9e6 }
|
|
973
1062
|
}
|
|
974
|
-
|
|
975
|
-
// ── Gemini 3 Flash (preview) ── input $0.50, output $3.00, cached $0.05 (90% discount)
|
|
976
|
-
"gemini-3-flash-preview": {
|
|
977
|
-
inputPerM: 5e5,
|
|
978
|
-
cachedPerM: 5e4,
|
|
979
|
-
outputPerM: 3e6
|
|
980
|
-
}
|
|
1063
|
+
)
|
|
981
1064
|
});
|
|
1065
|
+
function isPricedGeminiTier(tier) {
|
|
1066
|
+
return GEMINI_PRICED_TIERS.includes(tier);
|
|
1067
|
+
}
|
|
1068
|
+
function lookupGeminiTierRates(model, tier) {
|
|
1069
|
+
const entry = Object.hasOwn(GEMINI_PRICING, model) ? GEMINI_PRICING[model] : void 0;
|
|
1070
|
+
if (entry === void 0) return void 0;
|
|
1071
|
+
if (tier !== void 0 && !isPricedGeminiTier(tier)) return void 0;
|
|
1072
|
+
return entry;
|
|
1073
|
+
}
|
|
1074
|
+
function resolveGeminiRates(model, tier) {
|
|
1075
|
+
const entry = lookupGeminiTierRates(model, tier);
|
|
1076
|
+
if (entry === void 0) return void 0;
|
|
1077
|
+
const key = tier ?? "standard";
|
|
1078
|
+
return entry[key];
|
|
1079
|
+
}
|
|
982
1080
|
|
|
983
1081
|
// src/cost.ts
|
|
984
|
-
function lookupRates(model) {
|
|
985
|
-
const exact = GEMINI_PRICING[model];
|
|
986
|
-
if (exact !== void 0) return exact;
|
|
987
|
-
let bestKey = "";
|
|
988
|
-
let bestRates;
|
|
989
|
-
for (const key of Object.keys(GEMINI_PRICING)) {
|
|
990
|
-
if (model.startsWith(key) && key.length > bestKey.length) {
|
|
991
|
-
bestKey = key;
|
|
992
|
-
bestRates = GEMINI_PRICING[key];
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
return bestRates;
|
|
996
|
-
}
|
|
997
1082
|
function geminiPricingSource() {
|
|
998
1083
|
return {
|
|
999
1084
|
version: pricingVersion,
|
|
1000
1085
|
price(model, usage, tier) {
|
|
1001
|
-
return core.computeCost(model, usage, tier,
|
|
1086
|
+
return core.computeCost(model, usage, tier, resolveGeminiRates, pricingVersion);
|
|
1002
1087
|
},
|
|
1003
1088
|
hasModel(model) {
|
|
1004
|
-
return
|
|
1089
|
+
return resolveGeminiRates(model, void 0) !== void 0;
|
|
1005
1090
|
},
|
|
1006
1091
|
listModels() {
|
|
1007
1092
|
return Object.keys(GEMINI_PRICING);
|
|
@@ -1704,25 +1789,25 @@ var Gemini25FlashLiteConfigSchema = zod.z.union([
|
|
|
1704
1789
|
description: "Strict generateContent config for model gemini-2.5-flash-lite. Budget reasoning, tunable sampling, flex/standard tiers, structured output, grounding, priced.",
|
|
1705
1790
|
examples: [{ serviceTier: "flex", temperature: 0.7, reasoning: { budgetTokens: 0 } }]
|
|
1706
1791
|
});
|
|
1707
|
-
var
|
|
1792
|
+
var Gemini31FlashLiteConfigSchema = zod.z.union([
|
|
1708
1793
|
zod.z.strictObject({
|
|
1709
1794
|
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
1710
1795
|
title: "Max Output Tokens",
|
|
1711
|
-
description: "Maximum output token cap for gemini-3.
|
|
1796
|
+
description: "Maximum output token cap for gemini-3.1-flash-lite."
|
|
1712
1797
|
}),
|
|
1713
1798
|
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
1714
1799
|
title: "Stop Sequences",
|
|
1715
|
-
description: "Up to five stop sequences for gemini-3.
|
|
1800
|
+
description: "Up to five stop sequences for gemini-3.1-flash-lite."
|
|
1716
1801
|
}),
|
|
1717
1802
|
serviceTier: zod.z.literal("flex").meta({
|
|
1718
1803
|
title: "Service Tier",
|
|
1719
|
-
description: "Explicit flex tier for gemini-3.
|
|
1804
|
+
description: "Explicit flex tier for gemini-3.1-flash-lite."
|
|
1720
1805
|
}),
|
|
1721
1806
|
reasoning: zod.z.union([
|
|
1722
1807
|
zod.z.strictObject({
|
|
1723
1808
|
effort: zod.z.enum(["none", "low", "medium", "high"]).meta({
|
|
1724
1809
|
title: "Reasoning Effort",
|
|
1725
|
-
description: "Reasoning effort for gemini-3.
|
|
1810
|
+
description: "Reasoning effort for gemini-3.1-flash-lite; none maps to minimal thinking."
|
|
1726
1811
|
}),
|
|
1727
1812
|
includeThoughts: zod.z.boolean().optional().meta({
|
|
1728
1813
|
title: "Include Thoughts",
|
|
@@ -1737,7 +1822,7 @@ var Gemini35FlashConfigSchema = zod.z.union([
|
|
|
1737
1822
|
})
|
|
1738
1823
|
]).optional().meta({
|
|
1739
1824
|
title: "Reasoning",
|
|
1740
|
-
description: "Gemini 3.
|
|
1825
|
+
description: "Gemini 3.1 Flash-Lite thinkingLevel configuration."
|
|
1741
1826
|
}),
|
|
1742
1827
|
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
1743
1828
|
title: "Timeout",
|
|
@@ -1773,7 +1858,7 @@ var Gemini35FlashConfigSchema = zod.z.union([
|
|
|
1773
1858
|
})
|
|
1774
1859
|
).min(1).optional().meta({
|
|
1775
1860
|
title: "Tools",
|
|
1776
|
-
description: "Allowlisted Google tools for gemini-3.
|
|
1861
|
+
description: "Allowlisted Google tools for gemini-3.1-flash-lite."
|
|
1777
1862
|
}),
|
|
1778
1863
|
httpOptions: zod.z.strictObject({
|
|
1779
1864
|
timeout: zod.z.number().int().positive().optional().meta({
|
|
@@ -1790,31 +1875,31 @@ var Gemini35FlashConfigSchema = zod.z.union([
|
|
|
1790
1875
|
})
|
|
1791
1876
|
}).optional().meta({
|
|
1792
1877
|
title: "Google Provider Options",
|
|
1793
|
-
description: "Allowlisted Google provider options for gemini-3.
|
|
1878
|
+
description: "Allowlisted Google provider options for gemini-3.1-flash-lite."
|
|
1794
1879
|
})
|
|
1795
1880
|
}).optional().meta({
|
|
1796
1881
|
title: "Provider Options",
|
|
1797
|
-
description: "Provider-specific options accepted for gemini-3.
|
|
1882
|
+
description: "Provider-specific options accepted for gemini-3.1-flash-lite."
|
|
1798
1883
|
})
|
|
1799
1884
|
}),
|
|
1800
1885
|
zod.z.strictObject({
|
|
1801
1886
|
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
1802
1887
|
title: "Max Output Tokens",
|
|
1803
|
-
description: "Maximum output token cap for gemini-3.
|
|
1888
|
+
description: "Maximum output token cap for gemini-3.1-flash-lite."
|
|
1804
1889
|
}),
|
|
1805
1890
|
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
1806
1891
|
title: "Stop Sequences",
|
|
1807
|
-
description: "Up to five stop sequences for gemini-3.
|
|
1892
|
+
description: "Up to five stop sequences for gemini-3.1-flash-lite."
|
|
1808
1893
|
}),
|
|
1809
1894
|
serviceTier: zod.z.literal("standard").optional().meta({
|
|
1810
1895
|
title: "Service Tier",
|
|
1811
|
-
description: "Standard tier or omitted tier for gemini-3.
|
|
1896
|
+
description: "Standard tier or omitted tier for gemini-3.1-flash-lite."
|
|
1812
1897
|
}),
|
|
1813
1898
|
reasoning: zod.z.union([
|
|
1814
1899
|
zod.z.strictObject({
|
|
1815
1900
|
effort: zod.z.enum(["none", "low", "medium", "high"]).meta({
|
|
1816
1901
|
title: "Reasoning Effort",
|
|
1817
|
-
description: "Reasoning effort for gemini-3.
|
|
1902
|
+
description: "Reasoning effort for gemini-3.1-flash-lite; none maps to minimal thinking."
|
|
1818
1903
|
}),
|
|
1819
1904
|
includeThoughts: zod.z.boolean().optional().meta({
|
|
1820
1905
|
title: "Include Thoughts",
|
|
@@ -1829,7 +1914,7 @@ var Gemini35FlashConfigSchema = zod.z.union([
|
|
|
1829
1914
|
})
|
|
1830
1915
|
]).optional().meta({
|
|
1831
1916
|
title: "Reasoning",
|
|
1832
|
-
description: "Gemini 3.
|
|
1917
|
+
description: "Gemini 3.1 Flash-Lite thinkingLevel configuration."
|
|
1833
1918
|
}),
|
|
1834
1919
|
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
1835
1920
|
title: "Timeout",
|
|
@@ -1865,7 +1950,7 @@ var Gemini35FlashConfigSchema = zod.z.union([
|
|
|
1865
1950
|
})
|
|
1866
1951
|
).min(1).optional().meta({
|
|
1867
1952
|
title: "Tools",
|
|
1868
|
-
description: "Allowlisted Google tools for gemini-3.
|
|
1953
|
+
description: "Allowlisted Google tools for gemini-3.1-flash-lite."
|
|
1869
1954
|
}),
|
|
1870
1955
|
httpOptions: zod.z.strictObject({
|
|
1871
1956
|
timeout: zod.z.number().int().positive().optional().meta({
|
|
@@ -1878,37 +1963,37 @@ var Gemini35FlashConfigSchema = zod.z.union([
|
|
|
1878
1963
|
})
|
|
1879
1964
|
}).optional().meta({
|
|
1880
1965
|
title: "Google Provider Options",
|
|
1881
|
-
description: "Allowlisted Google provider options for gemini-3.
|
|
1966
|
+
description: "Allowlisted Google provider options for gemini-3.1-flash-lite."
|
|
1882
1967
|
})
|
|
1883
1968
|
}).optional().meta({
|
|
1884
1969
|
title: "Provider Options",
|
|
1885
|
-
description: "Provider-specific options accepted for gemini-3.
|
|
1970
|
+
description: "Provider-specific options accepted for gemini-3.1-flash-lite."
|
|
1886
1971
|
})
|
|
1887
1972
|
})
|
|
1888
1973
|
]).meta({
|
|
1889
|
-
title: "
|
|
1890
|
-
description: "Strict generateContent config for model gemini-3.
|
|
1891
|
-
examples: [{ serviceTier: "flex", reasoning: { effort: "
|
|
1974
|
+
title: "Gemini31FlashLiteConfig",
|
|
1975
|
+
description: "Strict generateContent config for model gemini-3.1-flash-lite. Level reasoning, fixed sampling, flex/standard tiers, structured output, grounding, priced.",
|
|
1976
|
+
examples: [{ serviceTier: "flex", reasoning: { effort: "medium" } }]
|
|
1892
1977
|
});
|
|
1893
|
-
var
|
|
1978
|
+
var Gemini31ProPreviewConfigSchema = zod.z.union([
|
|
1894
1979
|
zod.z.strictObject({
|
|
1895
1980
|
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
1896
1981
|
title: "Max Output Tokens",
|
|
1897
|
-
description: "Maximum output token cap for gemini-3.1-
|
|
1982
|
+
description: "Maximum output token cap for gemini-3.1-pro-preview."
|
|
1898
1983
|
}),
|
|
1899
1984
|
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
1900
1985
|
title: "Stop Sequences",
|
|
1901
|
-
description: "Up to five stop sequences for gemini-3.1-
|
|
1986
|
+
description: "Up to five stop sequences for gemini-3.1-pro-preview."
|
|
1902
1987
|
}),
|
|
1903
1988
|
serviceTier: zod.z.literal("flex").meta({
|
|
1904
1989
|
title: "Service Tier",
|
|
1905
|
-
description: "Explicit flex tier for gemini-3.1-
|
|
1990
|
+
description: "Explicit flex tier for gemini-3.1-pro-preview."
|
|
1906
1991
|
}),
|
|
1907
1992
|
reasoning: zod.z.union([
|
|
1908
1993
|
zod.z.strictObject({
|
|
1909
|
-
effort: zod.z.enum(["
|
|
1994
|
+
effort: zod.z.enum(["low", "medium", "high"]).meta({
|
|
1910
1995
|
title: "Reasoning Effort",
|
|
1911
|
-
description: "Reasoning effort for gemini-3.1-
|
|
1996
|
+
description: "Reasoning effort for gemini-3.1-pro-preview. Thinking off is not supported."
|
|
1912
1997
|
}),
|
|
1913
1998
|
includeThoughts: zod.z.boolean().optional().meta({
|
|
1914
1999
|
title: "Include Thoughts",
|
|
@@ -1923,7 +2008,7 @@ var Gemini31FlashLiteConfigSchema = zod.z.union([
|
|
|
1923
2008
|
})
|
|
1924
2009
|
]).optional().meta({
|
|
1925
2010
|
title: "Reasoning",
|
|
1926
|
-
description: "Gemini 3.1
|
|
2011
|
+
description: "Gemini 3.1 Pro Preview thinkingLevel configuration."
|
|
1927
2012
|
}),
|
|
1928
2013
|
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
1929
2014
|
title: "Timeout",
|
|
@@ -1959,7 +2044,7 @@ var Gemini31FlashLiteConfigSchema = zod.z.union([
|
|
|
1959
2044
|
})
|
|
1960
2045
|
).min(1).optional().meta({
|
|
1961
2046
|
title: "Tools",
|
|
1962
|
-
description: "Allowlisted Google tools for gemini-3.1-
|
|
2047
|
+
description: "Allowlisted Google tools for gemini-3.1-pro-preview."
|
|
1963
2048
|
}),
|
|
1964
2049
|
httpOptions: zod.z.strictObject({
|
|
1965
2050
|
timeout: zod.z.number().int().positive().optional().meta({
|
|
@@ -1976,31 +2061,31 @@ var Gemini31FlashLiteConfigSchema = zod.z.union([
|
|
|
1976
2061
|
})
|
|
1977
2062
|
}).optional().meta({
|
|
1978
2063
|
title: "Google Provider Options",
|
|
1979
|
-
description: "Allowlisted Google provider options for gemini-3.1-
|
|
2064
|
+
description: "Allowlisted Google provider options for gemini-3.1-pro-preview."
|
|
1980
2065
|
})
|
|
1981
2066
|
}).optional().meta({
|
|
1982
2067
|
title: "Provider Options",
|
|
1983
|
-
description: "Provider-specific options accepted for gemini-3.1-
|
|
2068
|
+
description: "Provider-specific options accepted for gemini-3.1-pro-preview."
|
|
1984
2069
|
})
|
|
1985
2070
|
}),
|
|
1986
2071
|
zod.z.strictObject({
|
|
1987
2072
|
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
1988
2073
|
title: "Max Output Tokens",
|
|
1989
|
-
description: "Maximum output token cap for gemini-3.1-
|
|
2074
|
+
description: "Maximum output token cap for gemini-3.1-pro-preview."
|
|
1990
2075
|
}),
|
|
1991
2076
|
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
1992
2077
|
title: "Stop Sequences",
|
|
1993
|
-
description: "Up to five stop sequences for gemini-3.1-
|
|
2078
|
+
description: "Up to five stop sequences for gemini-3.1-pro-preview."
|
|
1994
2079
|
}),
|
|
1995
2080
|
serviceTier: zod.z.literal("standard").optional().meta({
|
|
1996
2081
|
title: "Service Tier",
|
|
1997
|
-
description: "Standard tier or omitted tier for gemini-3.1-
|
|
2082
|
+
description: "Standard tier or omitted tier for gemini-3.1-pro-preview."
|
|
1998
2083
|
}),
|
|
1999
2084
|
reasoning: zod.z.union([
|
|
2000
2085
|
zod.z.strictObject({
|
|
2001
|
-
effort: zod.z.enum(["
|
|
2086
|
+
effort: zod.z.enum(["low", "medium", "high"]).meta({
|
|
2002
2087
|
title: "Reasoning Effort",
|
|
2003
|
-
description: "Reasoning effort for gemini-3.1-
|
|
2088
|
+
description: "Reasoning effort for gemini-3.1-pro-preview. Thinking off is not supported."
|
|
2004
2089
|
}),
|
|
2005
2090
|
includeThoughts: zod.z.boolean().optional().meta({
|
|
2006
2091
|
title: "Include Thoughts",
|
|
@@ -2015,7 +2100,7 @@ var Gemini31FlashLiteConfigSchema = zod.z.union([
|
|
|
2015
2100
|
})
|
|
2016
2101
|
]).optional().meta({
|
|
2017
2102
|
title: "Reasoning",
|
|
2018
|
-
description: "Gemini 3.1
|
|
2103
|
+
description: "Gemini 3.1 Pro Preview thinkingLevel configuration."
|
|
2019
2104
|
}),
|
|
2020
2105
|
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
2021
2106
|
title: "Timeout",
|
|
@@ -2051,7 +2136,7 @@ var Gemini31FlashLiteConfigSchema = zod.z.union([
|
|
|
2051
2136
|
})
|
|
2052
2137
|
).min(1).optional().meta({
|
|
2053
2138
|
title: "Tools",
|
|
2054
|
-
description: "Allowlisted Google tools for gemini-3.1-
|
|
2139
|
+
description: "Allowlisted Google tools for gemini-3.1-pro-preview."
|
|
2055
2140
|
}),
|
|
2056
2141
|
httpOptions: zod.z.strictObject({
|
|
2057
2142
|
timeout: zod.z.number().int().positive().optional().meta({
|
|
@@ -2064,37 +2149,37 @@ var Gemini31FlashLiteConfigSchema = zod.z.union([
|
|
|
2064
2149
|
})
|
|
2065
2150
|
}).optional().meta({
|
|
2066
2151
|
title: "Google Provider Options",
|
|
2067
|
-
description: "Allowlisted Google provider options for gemini-3.1-
|
|
2152
|
+
description: "Allowlisted Google provider options for gemini-3.1-pro-preview."
|
|
2068
2153
|
})
|
|
2069
2154
|
}).optional().meta({
|
|
2070
2155
|
title: "Provider Options",
|
|
2071
|
-
description: "Provider-specific options accepted for gemini-3.1-
|
|
2156
|
+
description: "Provider-specific options accepted for gemini-3.1-pro-preview."
|
|
2072
2157
|
})
|
|
2073
2158
|
})
|
|
2074
2159
|
]).meta({
|
|
2075
|
-
title: "
|
|
2076
|
-
description: "Strict generateContent config for model gemini-3.1-
|
|
2077
|
-
examples: [{ serviceTier: "flex", reasoning: { effort: "
|
|
2160
|
+
title: "Gemini31ProPreviewConfig",
|
|
2161
|
+
description: "Strict generateContent config for model gemini-3.1-pro-preview. Level reasoning, fixed sampling, flex/standard tiers, structured output, grounding, priced.",
|
|
2162
|
+
examples: [{ serviceTier: "flex", reasoning: { effort: "high" } }]
|
|
2078
2163
|
});
|
|
2079
|
-
var
|
|
2164
|
+
var Gemini35FlashLiteConfigSchema = zod.z.union([
|
|
2080
2165
|
zod.z.strictObject({
|
|
2081
2166
|
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
2082
2167
|
title: "Max Output Tokens",
|
|
2083
|
-
description: "Maximum output token cap for gemini-3.
|
|
2168
|
+
description: "Maximum output token cap for gemini-3.5-flash-lite."
|
|
2084
2169
|
}),
|
|
2085
2170
|
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
2086
2171
|
title: "Stop Sequences",
|
|
2087
|
-
description: "Up to five stop sequences for gemini-3.
|
|
2172
|
+
description: "Up to five stop sequences for gemini-3.5-flash-lite."
|
|
2088
2173
|
}),
|
|
2089
2174
|
serviceTier: zod.z.literal("flex").meta({
|
|
2090
2175
|
title: "Service Tier",
|
|
2091
|
-
description: "Explicit flex tier for gemini-3.
|
|
2176
|
+
description: "Explicit flex tier for gemini-3.5-flash-lite."
|
|
2092
2177
|
}),
|
|
2093
2178
|
reasoning: zod.z.union([
|
|
2094
2179
|
zod.z.strictObject({
|
|
2095
|
-
effort: zod.z.enum(["low", "medium", "high"]).meta({
|
|
2180
|
+
effort: zod.z.enum(["none", "low", "medium", "high"]).meta({
|
|
2096
2181
|
title: "Reasoning Effort",
|
|
2097
|
-
description: "Reasoning effort for gemini-3.
|
|
2182
|
+
description: "Reasoning effort for gemini-3.5-flash-lite; none maps to minimal thinking."
|
|
2098
2183
|
}),
|
|
2099
2184
|
includeThoughts: zod.z.boolean().optional().meta({
|
|
2100
2185
|
title: "Include Thoughts",
|
|
@@ -2109,7 +2194,7 @@ var Gemini31ProPreviewConfigSchema = zod.z.union([
|
|
|
2109
2194
|
})
|
|
2110
2195
|
]).optional().meta({
|
|
2111
2196
|
title: "Reasoning",
|
|
2112
|
-
description: "Gemini 3.
|
|
2197
|
+
description: "Gemini 3.5 Flash-Lite thinkingLevel configuration."
|
|
2113
2198
|
}),
|
|
2114
2199
|
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
2115
2200
|
title: "Timeout",
|
|
@@ -2145,7 +2230,7 @@ var Gemini31ProPreviewConfigSchema = zod.z.union([
|
|
|
2145
2230
|
})
|
|
2146
2231
|
).min(1).optional().meta({
|
|
2147
2232
|
title: "Tools",
|
|
2148
|
-
description: "Allowlisted Google tools for gemini-3.
|
|
2233
|
+
description: "Allowlisted Google tools for gemini-3.5-flash-lite."
|
|
2149
2234
|
}),
|
|
2150
2235
|
httpOptions: zod.z.strictObject({
|
|
2151
2236
|
timeout: zod.z.number().int().positive().optional().meta({
|
|
@@ -2162,31 +2247,31 @@ var Gemini31ProPreviewConfigSchema = zod.z.union([
|
|
|
2162
2247
|
})
|
|
2163
2248
|
}).optional().meta({
|
|
2164
2249
|
title: "Google Provider Options",
|
|
2165
|
-
description: "Allowlisted Google provider options for gemini-3.
|
|
2250
|
+
description: "Allowlisted Google provider options for gemini-3.5-flash-lite."
|
|
2166
2251
|
})
|
|
2167
2252
|
}).optional().meta({
|
|
2168
2253
|
title: "Provider Options",
|
|
2169
|
-
description: "Provider-specific options accepted for gemini-3.
|
|
2254
|
+
description: "Provider-specific options accepted for gemini-3.5-flash-lite."
|
|
2170
2255
|
})
|
|
2171
2256
|
}),
|
|
2172
2257
|
zod.z.strictObject({
|
|
2173
2258
|
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
2174
2259
|
title: "Max Output Tokens",
|
|
2175
|
-
description: "Maximum output token cap for gemini-3.
|
|
2260
|
+
description: "Maximum output token cap for gemini-3.5-flash-lite."
|
|
2176
2261
|
}),
|
|
2177
2262
|
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
2178
2263
|
title: "Stop Sequences",
|
|
2179
|
-
description: "Up to five stop sequences for gemini-3.
|
|
2264
|
+
description: "Up to five stop sequences for gemini-3.5-flash-lite."
|
|
2180
2265
|
}),
|
|
2181
2266
|
serviceTier: zod.z.literal("standard").optional().meta({
|
|
2182
2267
|
title: "Service Tier",
|
|
2183
|
-
description: "Standard tier or omitted tier for gemini-3.
|
|
2268
|
+
description: "Standard tier or omitted tier for gemini-3.5-flash-lite."
|
|
2184
2269
|
}),
|
|
2185
2270
|
reasoning: zod.z.union([
|
|
2186
2271
|
zod.z.strictObject({
|
|
2187
|
-
effort: zod.z.enum(["low", "medium", "high"]).meta({
|
|
2272
|
+
effort: zod.z.enum(["none", "low", "medium", "high"]).meta({
|
|
2188
2273
|
title: "Reasoning Effort",
|
|
2189
|
-
description: "Reasoning effort for gemini-3.
|
|
2274
|
+
description: "Reasoning effort for gemini-3.5-flash-lite; none maps to minimal thinking."
|
|
2190
2275
|
}),
|
|
2191
2276
|
includeThoughts: zod.z.boolean().optional().meta({
|
|
2192
2277
|
title: "Include Thoughts",
|
|
@@ -2201,7 +2286,7 @@ var Gemini31ProPreviewConfigSchema = zod.z.union([
|
|
|
2201
2286
|
})
|
|
2202
2287
|
]).optional().meta({
|
|
2203
2288
|
title: "Reasoning",
|
|
2204
|
-
description: "Gemini 3.
|
|
2289
|
+
description: "Gemini 3.5 Flash-Lite thinkingLevel configuration."
|
|
2205
2290
|
}),
|
|
2206
2291
|
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
2207
2292
|
title: "Timeout",
|
|
@@ -2237,7 +2322,7 @@ var Gemini31ProPreviewConfigSchema = zod.z.union([
|
|
|
2237
2322
|
})
|
|
2238
2323
|
).min(1).optional().meta({
|
|
2239
2324
|
title: "Tools",
|
|
2240
|
-
description: "Allowlisted Google tools for gemini-3.
|
|
2325
|
+
description: "Allowlisted Google tools for gemini-3.5-flash-lite."
|
|
2241
2326
|
}),
|
|
2242
2327
|
httpOptions: zod.z.strictObject({
|
|
2243
2328
|
timeout: zod.z.number().int().positive().optional().meta({
|
|
@@ -2250,37 +2335,37 @@ var Gemini31ProPreviewConfigSchema = zod.z.union([
|
|
|
2250
2335
|
})
|
|
2251
2336
|
}).optional().meta({
|
|
2252
2337
|
title: "Google Provider Options",
|
|
2253
|
-
description: "Allowlisted Google provider options for gemini-3.
|
|
2338
|
+
description: "Allowlisted Google provider options for gemini-3.5-flash-lite."
|
|
2254
2339
|
})
|
|
2255
2340
|
}).optional().meta({
|
|
2256
2341
|
title: "Provider Options",
|
|
2257
|
-
description: "Provider-specific options accepted for gemini-3.
|
|
2342
|
+
description: "Provider-specific options accepted for gemini-3.5-flash-lite."
|
|
2258
2343
|
})
|
|
2259
2344
|
})
|
|
2260
2345
|
]).meta({
|
|
2261
|
-
title: "
|
|
2262
|
-
description: "Strict generateContent config for model gemini-3.
|
|
2263
|
-
examples: [{ serviceTier: "flex", reasoning: { effort: "
|
|
2346
|
+
title: "Gemini35FlashLiteConfig",
|
|
2347
|
+
description: "Strict generateContent config for model gemini-3.5-flash-lite. Level reasoning, fixed sampling, flex/standard tiers, structured output, grounding, priced.",
|
|
2348
|
+
examples: [{ serviceTier: "flex", reasoning: { effort: "medium" } }]
|
|
2264
2349
|
});
|
|
2265
|
-
var
|
|
2350
|
+
var Gemini36FlashConfigSchema = zod.z.union([
|
|
2266
2351
|
zod.z.strictObject({
|
|
2267
2352
|
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
2268
2353
|
title: "Max Output Tokens",
|
|
2269
|
-
description: "Maximum output token cap for gemini-3-flash
|
|
2354
|
+
description: "Maximum output token cap for gemini-3.6-flash."
|
|
2270
2355
|
}),
|
|
2271
2356
|
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
2272
2357
|
title: "Stop Sequences",
|
|
2273
|
-
description: "Up to five stop sequences for gemini-3-flash
|
|
2358
|
+
description: "Up to five stop sequences for gemini-3.6-flash."
|
|
2274
2359
|
}),
|
|
2275
2360
|
serviceTier: zod.z.literal("flex").meta({
|
|
2276
2361
|
title: "Service Tier",
|
|
2277
|
-
description: "Explicit flex tier for gemini-3-flash
|
|
2362
|
+
description: "Explicit flex tier for gemini-3.6-flash."
|
|
2278
2363
|
}),
|
|
2279
2364
|
reasoning: zod.z.union([
|
|
2280
2365
|
zod.z.strictObject({
|
|
2281
2366
|
effort: zod.z.enum(["none", "low", "medium", "high"]).meta({
|
|
2282
2367
|
title: "Reasoning Effort",
|
|
2283
|
-
description: "Reasoning effort for gemini-3-flash
|
|
2368
|
+
description: "Reasoning effort for gemini-3.6-flash; none maps to minimal thinking."
|
|
2284
2369
|
}),
|
|
2285
2370
|
includeThoughts: zod.z.boolean().optional().meta({
|
|
2286
2371
|
title: "Include Thoughts",
|
|
@@ -2295,7 +2380,7 @@ var Gemini3FlashPreviewConfigSchema = zod.z.union([
|
|
|
2295
2380
|
})
|
|
2296
2381
|
]).optional().meta({
|
|
2297
2382
|
title: "Reasoning",
|
|
2298
|
-
description: "Gemini 3 Flash
|
|
2383
|
+
description: "Gemini 3.6 Flash thinkingLevel configuration."
|
|
2299
2384
|
}),
|
|
2300
2385
|
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
2301
2386
|
title: "Timeout",
|
|
@@ -2331,7 +2416,7 @@ var Gemini3FlashPreviewConfigSchema = zod.z.union([
|
|
|
2331
2416
|
})
|
|
2332
2417
|
).min(1).optional().meta({
|
|
2333
2418
|
title: "Tools",
|
|
2334
|
-
description: "Allowlisted Google tools for gemini-3-flash
|
|
2419
|
+
description: "Allowlisted Google tools for gemini-3.6-flash."
|
|
2335
2420
|
}),
|
|
2336
2421
|
httpOptions: zod.z.strictObject({
|
|
2337
2422
|
timeout: zod.z.number().int().positive().optional().meta({
|
|
@@ -2348,31 +2433,31 @@ var Gemini3FlashPreviewConfigSchema = zod.z.union([
|
|
|
2348
2433
|
})
|
|
2349
2434
|
}).optional().meta({
|
|
2350
2435
|
title: "Google Provider Options",
|
|
2351
|
-
description: "Allowlisted Google provider options for gemini-3-flash
|
|
2436
|
+
description: "Allowlisted Google provider options for gemini-3.6-flash."
|
|
2352
2437
|
})
|
|
2353
2438
|
}).optional().meta({
|
|
2354
2439
|
title: "Provider Options",
|
|
2355
|
-
description: "Provider-specific options accepted for gemini-3-flash
|
|
2440
|
+
description: "Provider-specific options accepted for gemini-3.6-flash."
|
|
2356
2441
|
})
|
|
2357
2442
|
}),
|
|
2358
2443
|
zod.z.strictObject({
|
|
2359
2444
|
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
2360
2445
|
title: "Max Output Tokens",
|
|
2361
|
-
description: "Maximum output token cap for gemini-3-flash
|
|
2446
|
+
description: "Maximum output token cap for gemini-3.6-flash."
|
|
2362
2447
|
}),
|
|
2363
2448
|
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
2364
2449
|
title: "Stop Sequences",
|
|
2365
|
-
description: "Up to five stop sequences for gemini-3-flash
|
|
2450
|
+
description: "Up to five stop sequences for gemini-3.6-flash."
|
|
2366
2451
|
}),
|
|
2367
2452
|
serviceTier: zod.z.literal("standard").optional().meta({
|
|
2368
2453
|
title: "Service Tier",
|
|
2369
|
-
description: "Standard tier or omitted tier for gemini-3-flash
|
|
2454
|
+
description: "Standard tier or omitted tier for gemini-3.6-flash."
|
|
2370
2455
|
}),
|
|
2371
2456
|
reasoning: zod.z.union([
|
|
2372
2457
|
zod.z.strictObject({
|
|
2373
2458
|
effort: zod.z.enum(["none", "low", "medium", "high"]).meta({
|
|
2374
2459
|
title: "Reasoning Effort",
|
|
2375
|
-
description: "Reasoning effort for gemini-3-flash
|
|
2460
|
+
description: "Reasoning effort for gemini-3.6-flash; none maps to minimal thinking."
|
|
2376
2461
|
}),
|
|
2377
2462
|
includeThoughts: zod.z.boolean().optional().meta({
|
|
2378
2463
|
title: "Include Thoughts",
|
|
@@ -2387,7 +2472,7 @@ var Gemini3FlashPreviewConfigSchema = zod.z.union([
|
|
|
2387
2472
|
})
|
|
2388
2473
|
]).optional().meta({
|
|
2389
2474
|
title: "Reasoning",
|
|
2390
|
-
description: "Gemini 3 Flash
|
|
2475
|
+
description: "Gemini 3.6 Flash thinkingLevel configuration."
|
|
2391
2476
|
}),
|
|
2392
2477
|
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
2393
2478
|
title: "Timeout",
|
|
@@ -2423,7 +2508,7 @@ var Gemini3FlashPreviewConfigSchema = zod.z.union([
|
|
|
2423
2508
|
})
|
|
2424
2509
|
).min(1).optional().meta({
|
|
2425
2510
|
title: "Tools",
|
|
2426
|
-
description: "Allowlisted Google tools for gemini-3-flash
|
|
2511
|
+
description: "Allowlisted Google tools for gemini-3.6-flash."
|
|
2427
2512
|
}),
|
|
2428
2513
|
httpOptions: zod.z.strictObject({
|
|
2429
2514
|
timeout: zod.z.number().int().positive().optional().meta({
|
|
@@ -2436,115 +2521,487 @@ var Gemini3FlashPreviewConfigSchema = zod.z.union([
|
|
|
2436
2521
|
})
|
|
2437
2522
|
}).optional().meta({
|
|
2438
2523
|
title: "Google Provider Options",
|
|
2439
|
-
description: "Allowlisted Google provider options for gemini-3-flash
|
|
2524
|
+
description: "Allowlisted Google provider options for gemini-3.6-flash."
|
|
2440
2525
|
})
|
|
2441
2526
|
}).optional().meta({
|
|
2442
2527
|
title: "Provider Options",
|
|
2443
|
-
description: "Provider-specific options accepted for gemini-3-flash
|
|
2528
|
+
description: "Provider-specific options accepted for gemini-3.6-flash."
|
|
2444
2529
|
})
|
|
2445
2530
|
})
|
|
2446
2531
|
]).meta({
|
|
2447
|
-
title: "
|
|
2448
|
-
description: "Strict generateContent config for model gemini-3-flash
|
|
2532
|
+
title: "Gemini36FlashConfig",
|
|
2533
|
+
description: "Strict generateContent config for model gemini-3.6-flash. Level reasoning, fixed sampling, flex/standard tiers, structured output, grounding, priced.",
|
|
2449
2534
|
examples: [{ serviceTier: "flex", reasoning: { effort: "medium" } }]
|
|
2450
2535
|
});
|
|
2451
|
-
var
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
}),
|
|
2457
|
-
topP: zod.z.number().min(0).max(1).optional().meta({
|
|
2458
|
-
title: "Top P",
|
|
2459
|
-
description: "Nucleus sampling probability for gemma-4-31b-it."
|
|
2460
|
-
}),
|
|
2461
|
-
topK: zod.z.number().int().positive().optional().meta({
|
|
2462
|
-
title: "Top K",
|
|
2463
|
-
description: "Top-k sampling limit for gemma-4-31b-it."
|
|
2464
|
-
}),
|
|
2465
|
-
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
2466
|
-
title: "Max Output Tokens",
|
|
2467
|
-
description: "Maximum output token cap for gemma-4-31b-it."
|
|
2468
|
-
}),
|
|
2469
|
-
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
2470
|
-
title: "Stop Sequences",
|
|
2471
|
-
description: "Up to five stop sequences for gemma-4-31b-it."
|
|
2472
|
-
}),
|
|
2473
|
-
reasoning: zod.z.union([
|
|
2474
|
-
zod.z.strictObject({
|
|
2475
|
-
effort: zod.z.enum(["none", "high"]).meta({
|
|
2476
|
-
title: "Reasoning Effort",
|
|
2477
|
-
description: "Reasoning effort for gemma-4-31b-it."
|
|
2478
|
-
}),
|
|
2479
|
-
includeThoughts: zod.z.boolean().optional().meta({
|
|
2480
|
-
title: "Include Thoughts",
|
|
2481
|
-
description: "Return provider thought summaries when supported."
|
|
2482
|
-
})
|
|
2536
|
+
var Gemini37FlashConfigSchema = zod.z.union([
|
|
2537
|
+
zod.z.strictObject({
|
|
2538
|
+
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
2539
|
+
title: "Max Output Tokens",
|
|
2540
|
+
description: "Maximum output token cap for gemini-3.7-flash."
|
|
2483
2541
|
}),
|
|
2484
|
-
zod.z.
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
title: "Cached Content",
|
|
2502
|
-
description: "Google cached content resource name."
|
|
2503
|
-
}),
|
|
2504
|
-
safetySettings: zod.z.array(
|
|
2505
|
-
zod.z.strictObject({
|
|
2506
|
-
category: zod.z.string().min(1).meta({
|
|
2507
|
-
title: "Safety Category",
|
|
2508
|
-
description: "Google safety category identifier."
|
|
2509
|
-
}),
|
|
2510
|
-
threshold: zod.z.string().min(1).meta({
|
|
2511
|
-
title: "Safety Threshold",
|
|
2512
|
-
description: "Google safety threshold identifier."
|
|
2513
|
-
})
|
|
2514
|
-
})
|
|
2515
|
-
).optional().meta({
|
|
2516
|
-
title: "Safety Settings",
|
|
2517
|
-
description: "Allowlisted Google safety settings."
|
|
2518
|
-
}),
|
|
2519
|
-
tools: zod.z.array(
|
|
2520
|
-
zod.z.strictObject({
|
|
2521
|
-
googleSearch: zod.z.strictObject({}).meta({
|
|
2522
|
-
title: "Google Search",
|
|
2523
|
-
description: "Google Search grounding tool."
|
|
2524
|
-
})
|
|
2542
|
+
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
2543
|
+
title: "Stop Sequences",
|
|
2544
|
+
description: "Up to five stop sequences for gemini-3.7-flash."
|
|
2545
|
+
}),
|
|
2546
|
+
serviceTier: zod.z.literal("flex").meta({
|
|
2547
|
+
title: "Service Tier",
|
|
2548
|
+
description: "Explicit flex tier for gemini-3.7-flash."
|
|
2549
|
+
}),
|
|
2550
|
+
reasoning: zod.z.union([
|
|
2551
|
+
zod.z.strictObject({
|
|
2552
|
+
effort: zod.z.enum(["low", "medium", "high"]).meta({
|
|
2553
|
+
title: "Reasoning Effort",
|
|
2554
|
+
description: "Reasoning effort for gemini-3.7-flash. none is not admitted; thinkingLevel MINIMAL is never emitted."
|
|
2555
|
+
}),
|
|
2556
|
+
includeThoughts: zod.z.boolean().optional().meta({
|
|
2557
|
+
title: "Include Thoughts",
|
|
2558
|
+
description: "Return provider thought summaries when supported."
|
|
2525
2559
|
})
|
|
2526
|
-
).min(1).optional().meta({
|
|
2527
|
-
title: "Tools",
|
|
2528
|
-
description: "Allowlisted Google tools for gemma-4-31b-it."
|
|
2529
2560
|
}),
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
title: "
|
|
2533
|
-
description: "
|
|
2561
|
+
zod.z.strictObject({
|
|
2562
|
+
includeThoughts: zod.z.boolean().meta({
|
|
2563
|
+
title: "Include Thoughts",
|
|
2564
|
+
description: "Return provider thought summaries when supported."
|
|
2534
2565
|
})
|
|
2535
|
-
}).optional().meta({
|
|
2536
|
-
title: "HTTP Options",
|
|
2537
|
-
description: "Allowlisted Google transport options."
|
|
2538
2566
|
})
|
|
2539
|
-
|
|
2540
|
-
title: "
|
|
2541
|
-
description: "
|
|
2542
|
-
})
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2567
|
+
]).optional().meta({
|
|
2568
|
+
title: "Reasoning",
|
|
2569
|
+
description: "Gemini 3.7 Flash thinkingLevel configuration."
|
|
2570
|
+
}),
|
|
2571
|
+
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
2572
|
+
title: "Timeout",
|
|
2573
|
+
description: "Logical request timeout in milliseconds."
|
|
2574
|
+
}),
|
|
2575
|
+
providerOptions: zod.z.strictObject({
|
|
2576
|
+
google: zod.z.strictObject({
|
|
2577
|
+
cachedContent: zod.z.string().min(1).optional().meta({
|
|
2578
|
+
title: "Cached Content",
|
|
2579
|
+
description: "Google cached content resource name."
|
|
2580
|
+
}),
|
|
2581
|
+
safetySettings: zod.z.array(
|
|
2582
|
+
zod.z.strictObject({
|
|
2583
|
+
category: zod.z.string().min(1).meta({
|
|
2584
|
+
title: "Safety Category",
|
|
2585
|
+
description: "Google safety category identifier."
|
|
2586
|
+
}),
|
|
2587
|
+
threshold: zod.z.string().min(1).meta({
|
|
2588
|
+
title: "Safety Threshold",
|
|
2589
|
+
description: "Google safety threshold identifier."
|
|
2590
|
+
})
|
|
2591
|
+
})
|
|
2592
|
+
).optional().meta({
|
|
2593
|
+
title: "Safety Settings",
|
|
2594
|
+
description: "Allowlisted Google safety settings."
|
|
2595
|
+
}),
|
|
2596
|
+
tools: zod.z.array(
|
|
2597
|
+
zod.z.strictObject({
|
|
2598
|
+
googleSearch: zod.z.strictObject({}).meta({
|
|
2599
|
+
title: "Google Search",
|
|
2600
|
+
description: "Google Search grounding tool."
|
|
2601
|
+
})
|
|
2602
|
+
})
|
|
2603
|
+
).min(1).optional().meta({
|
|
2604
|
+
title: "Tools",
|
|
2605
|
+
description: "Allowlisted Google tools for gemini-3.7-flash."
|
|
2606
|
+
}),
|
|
2607
|
+
httpOptions: zod.z.strictObject({
|
|
2608
|
+
timeout: zod.z.number().int().positive().optional().meta({
|
|
2609
|
+
title: "HTTP Timeout",
|
|
2610
|
+
description: "Per-request Google transport timeout in milliseconds."
|
|
2611
|
+
})
|
|
2612
|
+
}).optional().meta({
|
|
2613
|
+
title: "HTTP Options",
|
|
2614
|
+
description: "Allowlisted Google transport options."
|
|
2615
|
+
}),
|
|
2616
|
+
flexFallback: zod.z.boolean().optional().meta({
|
|
2617
|
+
title: "Flex Fallback",
|
|
2618
|
+
description: "Allow provider fallback from flex when flex was explicitly selected."
|
|
2619
|
+
})
|
|
2620
|
+
}).optional().meta({
|
|
2621
|
+
title: "Google Provider Options",
|
|
2622
|
+
description: "Allowlisted Google provider options for gemini-3.7-flash."
|
|
2623
|
+
})
|
|
2624
|
+
}).optional().meta({
|
|
2625
|
+
title: "Provider Options",
|
|
2626
|
+
description: "Provider-specific options accepted for gemini-3.7-flash."
|
|
2627
|
+
})
|
|
2628
|
+
}),
|
|
2629
|
+
zod.z.strictObject({
|
|
2630
|
+
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
2631
|
+
title: "Max Output Tokens",
|
|
2632
|
+
description: "Maximum output token cap for gemini-3.7-flash."
|
|
2633
|
+
}),
|
|
2634
|
+
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
2635
|
+
title: "Stop Sequences",
|
|
2636
|
+
description: "Up to five stop sequences for gemini-3.7-flash."
|
|
2637
|
+
}),
|
|
2638
|
+
serviceTier: zod.z.literal("standard").optional().meta({
|
|
2639
|
+
title: "Service Tier",
|
|
2640
|
+
description: "Standard tier or omitted tier for gemini-3.7-flash."
|
|
2641
|
+
}),
|
|
2642
|
+
reasoning: zod.z.union([
|
|
2643
|
+
zod.z.strictObject({
|
|
2644
|
+
effort: zod.z.enum(["low", "medium", "high"]).meta({
|
|
2645
|
+
title: "Reasoning Effort",
|
|
2646
|
+
description: "Reasoning effort for gemini-3.7-flash. none is not admitted; thinkingLevel MINIMAL is never emitted."
|
|
2647
|
+
}),
|
|
2648
|
+
includeThoughts: zod.z.boolean().optional().meta({
|
|
2649
|
+
title: "Include Thoughts",
|
|
2650
|
+
description: "Return provider thought summaries when supported."
|
|
2651
|
+
})
|
|
2652
|
+
}),
|
|
2653
|
+
zod.z.strictObject({
|
|
2654
|
+
includeThoughts: zod.z.boolean().meta({
|
|
2655
|
+
title: "Include Thoughts",
|
|
2656
|
+
description: "Return provider thought summaries when supported."
|
|
2657
|
+
})
|
|
2658
|
+
})
|
|
2659
|
+
]).optional().meta({
|
|
2660
|
+
title: "Reasoning",
|
|
2661
|
+
description: "Gemini 3.7 Flash thinkingLevel configuration."
|
|
2662
|
+
}),
|
|
2663
|
+
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
2664
|
+
title: "Timeout",
|
|
2665
|
+
description: "Logical request timeout in milliseconds."
|
|
2666
|
+
}),
|
|
2667
|
+
providerOptions: zod.z.strictObject({
|
|
2668
|
+
google: zod.z.strictObject({
|
|
2669
|
+
cachedContent: zod.z.string().min(1).optional().meta({
|
|
2670
|
+
title: "Cached Content",
|
|
2671
|
+
description: "Google cached content resource name."
|
|
2672
|
+
}),
|
|
2673
|
+
safetySettings: zod.z.array(
|
|
2674
|
+
zod.z.strictObject({
|
|
2675
|
+
category: zod.z.string().min(1).meta({
|
|
2676
|
+
title: "Safety Category",
|
|
2677
|
+
description: "Google safety category identifier."
|
|
2678
|
+
}),
|
|
2679
|
+
threshold: zod.z.string().min(1).meta({
|
|
2680
|
+
title: "Safety Threshold",
|
|
2681
|
+
description: "Google safety threshold identifier."
|
|
2682
|
+
})
|
|
2683
|
+
})
|
|
2684
|
+
).optional().meta({
|
|
2685
|
+
title: "Safety Settings",
|
|
2686
|
+
description: "Allowlisted Google safety settings."
|
|
2687
|
+
}),
|
|
2688
|
+
tools: zod.z.array(
|
|
2689
|
+
zod.z.strictObject({
|
|
2690
|
+
googleSearch: zod.z.strictObject({}).meta({
|
|
2691
|
+
title: "Google Search",
|
|
2692
|
+
description: "Google Search grounding tool."
|
|
2693
|
+
})
|
|
2694
|
+
})
|
|
2695
|
+
).min(1).optional().meta({
|
|
2696
|
+
title: "Tools",
|
|
2697
|
+
description: "Allowlisted Google tools for gemini-3.7-flash."
|
|
2698
|
+
}),
|
|
2699
|
+
httpOptions: zod.z.strictObject({
|
|
2700
|
+
timeout: zod.z.number().int().positive().optional().meta({
|
|
2701
|
+
title: "HTTP Timeout",
|
|
2702
|
+
description: "Per-request Google transport timeout in milliseconds."
|
|
2703
|
+
})
|
|
2704
|
+
}).optional().meta({
|
|
2705
|
+
title: "HTTP Options",
|
|
2706
|
+
description: "Allowlisted Google transport options."
|
|
2707
|
+
})
|
|
2708
|
+
}).optional().meta({
|
|
2709
|
+
title: "Google Provider Options",
|
|
2710
|
+
description: "Allowlisted Google provider options for gemini-3.7-flash."
|
|
2711
|
+
})
|
|
2712
|
+
}).optional().meta({
|
|
2713
|
+
title: "Provider Options",
|
|
2714
|
+
description: "Provider-specific options accepted for gemini-3.7-flash."
|
|
2715
|
+
})
|
|
2716
|
+
})
|
|
2717
|
+
]).meta({
|
|
2718
|
+
title: "Gemini37FlashConfig",
|
|
2719
|
+
description: "Strict generateContent config for model gemini-3.7-flash. Level reasoning, fixed sampling, flex/standard tiers, structured output, grounding, priced.",
|
|
2720
|
+
examples: [{ serviceTier: "flex", reasoning: { effort: "medium" } }]
|
|
2721
|
+
});
|
|
2722
|
+
var Gemini38FlashConfigSchema = zod.z.union([
|
|
2723
|
+
zod.z.strictObject({
|
|
2724
|
+
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
2725
|
+
title: "Max Output Tokens",
|
|
2726
|
+
description: "Maximum output token cap for gemini-3.8-flash."
|
|
2727
|
+
}),
|
|
2728
|
+
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
2729
|
+
title: "Stop Sequences",
|
|
2730
|
+
description: "Up to five stop sequences for gemini-3.8-flash."
|
|
2731
|
+
}),
|
|
2732
|
+
serviceTier: zod.z.literal("flex").meta({
|
|
2733
|
+
title: "Service Tier",
|
|
2734
|
+
description: "Explicit flex tier for gemini-3.8-flash."
|
|
2735
|
+
}),
|
|
2736
|
+
reasoning: zod.z.union([
|
|
2737
|
+
zod.z.strictObject({
|
|
2738
|
+
effort: zod.z.enum(["low", "medium", "high"]).meta({
|
|
2739
|
+
title: "Reasoning Effort",
|
|
2740
|
+
description: "Reasoning effort for gemini-3.8-flash. none is not admitted; thinkingLevel MINIMAL is never emitted."
|
|
2741
|
+
}),
|
|
2742
|
+
includeThoughts: zod.z.boolean().optional().meta({
|
|
2743
|
+
title: "Include Thoughts",
|
|
2744
|
+
description: "Return provider thought summaries when supported."
|
|
2745
|
+
})
|
|
2746
|
+
}),
|
|
2747
|
+
zod.z.strictObject({
|
|
2748
|
+
includeThoughts: zod.z.boolean().meta({
|
|
2749
|
+
title: "Include Thoughts",
|
|
2750
|
+
description: "Return provider thought summaries when supported."
|
|
2751
|
+
})
|
|
2752
|
+
})
|
|
2753
|
+
]).optional().meta({
|
|
2754
|
+
title: "Reasoning",
|
|
2755
|
+
description: "Gemini 3.8 Flash thinkingLevel configuration."
|
|
2756
|
+
}),
|
|
2757
|
+
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
2758
|
+
title: "Timeout",
|
|
2759
|
+
description: "Logical request timeout in milliseconds."
|
|
2760
|
+
}),
|
|
2761
|
+
providerOptions: zod.z.strictObject({
|
|
2762
|
+
google: zod.z.strictObject({
|
|
2763
|
+
cachedContent: zod.z.string().min(1).optional().meta({
|
|
2764
|
+
title: "Cached Content",
|
|
2765
|
+
description: "Google cached content resource name."
|
|
2766
|
+
}),
|
|
2767
|
+
safetySettings: zod.z.array(
|
|
2768
|
+
zod.z.strictObject({
|
|
2769
|
+
category: zod.z.string().min(1).meta({
|
|
2770
|
+
title: "Safety Category",
|
|
2771
|
+
description: "Google safety category identifier."
|
|
2772
|
+
}),
|
|
2773
|
+
threshold: zod.z.string().min(1).meta({
|
|
2774
|
+
title: "Safety Threshold",
|
|
2775
|
+
description: "Google safety threshold identifier."
|
|
2776
|
+
})
|
|
2777
|
+
})
|
|
2778
|
+
).optional().meta({
|
|
2779
|
+
title: "Safety Settings",
|
|
2780
|
+
description: "Allowlisted Google safety settings."
|
|
2781
|
+
}),
|
|
2782
|
+
tools: zod.z.array(
|
|
2783
|
+
zod.z.strictObject({
|
|
2784
|
+
googleSearch: zod.z.strictObject({}).meta({
|
|
2785
|
+
title: "Google Search",
|
|
2786
|
+
description: "Google Search grounding tool."
|
|
2787
|
+
})
|
|
2788
|
+
})
|
|
2789
|
+
).min(1).optional().meta({
|
|
2790
|
+
title: "Tools",
|
|
2791
|
+
description: "Allowlisted Google tools for gemini-3.8-flash."
|
|
2792
|
+
}),
|
|
2793
|
+
httpOptions: zod.z.strictObject({
|
|
2794
|
+
timeout: zod.z.number().int().positive().optional().meta({
|
|
2795
|
+
title: "HTTP Timeout",
|
|
2796
|
+
description: "Per-request Google transport timeout in milliseconds."
|
|
2797
|
+
})
|
|
2798
|
+
}).optional().meta({
|
|
2799
|
+
title: "HTTP Options",
|
|
2800
|
+
description: "Allowlisted Google transport options."
|
|
2801
|
+
}),
|
|
2802
|
+
flexFallback: zod.z.boolean().optional().meta({
|
|
2803
|
+
title: "Flex Fallback",
|
|
2804
|
+
description: "Allow provider fallback from flex when flex was explicitly selected."
|
|
2805
|
+
})
|
|
2806
|
+
}).optional().meta({
|
|
2807
|
+
title: "Google Provider Options",
|
|
2808
|
+
description: "Allowlisted Google provider options for gemini-3.8-flash."
|
|
2809
|
+
})
|
|
2810
|
+
}).optional().meta({
|
|
2811
|
+
title: "Provider Options",
|
|
2812
|
+
description: "Provider-specific options accepted for gemini-3.8-flash."
|
|
2813
|
+
})
|
|
2814
|
+
}),
|
|
2815
|
+
zod.z.strictObject({
|
|
2816
|
+
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
2817
|
+
title: "Max Output Tokens",
|
|
2818
|
+
description: "Maximum output token cap for gemini-3.8-flash."
|
|
2819
|
+
}),
|
|
2820
|
+
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
2821
|
+
title: "Stop Sequences",
|
|
2822
|
+
description: "Up to five stop sequences for gemini-3.8-flash."
|
|
2823
|
+
}),
|
|
2824
|
+
serviceTier: zod.z.literal("standard").optional().meta({
|
|
2825
|
+
title: "Service Tier",
|
|
2826
|
+
description: "Standard tier or omitted tier for gemini-3.8-flash."
|
|
2827
|
+
}),
|
|
2828
|
+
reasoning: zod.z.union([
|
|
2829
|
+
zod.z.strictObject({
|
|
2830
|
+
effort: zod.z.enum(["low", "medium", "high"]).meta({
|
|
2831
|
+
title: "Reasoning Effort",
|
|
2832
|
+
description: "Reasoning effort for gemini-3.8-flash. none is not admitted; thinkingLevel MINIMAL is never emitted."
|
|
2833
|
+
}),
|
|
2834
|
+
includeThoughts: zod.z.boolean().optional().meta({
|
|
2835
|
+
title: "Include Thoughts",
|
|
2836
|
+
description: "Return provider thought summaries when supported."
|
|
2837
|
+
})
|
|
2838
|
+
}),
|
|
2839
|
+
zod.z.strictObject({
|
|
2840
|
+
includeThoughts: zod.z.boolean().meta({
|
|
2841
|
+
title: "Include Thoughts",
|
|
2842
|
+
description: "Return provider thought summaries when supported."
|
|
2843
|
+
})
|
|
2844
|
+
})
|
|
2845
|
+
]).optional().meta({
|
|
2846
|
+
title: "Reasoning",
|
|
2847
|
+
description: "Gemini 3.8 Flash thinkingLevel configuration."
|
|
2848
|
+
}),
|
|
2849
|
+
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
2850
|
+
title: "Timeout",
|
|
2851
|
+
description: "Logical request timeout in milliseconds."
|
|
2852
|
+
}),
|
|
2853
|
+
providerOptions: zod.z.strictObject({
|
|
2854
|
+
google: zod.z.strictObject({
|
|
2855
|
+
cachedContent: zod.z.string().min(1).optional().meta({
|
|
2856
|
+
title: "Cached Content",
|
|
2857
|
+
description: "Google cached content resource name."
|
|
2858
|
+
}),
|
|
2859
|
+
safetySettings: zod.z.array(
|
|
2860
|
+
zod.z.strictObject({
|
|
2861
|
+
category: zod.z.string().min(1).meta({
|
|
2862
|
+
title: "Safety Category",
|
|
2863
|
+
description: "Google safety category identifier."
|
|
2864
|
+
}),
|
|
2865
|
+
threshold: zod.z.string().min(1).meta({
|
|
2866
|
+
title: "Safety Threshold",
|
|
2867
|
+
description: "Google safety threshold identifier."
|
|
2868
|
+
})
|
|
2869
|
+
})
|
|
2870
|
+
).optional().meta({
|
|
2871
|
+
title: "Safety Settings",
|
|
2872
|
+
description: "Allowlisted Google safety settings."
|
|
2873
|
+
}),
|
|
2874
|
+
tools: zod.z.array(
|
|
2875
|
+
zod.z.strictObject({
|
|
2876
|
+
googleSearch: zod.z.strictObject({}).meta({
|
|
2877
|
+
title: "Google Search",
|
|
2878
|
+
description: "Google Search grounding tool."
|
|
2879
|
+
})
|
|
2880
|
+
})
|
|
2881
|
+
).min(1).optional().meta({
|
|
2882
|
+
title: "Tools",
|
|
2883
|
+
description: "Allowlisted Google tools for gemini-3.8-flash."
|
|
2884
|
+
}),
|
|
2885
|
+
httpOptions: zod.z.strictObject({
|
|
2886
|
+
timeout: zod.z.number().int().positive().optional().meta({
|
|
2887
|
+
title: "HTTP Timeout",
|
|
2888
|
+
description: "Per-request Google transport timeout in milliseconds."
|
|
2889
|
+
})
|
|
2890
|
+
}).optional().meta({
|
|
2891
|
+
title: "HTTP Options",
|
|
2892
|
+
description: "Allowlisted Google transport options."
|
|
2893
|
+
})
|
|
2894
|
+
}).optional().meta({
|
|
2895
|
+
title: "Google Provider Options",
|
|
2896
|
+
description: "Allowlisted Google provider options for gemini-3.8-flash."
|
|
2897
|
+
})
|
|
2898
|
+
}).optional().meta({
|
|
2899
|
+
title: "Provider Options",
|
|
2900
|
+
description: "Provider-specific options accepted for gemini-3.8-flash."
|
|
2901
|
+
})
|
|
2902
|
+
})
|
|
2903
|
+
]).meta({
|
|
2904
|
+
title: "Gemini38FlashConfig",
|
|
2905
|
+
description: "Strict generateContent config for model gemini-3.8-flash. Level reasoning, fixed sampling, flex/standard tiers, structured output, grounding, priced.",
|
|
2906
|
+
examples: [{ serviceTier: "flex", reasoning: { effort: "medium" } }]
|
|
2907
|
+
});
|
|
2908
|
+
var Gemma431bItConfigSchema = zod.z.strictObject({
|
|
2909
|
+
temperature: zod.z.number().min(0).max(2).optional().meta({
|
|
2910
|
+
title: "Temperature",
|
|
2911
|
+
description: "Sampling temperature for gemma-4-31b-it.",
|
|
2912
|
+
examples: [0.7]
|
|
2913
|
+
}),
|
|
2914
|
+
topP: zod.z.number().min(0).max(1).optional().meta({
|
|
2915
|
+
title: "Top P",
|
|
2916
|
+
description: "Nucleus sampling probability for gemma-4-31b-it."
|
|
2917
|
+
}),
|
|
2918
|
+
topK: zod.z.number().int().positive().optional().meta({
|
|
2919
|
+
title: "Top K",
|
|
2920
|
+
description: "Top-k sampling limit for gemma-4-31b-it."
|
|
2921
|
+
}),
|
|
2922
|
+
maxOutputTokens: zod.z.number().int().positive().optional().meta({
|
|
2923
|
+
title: "Max Output Tokens",
|
|
2924
|
+
description: "Maximum output token cap for gemma-4-31b-it."
|
|
2925
|
+
}),
|
|
2926
|
+
stopSequences: zod.z.array(zod.z.string()).max(5).optional().meta({
|
|
2927
|
+
title: "Stop Sequences",
|
|
2928
|
+
description: "Up to five stop sequences for gemma-4-31b-it."
|
|
2929
|
+
}),
|
|
2930
|
+
reasoning: zod.z.union([
|
|
2931
|
+
zod.z.strictObject({
|
|
2932
|
+
effort: zod.z.enum(["none", "high"]).meta({
|
|
2933
|
+
title: "Reasoning Effort",
|
|
2934
|
+
description: "Reasoning effort for gemma-4-31b-it."
|
|
2935
|
+
}),
|
|
2936
|
+
includeThoughts: zod.z.boolean().optional().meta({
|
|
2937
|
+
title: "Include Thoughts",
|
|
2938
|
+
description: "Return provider thought summaries when supported."
|
|
2939
|
+
})
|
|
2940
|
+
}),
|
|
2941
|
+
zod.z.strictObject({
|
|
2942
|
+
includeThoughts: zod.z.boolean().meta({
|
|
2943
|
+
title: "Include Thoughts",
|
|
2944
|
+
description: "Return provider thought summaries when supported."
|
|
2945
|
+
})
|
|
2946
|
+
})
|
|
2947
|
+
]).optional().meta({
|
|
2948
|
+
title: "Reasoning",
|
|
2949
|
+
description: "Gemma 4 31B IT thinkingLevel configuration."
|
|
2950
|
+
}),
|
|
2951
|
+
timeoutMs: zod.z.number().int().positive().optional().meta({
|
|
2952
|
+
title: "Timeout",
|
|
2953
|
+
description: "Logical request timeout in milliseconds."
|
|
2954
|
+
}),
|
|
2955
|
+
providerOptions: zod.z.strictObject({
|
|
2956
|
+
google: zod.z.strictObject({
|
|
2957
|
+
cachedContent: zod.z.string().min(1).optional().meta({
|
|
2958
|
+
title: "Cached Content",
|
|
2959
|
+
description: "Google cached content resource name."
|
|
2960
|
+
}),
|
|
2961
|
+
safetySettings: zod.z.array(
|
|
2962
|
+
zod.z.strictObject({
|
|
2963
|
+
category: zod.z.string().min(1).meta({
|
|
2964
|
+
title: "Safety Category",
|
|
2965
|
+
description: "Google safety category identifier."
|
|
2966
|
+
}),
|
|
2967
|
+
threshold: zod.z.string().min(1).meta({
|
|
2968
|
+
title: "Safety Threshold",
|
|
2969
|
+
description: "Google safety threshold identifier."
|
|
2970
|
+
})
|
|
2971
|
+
})
|
|
2972
|
+
).optional().meta({
|
|
2973
|
+
title: "Safety Settings",
|
|
2974
|
+
description: "Allowlisted Google safety settings."
|
|
2975
|
+
}),
|
|
2976
|
+
tools: zod.z.array(
|
|
2977
|
+
zod.z.strictObject({
|
|
2978
|
+
googleSearch: zod.z.strictObject({}).meta({
|
|
2979
|
+
title: "Google Search",
|
|
2980
|
+
description: "Google Search grounding tool."
|
|
2981
|
+
})
|
|
2982
|
+
})
|
|
2983
|
+
).min(1).optional().meta({
|
|
2984
|
+
title: "Tools",
|
|
2985
|
+
description: "Allowlisted Google tools for gemma-4-31b-it."
|
|
2986
|
+
}),
|
|
2987
|
+
httpOptions: zod.z.strictObject({
|
|
2988
|
+
timeout: zod.z.number().int().positive().optional().meta({
|
|
2989
|
+
title: "HTTP Timeout",
|
|
2990
|
+
description: "Per-request Google transport timeout in milliseconds."
|
|
2991
|
+
})
|
|
2992
|
+
}).optional().meta({
|
|
2993
|
+
title: "HTTP Options",
|
|
2994
|
+
description: "Allowlisted Google transport options."
|
|
2995
|
+
})
|
|
2996
|
+
}).optional().meta({
|
|
2997
|
+
title: "Google Provider Options",
|
|
2998
|
+
description: "Allowlisted Google provider options for gemma-4-31b-it."
|
|
2999
|
+
})
|
|
3000
|
+
}).optional().meta({
|
|
3001
|
+
title: "Provider Options",
|
|
3002
|
+
description: "Provider-specific options accepted for gemma-4-31b-it."
|
|
3003
|
+
})
|
|
3004
|
+
}).meta({
|
|
2548
3005
|
title: "Gemma431bItConfig",
|
|
2549
3006
|
description: "Strict generateContent config for model gemma-4-31b-it. Level reasoning, tunable sampling, no service tier, structured output, grounding, intentionally unpriced.",
|
|
2550
3007
|
examples: [{ temperature: 0.7, reasoning: { effort: "high" } }]
|
|
@@ -2650,23 +3107,12 @@ var Gemma426bA4bItConfigSchema = zod.z.strictObject({
|
|
|
2650
3107
|
description: "Strict generateContent config for model gemma-4-26b-a4b-it. Level reasoning, tunable sampling, no service tier, structured output, grounding, intentionally unpriced.",
|
|
2651
3108
|
examples: [{ temperature: 0.7, reasoning: { effort: "none" } }]
|
|
2652
3109
|
});
|
|
2653
|
-
var
|
|
2654
|
-
"low",
|
|
2655
|
-
"medium",
|
|
2656
|
-
"high"
|
|
2657
|
-
];
|
|
2658
|
-
var GEMINI_LEVEL_REASONING_EFFORTS = [
|
|
2659
|
-
"none",
|
|
2660
|
-
"low",
|
|
2661
|
-
"medium",
|
|
2662
|
-
"high"
|
|
2663
|
-
];
|
|
2664
|
-
var GEMINI_LEVEL_PRO_PREVIEW_REASONING_EFFORTS = [
|
|
3110
|
+
var GEMINI_STANDARD_REASONING_EFFORTS = [
|
|
2665
3111
|
"low",
|
|
2666
3112
|
"medium",
|
|
2667
3113
|
"high"
|
|
2668
3114
|
];
|
|
2669
|
-
var
|
|
3115
|
+
var GEMINI_LEVEL_WITH_NONE_REASONING_EFFORTS = [
|
|
2670
3116
|
"none",
|
|
2671
3117
|
"low",
|
|
2672
3118
|
"medium",
|
|
@@ -2687,7 +3133,7 @@ var geminiModelDescriptors = [
|
|
|
2687
3133
|
nativeStructuredOutput: true,
|
|
2688
3134
|
vision: true,
|
|
2689
3135
|
reasoningApi: "budget",
|
|
2690
|
-
admittedReasoningEfforts:
|
|
3136
|
+
admittedReasoningEfforts: GEMINI_STANDARD_REASONING_EFFORTS,
|
|
2691
3137
|
sampling: "tunable",
|
|
2692
3138
|
caching: { explicit: true, minTokens: 2048 },
|
|
2693
3139
|
grounding: true,
|
|
@@ -2708,7 +3154,7 @@ var geminiModelDescriptors = [
|
|
|
2708
3154
|
nativeStructuredOutput: true,
|
|
2709
3155
|
vision: true,
|
|
2710
3156
|
reasoningApi: "budget",
|
|
2711
|
-
admittedReasoningEfforts:
|
|
3157
|
+
admittedReasoningEfforts: GEMINI_LEVEL_WITH_NONE_REASONING_EFFORTS,
|
|
2712
3158
|
sampling: "tunable",
|
|
2713
3159
|
caching: { explicit: true, minTokens: 2048 },
|
|
2714
3160
|
grounding: true,
|
|
@@ -2729,7 +3175,7 @@ var geminiModelDescriptors = [
|
|
|
2729
3175
|
nativeStructuredOutput: true,
|
|
2730
3176
|
vision: true,
|
|
2731
3177
|
reasoningApi: "budget",
|
|
2732
|
-
admittedReasoningEfforts:
|
|
3178
|
+
admittedReasoningEfforts: GEMINI_LEVEL_WITH_NONE_REASONING_EFFORTS,
|
|
2733
3179
|
sampling: "tunable",
|
|
2734
3180
|
caching: { explicit: true, minTokens: 2048 },
|
|
2735
3181
|
grounding: true,
|
|
@@ -2741,88 +3187,136 @@ var geminiModelDescriptors = [
|
|
|
2741
3187
|
validateConfig: core.zodToStandardSchema(Gemini25FlashLiteConfigSchema)
|
|
2742
3188
|
},
|
|
2743
3189
|
{
|
|
2744
|
-
model: "gemini-3.
|
|
3190
|
+
model: "gemini-3.1-flash-lite",
|
|
2745
3191
|
provider: "google",
|
|
2746
|
-
pricingFamily: "gemini-3.
|
|
3192
|
+
pricingFamily: "gemini-3.1-flash-lite",
|
|
2747
3193
|
capabilities: {
|
|
2748
3194
|
reasoning: true,
|
|
2749
3195
|
structuredOutput: true,
|
|
2750
3196
|
nativeStructuredOutput: true,
|
|
2751
3197
|
vision: true,
|
|
2752
3198
|
reasoningApi: "level",
|
|
2753
|
-
admittedReasoningEfforts:
|
|
3199
|
+
admittedReasoningEfforts: GEMINI_LEVEL_WITH_NONE_REASONING_EFFORTS,
|
|
2754
3200
|
sampling: "fixed",
|
|
2755
|
-
caching: { explicit: true, minTokens:
|
|
3201
|
+
caching: { explicit: true, minTokens: 1024 },
|
|
2756
3202
|
grounding: true,
|
|
2757
3203
|
functionCalling: true,
|
|
3204
|
+
structuredOutputWithTools: true,
|
|
2758
3205
|
serviceTiers: ["flex", "standard"]
|
|
2759
3206
|
},
|
|
2760
|
-
configSchema:
|
|
2761
|
-
configJsonSchema: core.toConfigJsonSchema(
|
|
2762
|
-
validateConfig: core.zodToStandardSchema(
|
|
3207
|
+
configSchema: Gemini31FlashLiteConfigSchema,
|
|
3208
|
+
configJsonSchema: core.toConfigJsonSchema(Gemini31FlashLiteConfigSchema),
|
|
3209
|
+
validateConfig: core.zodToStandardSchema(Gemini31FlashLiteConfigSchema)
|
|
2763
3210
|
},
|
|
2764
3211
|
{
|
|
2765
|
-
model: "gemini-3.1-
|
|
3212
|
+
model: "gemini-3.1-pro-preview",
|
|
2766
3213
|
provider: "google",
|
|
2767
|
-
pricingFamily: "gemini-3.1-
|
|
3214
|
+
pricingFamily: "gemini-3.1-pro-preview",
|
|
2768
3215
|
capabilities: {
|
|
2769
3216
|
reasoning: true,
|
|
2770
3217
|
structuredOutput: true,
|
|
2771
3218
|
nativeStructuredOutput: true,
|
|
2772
3219
|
vision: true,
|
|
2773
3220
|
reasoningApi: "level",
|
|
2774
|
-
admittedReasoningEfforts:
|
|
3221
|
+
admittedReasoningEfforts: GEMINI_STANDARD_REASONING_EFFORTS,
|
|
2775
3222
|
sampling: "fixed",
|
|
2776
|
-
caching: { explicit: true, minTokens:
|
|
3223
|
+
caching: { explicit: true, minTokens: 1024 },
|
|
2777
3224
|
grounding: true,
|
|
2778
3225
|
functionCalling: true,
|
|
3226
|
+
structuredOutputWithTools: true,
|
|
2779
3227
|
serviceTiers: ["flex", "standard"]
|
|
2780
3228
|
},
|
|
2781
|
-
configSchema:
|
|
2782
|
-
configJsonSchema: core.toConfigJsonSchema(
|
|
2783
|
-
validateConfig: core.zodToStandardSchema(
|
|
3229
|
+
configSchema: Gemini31ProPreviewConfigSchema,
|
|
3230
|
+
configJsonSchema: core.toConfigJsonSchema(Gemini31ProPreviewConfigSchema),
|
|
3231
|
+
validateConfig: core.zodToStandardSchema(Gemini31ProPreviewConfigSchema)
|
|
2784
3232
|
},
|
|
2785
3233
|
{
|
|
2786
|
-
model: "gemini-3.
|
|
3234
|
+
model: "gemini-3.8-flash",
|
|
2787
3235
|
provider: "google",
|
|
2788
|
-
pricingFamily: "gemini-3.
|
|
3236
|
+
pricingFamily: "gemini-3.8-flash",
|
|
2789
3237
|
capabilities: {
|
|
2790
3238
|
reasoning: true,
|
|
2791
3239
|
structuredOutput: true,
|
|
2792
3240
|
nativeStructuredOutput: true,
|
|
2793
3241
|
vision: true,
|
|
2794
3242
|
reasoningApi: "level",
|
|
2795
|
-
admittedReasoningEfforts:
|
|
3243
|
+
admittedReasoningEfforts: GEMINI_STANDARD_REASONING_EFFORTS,
|
|
2796
3244
|
sampling: "fixed",
|
|
2797
|
-
caching: { explicit: true, minTokens:
|
|
3245
|
+
caching: { explicit: true, minTokens: 1024 },
|
|
2798
3246
|
grounding: true,
|
|
2799
3247
|
functionCalling: true,
|
|
3248
|
+
structuredOutputWithTools: true,
|
|
2800
3249
|
serviceTiers: ["flex", "standard"]
|
|
2801
3250
|
},
|
|
2802
|
-
configSchema:
|
|
2803
|
-
configJsonSchema: core.toConfigJsonSchema(
|
|
2804
|
-
validateConfig: core.zodToStandardSchema(
|
|
3251
|
+
configSchema: Gemini38FlashConfigSchema,
|
|
3252
|
+
configJsonSchema: core.toConfigJsonSchema(Gemini38FlashConfigSchema),
|
|
3253
|
+
validateConfig: core.zodToStandardSchema(Gemini38FlashConfigSchema)
|
|
2805
3254
|
},
|
|
2806
3255
|
{
|
|
2807
|
-
model: "gemini-3-flash
|
|
3256
|
+
model: "gemini-3.7-flash",
|
|
2808
3257
|
provider: "google",
|
|
2809
|
-
pricingFamily: "gemini-3-flash
|
|
3258
|
+
pricingFamily: "gemini-3.7-flash",
|
|
2810
3259
|
capabilities: {
|
|
2811
3260
|
reasoning: true,
|
|
2812
3261
|
structuredOutput: true,
|
|
2813
3262
|
nativeStructuredOutput: true,
|
|
2814
3263
|
vision: true,
|
|
2815
3264
|
reasoningApi: "level",
|
|
2816
|
-
admittedReasoningEfforts:
|
|
3265
|
+
admittedReasoningEfforts: GEMINI_STANDARD_REASONING_EFFORTS,
|
|
2817
3266
|
sampling: "fixed",
|
|
2818
|
-
caching: { explicit: true, minTokens:
|
|
3267
|
+
caching: { explicit: true, minTokens: 1024 },
|
|
3268
|
+
grounding: true,
|
|
3269
|
+
functionCalling: true,
|
|
3270
|
+
structuredOutputWithTools: true,
|
|
3271
|
+
serviceTiers: ["flex", "standard"]
|
|
3272
|
+
},
|
|
3273
|
+
configSchema: Gemini37FlashConfigSchema,
|
|
3274
|
+
configJsonSchema: core.toConfigJsonSchema(Gemini37FlashConfigSchema),
|
|
3275
|
+
validateConfig: core.zodToStandardSchema(Gemini37FlashConfigSchema)
|
|
3276
|
+
},
|
|
3277
|
+
{
|
|
3278
|
+
model: "gemini-3.6-flash",
|
|
3279
|
+
provider: "google",
|
|
3280
|
+
pricingFamily: "gemini-3.6-flash",
|
|
3281
|
+
capabilities: {
|
|
3282
|
+
reasoning: true,
|
|
3283
|
+
structuredOutput: true,
|
|
3284
|
+
nativeStructuredOutput: true,
|
|
3285
|
+
vision: true,
|
|
3286
|
+
reasoningApi: "level",
|
|
3287
|
+
admittedReasoningEfforts: GEMINI_LEVEL_WITH_NONE_REASONING_EFFORTS,
|
|
3288
|
+
sampling: "fixed",
|
|
3289
|
+
caching: { explicit: true, minTokens: 1024 },
|
|
3290
|
+
grounding: true,
|
|
3291
|
+
functionCalling: true,
|
|
3292
|
+
structuredOutputWithTools: true,
|
|
3293
|
+
serviceTiers: ["flex", "standard"]
|
|
3294
|
+
},
|
|
3295
|
+
configSchema: Gemini36FlashConfigSchema,
|
|
3296
|
+
configJsonSchema: core.toConfigJsonSchema(Gemini36FlashConfigSchema),
|
|
3297
|
+
validateConfig: core.zodToStandardSchema(Gemini36FlashConfigSchema)
|
|
3298
|
+
},
|
|
3299
|
+
{
|
|
3300
|
+
model: "gemini-3.5-flash-lite",
|
|
3301
|
+
provider: "google",
|
|
3302
|
+
pricingFamily: "gemini-3.5-flash-lite",
|
|
3303
|
+
capabilities: {
|
|
3304
|
+
reasoning: true,
|
|
3305
|
+
structuredOutput: true,
|
|
3306
|
+
nativeStructuredOutput: true,
|
|
3307
|
+
vision: true,
|
|
3308
|
+
reasoningApi: "level",
|
|
3309
|
+
admittedReasoningEfforts: GEMINI_LEVEL_WITH_NONE_REASONING_EFFORTS,
|
|
3310
|
+
sampling: "fixed",
|
|
3311
|
+
caching: { explicit: true, minTokens: 1024 },
|
|
2819
3312
|
grounding: true,
|
|
2820
3313
|
functionCalling: true,
|
|
3314
|
+
structuredOutputWithTools: true,
|
|
2821
3315
|
serviceTiers: ["flex", "standard"]
|
|
2822
3316
|
},
|
|
2823
|
-
configSchema:
|
|
2824
|
-
configJsonSchema: core.toConfigJsonSchema(
|
|
2825
|
-
validateConfig: core.zodToStandardSchema(
|
|
3317
|
+
configSchema: Gemini35FlashLiteConfigSchema,
|
|
3318
|
+
configJsonSchema: core.toConfigJsonSchema(Gemini35FlashLiteConfigSchema),
|
|
3319
|
+
validateConfig: core.zodToStandardSchema(Gemini35FlashLiteConfigSchema)
|
|
2826
3320
|
}
|
|
2827
3321
|
];
|
|
2828
3322
|
var gemmaModelDescriptors = [
|
|
@@ -3564,11 +4058,11 @@ function geminiContentToMessages(input) {
|
|
|
3564
4058
|
}
|
|
3565
4059
|
|
|
3566
4060
|
exports.FLEX_DEFAULT_TIMEOUT_MS = FLEX_DEFAULT_TIMEOUT_MS;
|
|
4061
|
+
exports.GEMINI_PRICED_TIERS = GEMINI_PRICED_TIERS;
|
|
3567
4062
|
exports.GEMINI_PRICING = GEMINI_PRICING;
|
|
3568
4063
|
exports.GoogleCacheStore = GoogleCacheStore;
|
|
3569
4064
|
exports.GoogleFileStore = GoogleFileStore;
|
|
3570
4065
|
exports.STANDARD_DEFAULT_TIMEOUT_MS = STANDARD_DEFAULT_TIMEOUT_MS;
|
|
3571
|
-
exports.TIER_FACTOR = TIER_FACTOR;
|
|
3572
4066
|
exports.TRANSPORT_TIMEOUT_BUFFER_MS = TRANSPORT_TIMEOUT_BUFFER_MS;
|
|
3573
4067
|
exports.buildGoogleClient = buildGoogleClient;
|
|
3574
4068
|
exports.defaultGeminiRegistry = defaultGeminiRegistry;
|
|
@@ -3581,5 +4075,6 @@ exports.googleProvider = googleProvider;
|
|
|
3581
4075
|
exports.isGeminiCapacityError = isGeminiCapacityError;
|
|
3582
4076
|
exports.pricingVersion = pricingVersion;
|
|
3583
4077
|
exports.requireApiKey = requireApiKey;
|
|
4078
|
+
exports.resolveGeminiRates = resolveGeminiRates;
|
|
3584
4079
|
//# sourceMappingURL=index.cjs.map
|
|
3585
4080
|
//# sourceMappingURL=index.cjs.map
|