@memberjunction/ai-vertex 4.2.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ai-vertex",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.3.1",
|
|
5
5
|
"description": "MemberJunction Wrapper for Google Vertex AI Models",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -11,25 +11,22 @@
|
|
|
11
11
|
"scripts": {
|
|
12
12
|
"start": "ts-node-dev src/index.ts",
|
|
13
13
|
"build": "tsc && tsc-alias -f",
|
|
14
|
-
"test": "
|
|
15
|
-
"test:watch": "
|
|
16
|
-
"test:coverage": "
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"test:watch": "vitest",
|
|
16
|
+
"test:coverage": "vitest run --coverage"
|
|
17
17
|
},
|
|
18
18
|
"author": "MemberJunction.com",
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@types/jest": "^30.0.0",
|
|
22
|
-
"dotenv": "^17.2.4",
|
|
23
|
-
"jest": "^30.2.0",
|
|
24
|
-
"ts-jest": "^29.4.6",
|
|
25
21
|
"ts-node-dev": "^2.0.0",
|
|
26
|
-
"typescript": "^5.9.3"
|
|
22
|
+
"typescript": "^5.9.3",
|
|
23
|
+
"vitest": "^4.0.18"
|
|
27
24
|
},
|
|
28
25
|
"dependencies": {
|
|
29
26
|
"@google/genai": "^1.40.0",
|
|
30
|
-
"@memberjunction/ai": "4.
|
|
31
|
-
"@memberjunction/ai-gemini": "4.
|
|
32
|
-
"@memberjunction/global": "4.
|
|
27
|
+
"@memberjunction/ai": "4.3.1",
|
|
28
|
+
"@memberjunction/ai-gemini": "4.3.1",
|
|
29
|
+
"@memberjunction/global": "4.3.1"
|
|
33
30
|
},
|
|
34
31
|
"repository": {
|
|
35
32
|
"type": "git",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vertexLLM.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/vertexLLM.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,437 +0,0 @@
|
|
|
1
|
-
import { VertexLLM } from '../models/vertexLLM.js';
|
|
2
|
-
import { ChatMessageRole, ModelUsage } from '@memberjunction/ai';
|
|
3
|
-
/**
|
|
4
|
-
* Test suite for VertexLLM
|
|
5
|
-
*
|
|
6
|
-
* VertexLLM extends GeminiLLM and inherits all its functionality (chat, streaming,
|
|
7
|
-
* thinking, multimodal, etc.). These tests focus on:
|
|
8
|
-
* 1. Constructor and authentication configuration
|
|
9
|
-
* 2. Basic integration tests (if credentials are available)
|
|
10
|
-
*
|
|
11
|
-
* Setup Requirements:
|
|
12
|
-
* 1. Set VERTEX_PROJECT_ID environment variable
|
|
13
|
-
* 2. Set VERTEX_SERVICE_ACCOUNT_KEY_PATH to path of JSON key file (optional)
|
|
14
|
-
* 3. Set VERTEX_LOCATION (optional, defaults to 'us-central1')
|
|
15
|
-
*
|
|
16
|
-
* To run tests:
|
|
17
|
-
* ```bash
|
|
18
|
-
* export VERTEX_PROJECT_ID="your-project-id"
|
|
19
|
-
* export VERTEX_SERVICE_ACCOUNT_KEY_PATH="/path/to/service-account-key.json"
|
|
20
|
-
* npm test
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
describe('VertexLLM', () => {
|
|
24
|
-
const projectId = process.env.VERTEX_PROJECT_ID || 'test-project';
|
|
25
|
-
const keyPath = process.env.VERTEX_SERVICE_ACCOUNT_KEY_PATH;
|
|
26
|
-
const location = process.env.VERTEX_LOCATION || 'us-central1';
|
|
27
|
-
// Build credentials JSON based on what's available
|
|
28
|
-
const buildCredentialsJson = () => JSON.stringify({
|
|
29
|
-
project: projectId,
|
|
30
|
-
location: location,
|
|
31
|
-
...(keyPath ? { keyFilePath: keyPath } : {})
|
|
32
|
-
});
|
|
33
|
-
describe('Constructor - Credential Formats', () => {
|
|
34
|
-
it('should accept ADC credentials format', () => {
|
|
35
|
-
const creds = JSON.stringify({
|
|
36
|
-
project: 'test-project',
|
|
37
|
-
location: 'us-central1'
|
|
38
|
-
});
|
|
39
|
-
const llm = new VertexLLM(creds);
|
|
40
|
-
expect(llm.Credentials.project).toBe('test-project');
|
|
41
|
-
expect(llm.Credentials.location).toBe('us-central1');
|
|
42
|
-
});
|
|
43
|
-
it('should accept service account JSON format', () => {
|
|
44
|
-
const creds = JSON.stringify({
|
|
45
|
-
type: 'service_account',
|
|
46
|
-
project_id: 'test-project',
|
|
47
|
-
private_key: '-----BEGIN PRIVATE KEY-----\ntest\n-----END PRIVATE KEY-----\n',
|
|
48
|
-
client_email: 'test@test.iam.gserviceaccount.com',
|
|
49
|
-
location: 'us-central1'
|
|
50
|
-
});
|
|
51
|
-
const llm = new VertexLLM(creds);
|
|
52
|
-
expect(llm.Credentials.project).toBe('test-project');
|
|
53
|
-
});
|
|
54
|
-
it('should accept keyFilePath format', () => {
|
|
55
|
-
const creds = JSON.stringify({
|
|
56
|
-
keyFilePath: '/path/to/key.json',
|
|
57
|
-
project: 'test-project',
|
|
58
|
-
location: 'us-central1'
|
|
59
|
-
});
|
|
60
|
-
const llm = new VertexLLM(creds);
|
|
61
|
-
expect(llm.Credentials.keyFilePath).toBe('/path/to/key.json');
|
|
62
|
-
});
|
|
63
|
-
it('should throw error for invalid JSON', () => {
|
|
64
|
-
expect(() => new VertexLLM('not json')).toThrow('Invalid Vertex AI credentials JSON');
|
|
65
|
-
});
|
|
66
|
-
it('should throw error for missing project', () => {
|
|
67
|
-
expect(() => new VertexLLM(JSON.stringify({ location: 'us-central1' })))
|
|
68
|
-
.toThrow('must include "project"');
|
|
69
|
-
});
|
|
70
|
-
it('should default location to us-central1', () => {
|
|
71
|
-
const creds = JSON.stringify({ project: 'test-project' });
|
|
72
|
-
const llm = new VertexLLM(creds);
|
|
73
|
-
expect(llm.Credentials.location).toBe('us-central1');
|
|
74
|
-
});
|
|
75
|
-
it('should use project_id over project if both provided', () => {
|
|
76
|
-
const creds = JSON.stringify({
|
|
77
|
-
project: 'wrong-project',
|
|
78
|
-
project_id: 'correct-project',
|
|
79
|
-
location: 'us-central1'
|
|
80
|
-
});
|
|
81
|
-
const llm = new VertexLLM(creds);
|
|
82
|
-
expect(llm.Credentials.project).toBe('correct-project');
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
describe('Instance Properties', () => {
|
|
86
|
-
let vertexLLM;
|
|
87
|
-
beforeEach(() => {
|
|
88
|
-
vertexLLM = new VertexLLM(buildCredentialsJson());
|
|
89
|
-
});
|
|
90
|
-
it('should create instance successfully', () => {
|
|
91
|
-
expect(vertexLLM).toBeInstanceOf(VertexLLM);
|
|
92
|
-
});
|
|
93
|
-
it('should expose GeminiClient getter (inherited)', async () => {
|
|
94
|
-
// GeminiClient requires async initialization - make a chat call to trigger it
|
|
95
|
-
const params = {
|
|
96
|
-
messages: [{ role: 'user', content: 'test' }],
|
|
97
|
-
model: 'gemini-2.0-flash-exp',
|
|
98
|
-
temperature: 0.7
|
|
99
|
-
};
|
|
100
|
-
// This will initialize the client (or fail gracefully if no credentials)
|
|
101
|
-
try {
|
|
102
|
-
await vertexLLM.ChatCompletion(params);
|
|
103
|
-
}
|
|
104
|
-
catch (error) {
|
|
105
|
-
// Expected to fail without real credentials
|
|
106
|
-
}
|
|
107
|
-
// Now the client should be initialized
|
|
108
|
-
expect(vertexLLM.GeminiClient).toBeDefined();
|
|
109
|
-
});
|
|
110
|
-
it('should expose Credentials getter', () => {
|
|
111
|
-
const creds = vertexLLM.Credentials;
|
|
112
|
-
expect(creds.project).toBe(projectId);
|
|
113
|
-
expect(creds.location).toBe(location);
|
|
114
|
-
});
|
|
115
|
-
it('should report streaming support (inherited from GeminiLLM)', () => {
|
|
116
|
-
expect(vertexLLM.SupportsStreaming).toBe(true);
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
describe('Chat Completion - Integration Tests', () => {
|
|
120
|
-
// Skip actual API calls in CI/CD - only run when credentials are available
|
|
121
|
-
const shouldRunIntegrationTests = process.env.VERTEX_PROJECT_ID &&
|
|
122
|
-
process.env.VERTEX_SERVICE_ACCOUNT_KEY_PATH;
|
|
123
|
-
let vertexLLM;
|
|
124
|
-
beforeEach(() => {
|
|
125
|
-
if (shouldRunIntegrationTests) {
|
|
126
|
-
vertexLLM = new VertexLLM(buildCredentialsJson());
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
it('should handle simple text completion', async () => {
|
|
130
|
-
if (!shouldRunIntegrationTests) {
|
|
131
|
-
console.log('Skipping integration test - credentials not configured');
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
const params = {
|
|
135
|
-
messages: [
|
|
136
|
-
{
|
|
137
|
-
role: ChatMessageRole.user,
|
|
138
|
-
content: 'What is 2+2? Reply with just the number.'
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
model: 'gemini-2.5-flash',
|
|
142
|
-
temperature: 0.1,
|
|
143
|
-
maxOutputTokens: 10
|
|
144
|
-
};
|
|
145
|
-
const result = await vertexLLM.ChatCompletion(params);
|
|
146
|
-
if (!result.success) {
|
|
147
|
-
console.error('Chat completion failed:', result.errorMessage);
|
|
148
|
-
console.error('Exception details:', JSON.stringify(result.exception, null, 2));
|
|
149
|
-
if (result.errorInfo) {
|
|
150
|
-
console.error('Error info:', JSON.stringify(result.errorInfo, null, 2));
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
expect(result.success).toBe(true);
|
|
154
|
-
expect(result.data.choices).toHaveLength(1);
|
|
155
|
-
expect(result.data.choices[0].message.content).toBeTruthy();
|
|
156
|
-
expect(result.data.choices[0].message.role).toBe(ChatMessageRole.assistant);
|
|
157
|
-
expect(result.data.usage).toBeInstanceOf(ModelUsage);
|
|
158
|
-
expect(result.data.usage.promptTokens).toBeGreaterThan(0);
|
|
159
|
-
expect(result.data.usage.completionTokens).toBeGreaterThan(0);
|
|
160
|
-
}, 30000);
|
|
161
|
-
it('should handle system messages (inherited from GeminiLLM)', async () => {
|
|
162
|
-
if (!shouldRunIntegrationTests) {
|
|
163
|
-
console.log('Skipping integration test - credentials not configured');
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
const params = {
|
|
167
|
-
messages: [
|
|
168
|
-
{
|
|
169
|
-
role: ChatMessageRole.system,
|
|
170
|
-
content: 'You are a helpful math tutor. Always explain your answers.'
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
role: ChatMessageRole.user,
|
|
174
|
-
content: 'What is 5+3?'
|
|
175
|
-
}
|
|
176
|
-
],
|
|
177
|
-
model: 'gemini-2.5-flash',
|
|
178
|
-
temperature: 0.5
|
|
179
|
-
};
|
|
180
|
-
const result = await vertexLLM.ChatCompletion(params);
|
|
181
|
-
if (!result.success) {
|
|
182
|
-
console.error('Chat completion failed:', result.errorMessage);
|
|
183
|
-
console.error('Exception details:', JSON.stringify(result.exception, null, 2));
|
|
184
|
-
if (result.errorInfo) {
|
|
185
|
-
console.error('Error info:', JSON.stringify(result.errorInfo, null, 2));
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
expect(result.success).toBe(true);
|
|
189
|
-
expect(result.data.choices[0].message.content).toContain('8');
|
|
190
|
-
}, 30000);
|
|
191
|
-
it('should handle conversation history (inherited from GeminiLLM)', async () => {
|
|
192
|
-
if (!shouldRunIntegrationTests) {
|
|
193
|
-
console.log('Skipping integration test - credentials not configured');
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
const params = {
|
|
197
|
-
messages: [
|
|
198
|
-
{
|
|
199
|
-
role: ChatMessageRole.user,
|
|
200
|
-
content: 'My name is Alice.'
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
role: ChatMessageRole.assistant,
|
|
204
|
-
content: 'Hello Alice! Nice to meet you.'
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
role: ChatMessageRole.user,
|
|
208
|
-
content: 'What is my name?'
|
|
209
|
-
}
|
|
210
|
-
],
|
|
211
|
-
model: 'gemini-2.5-flash',
|
|
212
|
-
temperature: 0.1
|
|
213
|
-
};
|
|
214
|
-
const result = await vertexLLM.ChatCompletion(params);
|
|
215
|
-
if (!result.success) {
|
|
216
|
-
console.error('Chat completion failed:', result.errorMessage);
|
|
217
|
-
console.error('Exception details:', JSON.stringify(result.exception, null, 2));
|
|
218
|
-
if (result.errorInfo) {
|
|
219
|
-
console.error('Error info:', JSON.stringify(result.errorInfo, null, 2));
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
expect(result.success).toBe(true);
|
|
223
|
-
expect(result.data.choices[0].message.content.toLowerCase()).toContain('alice');
|
|
224
|
-
}, 30000);
|
|
225
|
-
it.skip('should support streaming with callbacks (inherited from GeminiLLM)', async () => {
|
|
226
|
-
if (!shouldRunIntegrationTests) {
|
|
227
|
-
console.log('Skipping integration test - credentials not configured');
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
const chunks = [];
|
|
231
|
-
let completeCalled = false;
|
|
232
|
-
const params = {
|
|
233
|
-
messages: [
|
|
234
|
-
{
|
|
235
|
-
role: ChatMessageRole.user,
|
|
236
|
-
content: 'Count from 1 to 3.'
|
|
237
|
-
}
|
|
238
|
-
],
|
|
239
|
-
model: 'gemini-2.5-flash',
|
|
240
|
-
temperature: 0.1,
|
|
241
|
-
streaming: true,
|
|
242
|
-
streamingCallbacks: {
|
|
243
|
-
OnContent: (content) => {
|
|
244
|
-
chunks.push(content);
|
|
245
|
-
},
|
|
246
|
-
OnComplete: (result) => {
|
|
247
|
-
completeCalled = true;
|
|
248
|
-
expect(result.success).toBe(true);
|
|
249
|
-
},
|
|
250
|
-
OnError: (error) => {
|
|
251
|
-
throw new Error(`Streaming error: ${error}`);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
const result = await vertexLLM.ChatCompletion(params);
|
|
256
|
-
if (!result.success) {
|
|
257
|
-
console.error('Chat completion failed:', result.errorMessage);
|
|
258
|
-
console.error('Exception details:', JSON.stringify(result.exception, null, 2));
|
|
259
|
-
if (result.errorInfo) {
|
|
260
|
-
console.error('Error info:', JSON.stringify(result.errorInfo, null, 2));
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
expect(result.success).toBe(true);
|
|
264
|
-
expect(completeCalled).toBe(true);
|
|
265
|
-
// Streaming should return final result in data
|
|
266
|
-
expect(result.data.choices).toHaveLength(1);
|
|
267
|
-
expect(result.data.choices[0].message.content).toBeTruthy();
|
|
268
|
-
expect(result.data.choices[0].message.content.length).toBeGreaterThan(0);
|
|
269
|
-
// Note: OnContent callbacks may or may not fire depending on provider implementation
|
|
270
|
-
// What matters is that streaming mode completes successfully
|
|
271
|
-
}, 30000);
|
|
272
|
-
it('should handle thinking/reasoning for Gemini 2.5+ models', async () => {
|
|
273
|
-
if (!shouldRunIntegrationTests) {
|
|
274
|
-
console.log('Skipping integration test - credentials not configured');
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
const params = {
|
|
278
|
-
messages: [
|
|
279
|
-
{
|
|
280
|
-
role: ChatMessageRole.user,
|
|
281
|
-
content: 'Solve: If x + 5 = 12, what is x?'
|
|
282
|
-
}
|
|
283
|
-
],
|
|
284
|
-
model: 'gemini-2.5-flash',
|
|
285
|
-
temperature: 0.3,
|
|
286
|
-
effortLevel: '50' // Medium thinking effort (string for compatibility)
|
|
287
|
-
};
|
|
288
|
-
const result = await vertexLLM.ChatCompletion(params);
|
|
289
|
-
if (!result.success) {
|
|
290
|
-
console.error('Chat completion failed:', result.errorMessage);
|
|
291
|
-
console.error('Exception details:', JSON.stringify(result.exception, null, 2));
|
|
292
|
-
if (result.errorInfo) {
|
|
293
|
-
console.error('Error info:', JSON.stringify(result.errorInfo, null, 2));
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
expect(result.success).toBe(true);
|
|
297
|
-
expect(result.data.choices[0].message.content).toBeTruthy();
|
|
298
|
-
// Note: thinking content may or may not be present depending on model version
|
|
299
|
-
}, 30000);
|
|
300
|
-
});
|
|
301
|
-
describe('Gemini 3 Models - Integration Tests', () => {
|
|
302
|
-
// Skip actual API calls in CI/CD - only run when credentials are available
|
|
303
|
-
const shouldRunIntegrationTests = process.env.VERTEX_PROJECT_ID &&
|
|
304
|
-
process.env.VERTEX_SERVICE_ACCOUNT_KEY_PATH;
|
|
305
|
-
let vertexLLM;
|
|
306
|
-
beforeEach(() => {
|
|
307
|
-
if (shouldRunIntegrationTests) {
|
|
308
|
-
// Gemini 3 preview models require 'global' location, not regional endpoints
|
|
309
|
-
// See: https://github.com/block/goose/issues/6186
|
|
310
|
-
const gemini3CredentialsJson = JSON.stringify({
|
|
311
|
-
project: projectId,
|
|
312
|
-
location: 'global', // Must use global for Gemini 3 preview models
|
|
313
|
-
...(keyPath ? { keyFilePath: keyPath } : {})
|
|
314
|
-
});
|
|
315
|
-
vertexLLM = new VertexLLM(gemini3CredentialsJson);
|
|
316
|
-
}
|
|
317
|
-
});
|
|
318
|
-
it('should work with Gemini 3 Flash', async () => {
|
|
319
|
-
if (!shouldRunIntegrationTests) {
|
|
320
|
-
console.log('Skipping integration test - credentials not configured');
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
|
-
const params = {
|
|
324
|
-
messages: [
|
|
325
|
-
{
|
|
326
|
-
role: ChatMessageRole.user,
|
|
327
|
-
content: 'What is the capital of France? Reply with just the city name.'
|
|
328
|
-
}
|
|
329
|
-
],
|
|
330
|
-
model: 'gemini-3-flash-preview',
|
|
331
|
-
temperature: 0.1,
|
|
332
|
-
maxOutputTokens: 20
|
|
333
|
-
};
|
|
334
|
-
const result = await vertexLLM.ChatCompletion(params);
|
|
335
|
-
// Gemini 3 models may not be available in all projects (preview status)
|
|
336
|
-
if (!result.success) {
|
|
337
|
-
console.log('Gemini 3 Flash not available (preview), skipping:', result.errorMessage);
|
|
338
|
-
return; // Skip test if model not available
|
|
339
|
-
}
|
|
340
|
-
expect(result.success).toBe(true);
|
|
341
|
-
expect(result.data.choices).toHaveLength(1);
|
|
342
|
-
expect(result.data.choices[0].message.content).toBeTruthy();
|
|
343
|
-
expect(result.data.choices[0].message.content.toLowerCase()).toContain('paris');
|
|
344
|
-
}, 30000);
|
|
345
|
-
it('should work with Gemini 3 Pro for complex reasoning', async () => {
|
|
346
|
-
if (!shouldRunIntegrationTests) {
|
|
347
|
-
console.log('Skipping integration test - credentials not configured');
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
const params = {
|
|
351
|
-
messages: [
|
|
352
|
-
{
|
|
353
|
-
role: ChatMessageRole.user,
|
|
354
|
-
content: 'Write a function in Python that calculates fibonacci numbers. Keep it concise.'
|
|
355
|
-
}
|
|
356
|
-
],
|
|
357
|
-
model: 'gemini-3-pro-preview',
|
|
358
|
-
temperature: 0.3,
|
|
359
|
-
maxOutputTokens: 200,
|
|
360
|
-
effortLevel: '75' // High reasoning effort
|
|
361
|
-
};
|
|
362
|
-
const result = await vertexLLM.ChatCompletion(params);
|
|
363
|
-
// Gemini 3 models may not be available in all projects (preview status)
|
|
364
|
-
if (!result.success) {
|
|
365
|
-
console.log('Gemini 3 Pro not available (preview), skipping:', result.errorMessage);
|
|
366
|
-
return; // Skip test if model not available
|
|
367
|
-
}
|
|
368
|
-
expect(result.success).toBe(true);
|
|
369
|
-
expect(result.data.choices).toHaveLength(1);
|
|
370
|
-
const content = result.data.choices[0].message.content;
|
|
371
|
-
expect(content).toBeTruthy();
|
|
372
|
-
expect(content.toLowerCase()).toContain('def');
|
|
373
|
-
// Model may use "fib" or "fibonacci" as function name
|
|
374
|
-
expect(content.toLowerCase()).toMatch(/fib(onacci)?/);
|
|
375
|
-
}, 30000);
|
|
376
|
-
it('should handle Gemini 3 Pro Image for image generation', async () => {
|
|
377
|
-
if (!shouldRunIntegrationTests) {
|
|
378
|
-
console.log('Skipping integration test - credentials not configured');
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
const params = {
|
|
382
|
-
messages: [
|
|
383
|
-
{
|
|
384
|
-
role: ChatMessageRole.user,
|
|
385
|
-
content: 'Describe what a blue sky looks like. Keep it brief.'
|
|
386
|
-
}
|
|
387
|
-
],
|
|
388
|
-
model: 'gemini-3-pro-image-preview',
|
|
389
|
-
temperature: 0.5,
|
|
390
|
-
maxOutputTokens: 100
|
|
391
|
-
};
|
|
392
|
-
const result = await vertexLLM.ChatCompletion(params);
|
|
393
|
-
// Gemini 3 Pro Image may not be available in all projects (preview status)
|
|
394
|
-
if (!result.success) {
|
|
395
|
-
console.log('Gemini 3 Pro Image not available (preview), skipping:', result.errorMessage);
|
|
396
|
-
return; // Skip test if model not available
|
|
397
|
-
}
|
|
398
|
-
expect(result.success).toBe(true);
|
|
399
|
-
expect(result.data.choices).toHaveLength(1);
|
|
400
|
-
expect(result.data.choices[0].message.content).toBeTruthy();
|
|
401
|
-
}, 60000); // Increased timeout for slower image model
|
|
402
|
-
});
|
|
403
|
-
describe('Error Handling (inherited from GeminiLLM)', () => {
|
|
404
|
-
let vertexLLM;
|
|
405
|
-
beforeEach(() => {
|
|
406
|
-
vertexLLM = new VertexLLM(buildCredentialsJson());
|
|
407
|
-
});
|
|
408
|
-
it('should handle invalid model name gracefully', async () => {
|
|
409
|
-
const params = {
|
|
410
|
-
messages: [
|
|
411
|
-
{
|
|
412
|
-
role: ChatMessageRole.user,
|
|
413
|
-
content: 'Test message'
|
|
414
|
-
}
|
|
415
|
-
],
|
|
416
|
-
model: 'nonexistent-model-xyz-123',
|
|
417
|
-
temperature: 0.5
|
|
418
|
-
};
|
|
419
|
-
const result = await vertexLLM.ChatCompletion(params);
|
|
420
|
-
expect(result.success).toBe(false);
|
|
421
|
-
expect(result.errorMessage).toBeTruthy();
|
|
422
|
-
expect(result.exception).toBeDefined();
|
|
423
|
-
expect(result.errorInfo).toBeDefined();
|
|
424
|
-
}, 30000);
|
|
425
|
-
it('should handle empty messages array', async () => {
|
|
426
|
-
const params = {
|
|
427
|
-
messages: [],
|
|
428
|
-
model: 'gemini-2.5-flash',
|
|
429
|
-
temperature: 0.5
|
|
430
|
-
};
|
|
431
|
-
const result = await vertexLLM.ChatCompletion(params);
|
|
432
|
-
expect(result).toBeDefined();
|
|
433
|
-
expect(result.success).toBeDefined();
|
|
434
|
-
}, 30000);
|
|
435
|
-
});
|
|
436
|
-
});
|
|
437
|
-
//# sourceMappingURL=vertexLLM.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vertexLLM.test.js","sourceRoot":"","sources":["../../src/__tests__/vertexLLM.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAc,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,cAAc,CAAC;IAClE,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC;IAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,aAAa,CAAC;IAE9D,mDAAmD;IACnD,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;QAChD,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,QAAQ;QAClB,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC7C,CAAC,CAAC;IAEH,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAChD,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;YAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;gBAC3B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