@ssweens/pi-vertex 1.1.13 → 1.4.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/models/maas.ts CHANGED
@@ -1,14 +1,58 @@
1
1
  /**
2
- * MaaS (Model-as-a-Service) open model definitions for Vertex AI
3
- * Source: https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models
4
- * Pricing: https://cloud.google.com/vertex-ai/generative-ai/pricing#partner-models
5
- * All prices per 1M tokens
2
+ * MaaS (Model-as-a-Service) open and partner model definitions for Vertex AI
3
+ * Source: https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/maas/use-open-models
4
+ * Pricing: https://cloud.google.com/model-garden/partner-models/pricing
5
+ * All prices per 1M tokens (<= 200K input tokens where pricing is tiered)
6
+ *
7
+ * Retired and removed: the open model endpoints Google shut down on 2026-10-21
8
+ * (DeepSeek V3.2/V3.1/R1/OCR, GLM 5/4.7, gpt-oss-20b, Kimi K2 Thinking,
9
+ * Llama 3.3 70B, MiniMax M2, Qwen3 235B/Coder/Next) and Grok 4.1 Fast
10
+ * (shut down 2026-08-20).
6
11
  */
7
12
 
8
13
  import type { VertexModelConfig } from "../types.js";
9
14
 
10
15
  export const MAAS_MODELS: VertexModelConfig[] = [
11
16
  // --- xAI Grok ---
17
+ // Grok 4.7: GA 2026-09-30. Same context and prices as Grok 4.6 (2x above 200K input).
18
+ {
19
+ id: "grok-4.7",
20
+ name: "Grok 4.7",
21
+ apiId: "grok-4.7",
22
+ publisher: "xai",
23
+ endpointType: "maas",
24
+ contextWindow: 524288,
25
+ maxTokens: 32000,
26
+ input: ["text", "image"],
27
+ reasoning: true,
28
+ tools: true,
29
+ cost: {
30
+ input: 2.00,
31
+ output: 6.00,
32
+ cacheRead: 0.50,
33
+ cacheWrite: 0,
34
+ },
35
+ region: "global",
36
+ },
37
+ {
38
+ id: "grok-4.6",
39
+ name: "Grok 4.6",
40
+ apiId: "grok-4.6",
41
+ publisher: "xai",
42
+ endpointType: "maas",
43
+ contextWindow: 524288,
44
+ maxTokens: 32000,
45
+ input: ["text", "image"],
46
+ reasoning: true,
47
+ tools: true,
48
+ cost: {
49
+ input: 2.00,
50
+ output: 6.00,
51
+ cacheRead: 0.50,
52
+ cacheWrite: 0,
53
+ },
54
+ region: "global",
55
+ },
12
56
  {
13
57
  id: "grok-4.3",
14
58
  name: "Grok 4.3",
@@ -47,24 +91,96 @@ export const MAAS_MODELS: VertexModelConfig[] = [
47
91
  },
48
92
  region: "global",
49
93
  },
94
+
50
95
  {
51
- id: "grok-4.1-fast-reasoning",
52
- name: "Grok 4.1 Fast Reasoning",
53
- apiId: "grok-4.1-fast-reasoning",
96
+ id: "grok-4.20-non-reasoning",
97
+ name: "Grok 4.20 Non-Reasoning",
98
+ apiId: "grok-4.20-non-reasoning",
54
99
  publisher: "xai",
55
100
  endpointType: "maas",
56
- contextWindow: 2000000,
101
+ contextWindow: 1000000,
57
102
  maxTokens: 32000,
58
103
  input: ["text", "image"],
104
+ reasoning: false,
105
+ tools: true,
106
+ cost: {
107
+ input: 1.25,
108
+ output: 2.50,
109
+ cacheRead: 0.20,
110
+ cacheWrite: 0,
111
+ },
112
+ region: "global",
113
+ },
114
+
115
+ // --- Meta Muse (Preview) ---
116
+ // Served only through the stateless OpenAI-compatible Responses API on the
117
+ // global endpoint (no chat completions, no `store: true`). Input and output
118
+ // share the 1,048,576-token context; maxTokens is a default that leaves room
119
+ // for input. Reasoning effort minimal..xhigh (Ember also max); `none` is
120
+ // rejected, so "off" sends no effort and the model uses its default.
121
+ {
122
+ id: "muse-wonder-1.0",
123
+ name: "Muse Wonder 1.0",
124
+ apiId: "muse-wonder-1.0",
125
+ publisher: "meta",
126
+ endpointType: "maas",
127
+ maasApi: "responses",
128
+ contextWindow: 1048576,
129
+ maxTokens: 128000,
130
+ input: ["text", "image"],
131
+ reasoning: true,
132
+ tools: true,
133
+ cost: {
134
+ input: 4.00,
135
+ output: 20.00,
136
+ cacheRead: 0.20,
137
+ cacheWrite: 0,
138
+ },
139
+ region: "global",
140
+ thinkingLevelMap: { xhigh: "xhigh" },
141
+ },
142
+ {
143
+ id: "muse-spark-1.3",
144
+ name: "Muse Spark 1.3",
145
+ apiId: "muse-spark-1.3",
146
+ publisher: "meta",
147
+ endpointType: "maas",
148
+ maasApi: "responses",
149
+ contextWindow: 1048576,
150
+ maxTokens: 128000,
151
+ input: ["text", "image"],
152
+ reasoning: true,
153
+ tools: true,
154
+ cost: {
155
+ input: 1.25,
156
+ output: 4.25,
157
+ cacheRead: 0.15,
158
+ cacheWrite: 0,
159
+ },
160
+ region: "global",
161
+ thinkingLevelMap: { xhigh: "xhigh" },
162
+ },
163
+ {
164
+ id: "muse-ember-1.0",
165
+ name: "Muse Ember 1.0",
166
+ apiId: "muse-ember-1.0",
167
+ publisher: "meta",
168
+ endpointType: "maas",
169
+ maasApi: "responses",
170
+ contextWindow: 1048576,
171
+ maxTokens: 128000,
172
+ input: ["text", "image"],
59
173
  reasoning: true,
60
174
  tools: true,
175
+ // Above 200K input every token bills at 3x ($0.30/$1.50/$0.012).
61
176
  cost: {
62
- input: 0.20,
177
+ input: 0.10,
63
178
  output: 0.50,
64
- cacheRead: 0.05,
179
+ cacheRead: 0.004,
65
180
  cacheWrite: 0,
66
181
  },
67
182
  region: "global",
183
+ thinkingLevelMap: { xhigh: "xhigh", max: "max" },
68
184
  },
69
185
 
70
186
  // --- Meta Llama ---
@@ -106,25 +222,6 @@ export const MAAS_MODELS: VertexModelConfig[] = [
106
222
  },
107
223
  region: "global",
108
224
  },
109
- {
110
- id: "llama-3.3-70b",
111
- name: "Llama 3.3 70B",
112
- apiId: "meta/llama-3.3-70b-instruct-maas",
113
- publisher: "meta",
114
- endpointType: "maas",
115
- contextWindow: 128000,
116
- maxTokens: 8192,
117
- input: ["text"],
118
- reasoning: false,
119
- tools: true,
120
- cost: {
121
- input: 0.72,
122
- output: 0.72,
123
- cacheRead: 0,
124
- cacheWrite: 0,
125
- },
126
- region: "global",
127
- },
128
225
 
129
226
  // --- Mistral AI ---
130
227
  {
@@ -205,238 +302,200 @@ export const MAAS_MODELS: VertexModelConfig[] = [
205
302
  },
206
303
 
207
304
  // --- DeepSeek ---
305
+ // DeepSeek-V4.1-Flash: global only. 1M context; output shares it, so maxTokens
306
+ // is a default. Thinks only when `reasoning_effort` is sent: minimal/low/medium/high/max
307
+ // (`xhigh` and `none` are rejected), so "off" sends nothing and does not think.
208
308
  {
209
- id: "deepseek-v3.2",
210
- name: "DeepSeek V3.2",
211
- apiId: "deepseek-ai/deepseek-v3.2-maas",
212
- publisher: "deepseek-ai",
213
- endpointType: "maas",
214
- contextWindow: 163840,
215
- maxTokens: 32000,
216
- input: ["text"],
217
- reasoning: true,
218
- tools: true,
219
- cost: {
220
- input: 0.56,
221
- output: 1.68,
222
- cacheRead: 0.056,
223
- cacheWrite: 0,
224
- },
225
- region: "global",
226
- },
227
- {
228
- id: "deepseek-v3.1",
229
- name: "DeepSeek V3.1",
230
- apiId: "deepseek-ai/deepseek-v3.1-maas",
309
+ id: "deepseek-v4.1-flash",
310
+ name: "DeepSeek V4.1 Flash",
311
+ apiId: "deepseek-ai/deepseek-v4.1-flash-maas",
231
312
  publisher: "deepseek-ai",
232
313
  endpointType: "maas",
233
- contextWindow: 163840,
234
- maxTokens: 32000,
235
- input: ["text"],
314
+ contextWindow: 1048576,
315
+ maxTokens: 65536,
316
+ input: ["text", "image"],
236
317
  reasoning: true,
237
318
  tools: true,
238
319
  cost: {
239
- input: 0.60,
240
- output: 1.70,
241
- cacheRead: 0.06,
320
+ input: 0.30,
321
+ output: 1.20,
322
+ cacheRead: 0.03,
242
323
  cacheWrite: 0,
243
324
  },
244
325
  region: "global",
326
+ thinkingLevelMap: { max: "max" },
245
327
  },
328
+
246
329
  {
247
- id: "deepseek-r1",
248
- name: "DeepSeek R1",
249
- apiId: "deepseek-ai/deepseek-r1-0528-maas",
330
+ id: "deepseek-v4.1-flash-1017",
331
+ name: "DeepSeek V4.1 Flash 1017",
332
+ apiId: "deepseek-ai/deepseek-v4.1-flash-1017-maas",
250
333
  publisher: "deepseek-ai",
251
334
  endpointType: "maas",
252
- contextWindow: 163840,
253
- maxTokens: 32000,
254
- input: ["text"],
335
+ contextWindow: 1048576,
336
+ maxTokens: 65536,
337
+ input: ["text", "image"],
255
338
  reasoning: true,
256
339
  tools: true,
257
- cost: {
258
- input: 1.35,
259
- output: 5.40,
260
- cacheRead: 0,
261
- cacheWrite: 0,
262
- },
263
- region: "global",
264
- },
265
- {
266
- id: "deepseek-ocr",
267
- name: "DeepSeek OCR",
268
- apiId: "deepseek-ai/deepseek-ocr-maas",
269
- publisher: "deepseek-ai",
270
- endpointType: "maas",
271
- contextWindow: 163840,
272
- maxTokens: 32000,
273
- input: ["text", "image"],
274
- reasoning: false,
275
- tools: false,
276
340
  cost: {
277
341
  input: 0.30,
278
342
  output: 1.20,
279
- cacheRead: 0,
343
+ cacheRead: 0.006,
280
344
  cacheWrite: 0,
281
345
  },
282
346
  region: "global",
347
+ thinkingLevelMap: { max: "max" },
283
348
  },
284
349
 
285
- // --- OpenAI (gpt-oss) ---
350
+ // --- OpenAI GPT (Private Preview) ---
351
+ // Responses API only, stateless with encrypted reasoning replay.
352
+ // Prices below are estimates from OpenAI's public Standard API model pages:
353
+ // https://developers.openai.com/api/docs/models (<= 272K input tokens).
354
+ // Vertex billing is governed by the customer's Marketplace private offer;
355
+ // Google does not publish GPT-6 rates on its partner-model pricing page.
286
356
  {
287
- id: "gpt-oss-120b",
288
- name: "GPT-OSS 120B",
289
- apiId: "openai/gpt-oss-120b-maas",
357
+ id: "gpt-6.2-astra",
358
+ name: "GPT 6.2 Astra",
359
+ apiId: "gpt-6.2-astra",
290
360
  publisher: "openai",
291
361
  endpointType: "maas",
292
- contextWindow: 131072,
293
- maxTokens: 32000,
294
- input: ["text"],
362
+ maasApi: "responses",
363
+ contextWindow: 1050000,
364
+ maxTokens: 128000,
365
+ input: ["text", "image"],
295
366
  reasoning: true,
296
367
  tools: true,
297
368
  cost: {
298
- input: 0.09,
299
- output: 0.36,
300
- cacheRead: 0,
369
+ input: 8.00,
370
+ output: 40.00,
371
+ cacheRead: 0.40,
301
372
  cacheWrite: 0,
302
373
  },
303
374
  region: "global",
375
+ thinkingLevelMap: { minimal: null, xhigh: "xhigh", max: "max" },
304
376
  },
305
377
  {
306
- id: "gpt-oss-20b",
307
- name: "GPT-OSS 20B",
308
- apiId: "openai/gpt-oss-20b-maas",
378
+ id: "gpt-6.2-sol",
379
+ name: "GPT 6.2 Sol",
380
+ apiId: "gpt-6.2-sol",
309
381
  publisher: "openai",
310
382
  endpointType: "maas",
311
- contextWindow: 131072,
312
- maxTokens: 32000,
313
- input: ["text"],
314
- reasoning: false,
315
- tools: true,
316
- cost: {
317
- input: 0.07,
318
- output: 0.25,
319
- cacheRead: 0.007,
320
- cacheWrite: 0,
321
- },
322
- region: "global",
323
- },
324
-
325
- // --- Qwen ---
326
- {
327
- id: "qwen3-235b",
328
- name: "Qwen 3 235B",
329
- apiId: "qwen/qwen3-235b-a22b-instruct-2507-maas",
330
- publisher: "qwen",
331
- endpointType: "maas",
332
- contextWindow: 262144,
333
- maxTokens: 32000,
334
- input: ["text"],
383
+ maasApi: "responses",
384
+ contextWindow: 1050000,
385
+ maxTokens: 128000,
386
+ input: ["text", "image"],
335
387
  reasoning: true,
336
388
  tools: true,
337
389
  cost: {
338
- input: 0.22,
339
- output: 0.88,
340
- cacheRead: 0,
390
+ input: 2.00,
391
+ output: 10.00,
392
+ cacheRead: 0.10,
341
393
  cacheWrite: 0,
342
394
  },
343
395
  region: "global",
396
+ thinkingLevelMap: { minimal: null, xhigh: "xhigh", max: "max" },
344
397
  },
345
398
  {
346
- id: "qwen3-next-instruct",
347
- name: "Qwen 3 Next Instruct",
348
- apiId: "qwen/qwen3-next-instruct-80b-maas",
349
- publisher: "qwen",
399
+ id: "gpt-6-astra",
400
+ name: "GPT 6.0 Astra",
401
+ apiId: "gpt-6-astra",
402
+ publisher: "openai",
350
403
  endpointType: "maas",
351
- contextWindow: 262144,
352
- maxTokens: 32000,
353
- input: ["text"],
404
+ maasApi: "responses",
405
+ contextWindow: 1050000,
406
+ maxTokens: 128000,
407
+ input: ["text", "image"],
354
408
  reasoning: true,
355
409
  tools: true,
356
410
  cost: {
357
- input: 0.15,
358
- output: 1.20,
359
- cacheRead: 0,
411
+ input: 10.00,
412
+ output: 50.00,
413
+ cacheRead: 1.00,
360
414
  cacheWrite: 0,
361
415
  },
362
416
  region: "global",
417
+ thinkingLevelMap: { minimal: null, xhigh: "xhigh", max: "max" },
363
418
  },
364
419
  {
365
- id: "qwen3-next-thinking",
366
- name: "Qwen 3 Next Thinking",
367
- apiId: "qwen/qwen3-next-thinking-80b-maas",
368
- publisher: "qwen",
420
+ id: "gpt-6.1-sol",
421
+ name: "GPT 6.1 Sol",
422
+ apiId: "gpt-6.1-sol",
423
+ publisher: "openai",
369
424
  endpointType: "maas",
370
- contextWindow: 262144,
371
- maxTokens: 32000,
372
- input: ["text"],
425
+ maasApi: "responses",
426
+ contextWindow: 1050000,
427
+ maxTokens: 128000,
428
+ input: ["text", "image"],
373
429
  reasoning: true,
374
430
  tools: true,
375
431
  cost: {
376
- input: 0.15,
377
- output: 1.20,
378
- cacheRead: 0,
432
+ input: 2.00,
433
+ output: 10.00,
434
+ cacheRead: 0.10,
379
435
  cacheWrite: 0,
380
436
  },
381
437
  region: "global",
438
+ thinkingLevelMap: { minimal: null, xhigh: "xhigh", max: "max" },
382
439
  },
383
440
  {
384
- id: "qwen3-coder",
385
- name: "Qwen 3 Coder",
386
- apiId: "qwen/qwen3-coder-480b-a35b-instruct-maas",
387
- publisher: "qwen",
441
+ id: "gpt-6.1-terra",
442
+ name: "GPT 6.1 Terra",
443
+ apiId: "gpt-6.1-terra",
444
+ publisher: "openai",
388
445
  endpointType: "maas",
389
- contextWindow: 262144,
390
- maxTokens: 32000,
391
- input: ["text"],
446
+ maasApi: "responses",
447
+ contextWindow: 1050000,
448
+ maxTokens: 128000,
449
+ input: ["text", "image"],
392
450
  reasoning: true,
393
451
  tools: true,
394
452
  cost: {
395
- input: 0.22,
396
- output: 1.80,
397
- cacheRead: 0.022,
453
+ input: 1.00,
454
+ output: 5.00,
455
+ cacheRead: 0.05,
398
456
  cacheWrite: 0,
399
457
  },
400
458
  region: "global",
459
+ thinkingLevelMap: { off: "none", minimal: null, xhigh: "xhigh", max: "max" },
401
460
  },
402
-
403
- // --- Moonshot ---
404
461
  {
405
- id: "kimi-k2-thinking",
406
- name: "Kimi K2 Thinking",
407
- apiId: "moonshotai/kimi-k2-thinking-maas",
408
- publisher: "moonshotai",
462
+ id: "gpt-6-luna",
463
+ name: "GPT 6.0 Luna",
464
+ apiId: "gpt-6-luna",
465
+ publisher: "openai",
409
466
  endpointType: "maas",
410
- contextWindow: 262144,
411
- maxTokens: 32000,
412
- input: ["text"],
467
+ maasApi: "responses",
468
+ contextWindow: 1050000,
469
+ maxTokens: 128000,
470
+ input: ["text", "image"],
413
471
  reasoning: true,
414
472
  tools: true,
415
473
  cost: {
416
- input: 0.60,
417
- output: 2.50,
418
- cacheRead: 0.06,
474
+ input: 0.10,
475
+ output: 0.50,
476
+ cacheRead: 0.01,
419
477
  cacheWrite: 0,
420
478
  },
421
479
  region: "global",
480
+ thinkingLevelMap: { off: "none", minimal: null, xhigh: "xhigh", max: "max" },
422
481
  },
423
482
 
424
- // --- MiniMax ---
483
+ // --- OpenAI (gpt-oss) ---
425
484
  {
426
- id: "minimax-m2",
427
- name: "MiniMax M2",
428
- apiId: "minimaxai/minimax-m2-maas",
429
- publisher: "minimaxai",
485
+ id: "gpt-oss-120b",
486
+ name: "GPT-OSS 120B",
487
+ apiId: "openai/gpt-oss-120b-maas",
488
+ publisher: "openai",
430
489
  endpointType: "maas",
431
- contextWindow: 196608,
490
+ contextWindow: 131072,
432
491
  maxTokens: 32000,
433
492
  input: ["text"],
434
493
  reasoning: true,
435
494
  tools: true,
436
495
  cost: {
437
- input: 0.30,
438
- output: 1.20,
439
- cacheRead: 0.03,
496
+ input: 0.09,
497
+ output: 0.36,
498
+ cacheRead: 0,
440
499
  cacheWrite: 0,
441
500
  },
442
501
  region: "global",
@@ -465,39 +524,20 @@ export const MAAS_MODELS: VertexModelConfig[] = [
465
524
 
466
525
  // --- GLM (Zhipu AI) ---
467
526
  {
468
- id: "glm-5",
469
- name: "GLM 5",
470
- apiId: "zai-org/glm-5-maas",
527
+ id: "glm-5.2",
528
+ name: "GLM 5.2",
529
+ apiId: "zai-org/glm-5.2-maas",
471
530
  publisher: "zai-org",
472
531
  endpointType: "maas",
473
- contextWindow: 200000,
474
- maxTokens: 32000,
475
- input: ["text"],
476
- reasoning: true,
477
- tools: true,
478
- cost: {
479
- input: 1.00,
480
- output: 3.20,
481
- cacheRead: 0.10,
482
- cacheWrite: 0,
483
- },
484
- region: "global",
485
- },
486
- {
487
- id: "glm-4.7",
488
- name: "GLM 4.7",
489
- apiId: "zai-org/glm-4.7-maas",
490
- publisher: "zai-org",
491
- endpointType: "maas",
492
- contextWindow: 200000,
493
- maxTokens: 32000,
532
+ contextWindow: 1000000,
533
+ maxTokens: 64000,
494
534
  input: ["text"],
495
535
  reasoning: true,
496
536
  tools: true,
497
537
  cost: {
498
- input: 0.60,
499
- output: 2.20,
500
- cacheRead: 0,
538
+ input: 1.40,
539
+ output: 4.40,
540
+ cacheRead: 0.14,
501
541
  cacheWrite: 0,
502
542
  },
503
543
  region: "global",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssweens/pi-vertex",
3
- "version": "1.1.13",
3
+ "version": "1.4.0",
4
4
  "description": "Google Vertex AI provider for Pi coding agent - supports Gemini, Claude, and all MaaS models",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -16,21 +16,30 @@
16
16
  "CHANGELOG.md",
17
17
  "TEST_COVERAGE.md",
18
18
  "LICENSE",
19
- "screenshot.png"
19
+ "screenshot.png",
20
+ "tests/"
20
21
  ],
21
22
  "scripts": {
22
23
  "clean": "echo 'nothing to clean'",
23
24
  "build": "echo 'nothing to build'",
24
- "check": "echo 'nothing to check'"
25
+ "check": "echo 'nothing to check'",
26
+ "test": "node --experimental-strip-types --test tests/*.mjs"
25
27
  },
26
28
  "dependencies": {
27
29
  "@anthropic-ai/vertex-sdk": "^0.14.4",
28
- "@google/genai": "^1.42.0",
30
+ "@google/genai": "^2.22.0",
29
31
  "google-auth-library": "^9.0.0"
30
32
  },
31
33
  "peerDependencies": {
32
- "@mariozechner/pi-ai": "*",
33
- "@mariozechner/pi-coding-agent": "*"
34
+ "@earendil-works/pi-ai": ">=0.99.1 <0.100.0",
35
+ "@earendil-works/pi-coding-agent": ">=0.99.1 <0.100.0"
36
+ },
37
+ "devDependencies": {
38
+ "@earendil-works/pi-ai": "0.99.1",
39
+ "@earendil-works/pi-coding-agent": "0.99.1"
40
+ },
41
+ "overrides": {
42
+ "@earendil-works/pi-ai": "$@earendil-works/pi-ai"
34
43
  },
35
44
  "pi": {
36
45
  "extensions": [