@f5-sales-demo/pi-ai 21.16.0 → 21.18.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/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
|
+
- Replaced the bundled Vertex Gemini 3.7 Flash model and provider default with GA Gemini 3.8 Flash,
|
|
10
|
+
retaining HIGH thinking by default and the strict Vertex tool-call contract
|
|
11
|
+
([#3751](https://github.com/f5-sales-demo/xcsh/issues/3751)).
|
|
9
12
|
- Replaced Vertex Gemini 3.6 Flash with GA Gemini 3.7 Flash and made full Vertex Gemini Flash and Pro models default to HIGH thinking while preserving supported explicit effort overrides ([#3460](https://github.com/f5-sales-demo/xcsh/issues/3460)).
|
|
10
13
|
|
|
11
14
|
### Fixed
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/pi-ai",
|
|
4
|
-
"version": "21.
|
|
4
|
+
"version": "21.18.0",
|
|
5
5
|
"description": "Unified LLM API with automatic model discovery and provider configuration",
|
|
6
6
|
"homepage": "https://github.com/f5-sales-demo/xcsh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@anthropic-ai/sdk": "^0.115",
|
|
47
47
|
"@aws-sdk/client-bedrock-runtime": "^3",
|
|
48
48
|
"@bufbuild/protobuf": "^2.11",
|
|
49
|
-
"@f5-sales-demo/pi-utils": "21.
|
|
49
|
+
"@f5-sales-demo/pi-utils": "21.18.0",
|
|
50
50
|
"@google/genai": "^2.15",
|
|
51
51
|
"@sinclair/typebox": "^0.34",
|
|
52
52
|
"@smithy/node-http-handler": "^4.4",
|
package/src/models.json
CHANGED
|
@@ -10316,9 +10316,9 @@
|
|
|
10316
10316
|
}
|
|
10317
10317
|
},
|
|
10318
10318
|
"google-vertex": {
|
|
10319
|
-
"gemini-3.
|
|
10320
|
-
"id": "gemini-3.
|
|
10321
|
-
"name": "Gemini 3.
|
|
10319
|
+
"gemini-3.8-flash": {
|
|
10320
|
+
"id": "gemini-3.8-flash",
|
|
10321
|
+
"name": "Gemini 3.8 Flash",
|
|
10322
10322
|
"api": "google-vertex",
|
|
10323
10323
|
"provider": "google-vertex",
|
|
10324
10324
|
"baseUrl": "https://{location}-aiplatform.googleapis.com",
|
|
@@ -10338,10 +10338,6 @@
|
|
|
10338
10338
|
"thinking": {
|
|
10339
10339
|
"mode": "google-level",
|
|
10340
10340
|
"supportedLevels": [
|
|
10341
|
-
{
|
|
10342
|
-
"effort": "minimal",
|
|
10343
|
-
"description": "Very brief reasoning"
|
|
10344
|
-
},
|
|
10345
10341
|
{
|
|
10346
10342
|
"effort": "low",
|
|
10347
10343
|
"description": "Light reasoning"
|
|
@@ -276,7 +276,7 @@ export const DEFAULT_MODEL_PER_PROVIDER: Record<KnownProvider, string> = {
|
|
|
276
276
|
"amazon-bedrock": "us.anthropic.claude-opus-4-6-v1",
|
|
277
277
|
"google-antigravity": "gemini-3-pro-high",
|
|
278
278
|
"google-gemini-cli": "gemini-2.5-pro",
|
|
279
|
-
"google-vertex": "gemini-3-
|
|
279
|
+
"google-vertex": "gemini-3.8-flash",
|
|
280
280
|
minimax: "MiniMax-M2.5",
|
|
281
281
|
"minimax-code": "MiniMax-M2.5",
|
|
282
282
|
"minimax-code-cn": "MiniMax-M2.5",
|
|
@@ -65,7 +65,7 @@ function resolveThoughtSignature(isSameProviderAndModel: boolean, signature: str
|
|
|
65
65
|
* Models with strict Google tool round trips require explicit matching call/response IDs.
|
|
66
66
|
*/
|
|
67
67
|
export function requiresToolCallId(modelId: string): boolean {
|
|
68
|
-
return modelId.startsWith("claude-") || modelId === "gemini-3.
|
|
68
|
+
return modelId.startsWith("claude-") || modelId === "gemini-3.8-flash";
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
function getGeminiMajorVersion(modelId: string): number | undefined {
|
|
@@ -177,7 +177,7 @@ export function convertMessages<T extends GoogleApiType>(model: Model<T>, contex
|
|
|
177
177
|
...(requiresToolCallId(model.id) ? { id: block.id } : {}),
|
|
178
178
|
},
|
|
179
179
|
};
|
|
180
|
-
if (model.provider === "google-vertex" && model.id !== "gemini-3.
|
|
180
|
+
if (model.provider === "google-vertex" && model.id !== "gemini-3.8-flash" && part?.functionCall?.id) {
|
|
181
181
|
delete part.functionCall.id; // Vertex AI does not support 'id' in functionCall
|
|
182
182
|
}
|
|
183
183
|
if (effectiveSignature) {
|
|
@@ -230,7 +230,7 @@ export function convertMessages<T extends GoogleApiType>(model: Model<T>, contex
|
|
|
230
230
|
|
|
231
231
|
if (
|
|
232
232
|
model.provider === "google-vertex" &&
|
|
233
|
-
model.id !== "gemini-3.
|
|
233
|
+
model.id !== "gemini-3.8-flash" &&
|
|
234
234
|
functionResponsePart.functionResponse?.id
|
|
235
235
|
) {
|
|
236
236
|
delete functionResponsePart.functionResponse.id; // Vertex AI does not support 'id' in functionResponse
|
|
@@ -450,7 +450,7 @@ export async function resolveGoogleVertexProject(
|
|
|
450
450
|
}
|
|
451
451
|
|
|
452
452
|
export function resolveGoogleVertexLocation(options?: GoogleVertexOptions): string {
|
|
453
|
-
// Gemini 3.
|
|
453
|
+
// Gemini 3.8 Flash Corporate is served through the global endpoint only.
|
|
454
454
|
// Ignore inherited provider/environment locations so a request cannot drift.
|
|
455
455
|
void options;
|
|
456
456
|
return "global";
|
|
@@ -484,28 +484,31 @@ export function buildGoogleVertexParams(
|
|
|
484
484
|
options: GoogleVertexOptions = {},
|
|
485
485
|
): GenerateContentParameters {
|
|
486
486
|
const contents = convertMessages(model, context);
|
|
487
|
-
const
|
|
487
|
+
const isGemini38Flash = model.id === "gemini-3.8-flash";
|
|
488
|
+
if (isGemini38Flash && options.thinking?.level === "MINIMAL") {
|
|
489
|
+
throw new Error("MINIMAL thinking is not supported by Gemini 3.8 Flash");
|
|
490
|
+
}
|
|
488
491
|
|
|
489
492
|
const generationConfig: GoogleVertexSamplingConfig = {};
|
|
490
|
-
if (!
|
|
493
|
+
if (!isGemini38Flash && options.temperature !== undefined) {
|
|
491
494
|
generationConfig.temperature = options.temperature;
|
|
492
495
|
}
|
|
493
496
|
if (options.maxTokens !== undefined) {
|
|
494
497
|
generationConfig.maxOutputTokens = options.maxTokens;
|
|
495
498
|
}
|
|
496
|
-
if (!
|
|
499
|
+
if (!isGemini38Flash && options.topP !== undefined) {
|
|
497
500
|
generationConfig.topP = options.topP;
|
|
498
501
|
}
|
|
499
|
-
if (!
|
|
502
|
+
if (!isGemini38Flash && options.topK !== undefined) {
|
|
500
503
|
generationConfig.topK = options.topK;
|
|
501
504
|
}
|
|
502
|
-
if (!
|
|
505
|
+
if (!isGemini38Flash && options.minP !== undefined) {
|
|
503
506
|
generationConfig.minP = options.minP;
|
|
504
507
|
}
|
|
505
|
-
if (!
|
|
508
|
+
if (!isGemini38Flash && options.presencePenalty !== undefined) {
|
|
506
509
|
generationConfig.presencePenalty = options.presencePenalty;
|
|
507
510
|
}
|
|
508
|
-
if (!
|
|
511
|
+
if (!isGemini38Flash && options.repetitionPenalty !== undefined) {
|
|
509
512
|
generationConfig.repetitionPenalty = options.repetitionPenalty;
|
|
510
513
|
}
|
|
511
514
|
|
|
@@ -527,11 +530,11 @@ export function buildGoogleVertexParams(
|
|
|
527
530
|
config.toolConfig = undefined;
|
|
528
531
|
}
|
|
529
532
|
|
|
530
|
-
if (model.reasoning && (options.thinking?.enabled ||
|
|
533
|
+
if (model.reasoning && (options.thinking?.enabled || isGemini38Flash)) {
|
|
531
534
|
const cfg: ThinkingConfig = { includeThoughts: true };
|
|
532
535
|
if (options.thinking?.level !== undefined) {
|
|
533
536
|
cfg.thinkingLevel = THINKING_LEVEL_MAP[options.thinking.level];
|
|
534
|
-
} else if (
|
|
537
|
+
} else if (isGemini38Flash) {
|
|
535
538
|
cfg.thinkingLevel = ThinkingLevel.HIGH;
|
|
536
539
|
} else if (options.thinking?.budgetTokens !== undefined) {
|
|
537
540
|
cfg.thinkingBudget = options.thinking.budgetTokens;
|