@ssweens/pi-vertex 1.1.13 → 1.3.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 +111 -0
- package/README.md +66 -35
- package/TEST_COVERAGE.md +22 -2
- package/auth.ts +1 -1
- package/config.ts +1 -1
- package/index.ts +16 -7
- package/models/claude.ts +188 -22
- package/models/gemini.ts +171 -42
- package/models/maas.ts +127 -261
- package/package.json +15 -6
- package/streaming/gemini.ts +69 -34
- package/streaming/index.ts +30 -1
- package/streaming/maas.ts +71 -33
- package/streaming/sse-comment-filter.ts +169 -0
- package/tests/first-byte-timeout-check.mjs +53 -0
- package/types.ts +22 -2
- package/utils.ts +5 -3
package/models/gemini.ts
CHANGED
|
@@ -3,11 +3,157 @@
|
|
|
3
3
|
* Source: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models
|
|
4
4
|
* Pricing: https://cloud.google.com/vertex-ai/generative-ai/pricing
|
|
5
5
|
* All prices per 1M tokens (standard tier, <= 200K input tokens)
|
|
6
|
+
* Verified against the Vertex AI model catalog on 2026-10-13; Gemini 4 entries
|
|
7
|
+
* re-verified against the Gemini Enterprise Agent Platform catalog on 2026-11-15.
|
|
6
8
|
*/
|
|
7
9
|
|
|
10
|
+
import type { ThinkingLevelMap } from "@earendil-works/pi-ai";
|
|
8
11
|
import type { VertexModelConfig } from "../types.js";
|
|
9
12
|
|
|
13
|
+
// Gemini 4 rejects MINIMAL (HTTP 400): hide it in Pi; streaming/gemini.ts also floors it to LOW.
|
|
14
|
+
const GEMINI_4_THINKING: ThinkingLevelMap = { minimal: null };
|
|
15
|
+
|
|
10
16
|
export const GEMINI_MODELS: VertexModelConfig[] = [
|
|
17
|
+
// --- Gemini 4 ---
|
|
18
|
+
// Unified 1M input+output limit. "Long decode" extends output to 1M tokens;
|
|
19
|
+
// 65536 is the per-segment streaming limit, consistent with the rest of the catalog.
|
|
20
|
+
// Implicit caching only; durable caching is on by default.
|
|
21
|
+
|
|
22
|
+
// GA 2026-11-12, short-term release (45-day retirement notice). Thinking levels
|
|
23
|
+
// LOW/MEDIUM/HIGH (default)/XHIGH — the only Gemini model that accepts XHIGH.
|
|
24
|
+
// Cache writes ($1.875/1M) bill from 2027-01-12; Gemini streams report no
|
|
25
|
+
// cache-write tokens, so cacheWrite stays 0.
|
|
26
|
+
{
|
|
27
|
+
id: "gemini-4-hydrogen",
|
|
28
|
+
name: "Gemini 4 Hydrogen",
|
|
29
|
+
apiId: "gemini-4-hydrogen",
|
|
30
|
+
publisher: "google",
|
|
31
|
+
endpointType: "gemini",
|
|
32
|
+
contextWindow: 1048576,
|
|
33
|
+
maxTokens: 65536,
|
|
34
|
+
input: ["text", "image"],
|
|
35
|
+
reasoning: true,
|
|
36
|
+
tools: true,
|
|
37
|
+
cost: {
|
|
38
|
+
input: 1.50,
|
|
39
|
+
output: 7.50,
|
|
40
|
+
cacheRead: 0.075,
|
|
41
|
+
cacheWrite: 0,
|
|
42
|
+
},
|
|
43
|
+
region: "global",
|
|
44
|
+
thinkingLevelMap: { ...GEMINI_4_THINKING, xhigh: "xhigh" },
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
// GA 2026-11-10, Google Frontier Model (verified enterprise customers in select
|
|
48
|
+
// regions). Thinking levels LOW/MEDIUM (default)/HIGH. Introductory pricing
|
|
49
|
+
// through 2026-11-30; rises to $4.00/$20.00 ($0.20 cached) after.
|
|
50
|
+
{
|
|
51
|
+
id: "gemini-4-carbon",
|
|
52
|
+
name: "Gemini 4 Carbon",
|
|
53
|
+
apiId: "gemini-4-carbon",
|
|
54
|
+
publisher: "google",
|
|
55
|
+
endpointType: "gemini",
|
|
56
|
+
contextWindow: 1048576,
|
|
57
|
+
maxTokens: 65536,
|
|
58
|
+
input: ["text", "image"],
|
|
59
|
+
reasoning: true,
|
|
60
|
+
tools: true,
|
|
61
|
+
cost: {
|
|
62
|
+
input: 2.00,
|
|
63
|
+
output: 10.00,
|
|
64
|
+
cacheRead: 0.10,
|
|
65
|
+
cacheWrite: 0,
|
|
66
|
+
},
|
|
67
|
+
region: "global",
|
|
68
|
+
thinkingLevelMap: GEMINI_4_THINKING,
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
// GA 2026-10-13. Thinking levels LOW/MEDIUM (default)/HIGH. Introductory
|
|
72
|
+
// pricing through 2026-11-30; rises to $4.00/$20.00 ($0.20 cached) after.
|
|
73
|
+
{
|
|
74
|
+
id: "gemini-4-argon",
|
|
75
|
+
name: "Gemini 4 Argon",
|
|
76
|
+
apiId: "gemini-4-argon",
|
|
77
|
+
publisher: "google",
|
|
78
|
+
endpointType: "gemini",
|
|
79
|
+
contextWindow: 1048576,
|
|
80
|
+
maxTokens: 65536,
|
|
81
|
+
input: ["text", "image"],
|
|
82
|
+
reasoning: true,
|
|
83
|
+
tools: true,
|
|
84
|
+
cost: {
|
|
85
|
+
input: 2.00,
|
|
86
|
+
output: 10.00,
|
|
87
|
+
cacheRead: 0.10,
|
|
88
|
+
cacheWrite: 0,
|
|
89
|
+
},
|
|
90
|
+
region: "global",
|
|
91
|
+
thinkingLevelMap: GEMINI_4_THINKING,
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
// --- Gemini 3.8 (GA, 2026-09-02) ---
|
|
95
|
+
{
|
|
96
|
+
id: "gemini-3.8-flash",
|
|
97
|
+
name: "Gemini 3.8 Flash",
|
|
98
|
+
apiId: "gemini-3.8-flash",
|
|
99
|
+
publisher: "google",
|
|
100
|
+
endpointType: "gemini",
|
|
101
|
+
contextWindow: 1048576,
|
|
102
|
+
maxTokens: 65536,
|
|
103
|
+
input: ["text", "image"],
|
|
104
|
+
reasoning: true,
|
|
105
|
+
tools: true,
|
|
106
|
+
cost: {
|
|
107
|
+
input: 0.75,
|
|
108
|
+
output: 3.75,
|
|
109
|
+
cacheRead: 0.075,
|
|
110
|
+
cacheWrite: 0,
|
|
111
|
+
},
|
|
112
|
+
region: "global",
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
// --- Gemini 3.7 (GA, 2026-08-13) ---
|
|
116
|
+
{
|
|
117
|
+
id: "gemini-3.7-flash",
|
|
118
|
+
name: "Gemini 3.7 Flash",
|
|
119
|
+
apiId: "gemini-3.7-flash",
|
|
120
|
+
publisher: "google",
|
|
121
|
+
endpointType: "gemini",
|
|
122
|
+
contextWindow: 1048576,
|
|
123
|
+
maxTokens: 65536,
|
|
124
|
+
input: ["text", "image"],
|
|
125
|
+
reasoning: true,
|
|
126
|
+
tools: true,
|
|
127
|
+
cost: {
|
|
128
|
+
input: 0.75,
|
|
129
|
+
output: 3.75,
|
|
130
|
+
cacheRead: 0.075,
|
|
131
|
+
cacheWrite: 0,
|
|
132
|
+
},
|
|
133
|
+
region: "global",
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
// --- Gemini 3.6 (GA, 2026-07-21) ---
|
|
137
|
+
{
|
|
138
|
+
id: "gemini-3.6-flash",
|
|
139
|
+
name: "Gemini 3.6 Flash",
|
|
140
|
+
apiId: "gemini-3.6-flash",
|
|
141
|
+
publisher: "google",
|
|
142
|
+
endpointType: "gemini",
|
|
143
|
+
contextWindow: 1048576,
|
|
144
|
+
maxTokens: 65536,
|
|
145
|
+
input: ["text", "image"],
|
|
146
|
+
reasoning: true,
|
|
147
|
+
tools: true,
|
|
148
|
+
cost: {
|
|
149
|
+
input: 1.50,
|
|
150
|
+
output: 7.50,
|
|
151
|
+
cacheRead: 0.15,
|
|
152
|
+
cacheWrite: 0,
|
|
153
|
+
},
|
|
154
|
+
region: "global",
|
|
155
|
+
},
|
|
156
|
+
|
|
11
157
|
// --- Gemini 3.5 (GA) ---
|
|
12
158
|
{
|
|
13
159
|
id: "gemini-3.5-flash",
|
|
@@ -28,8 +174,27 @@ export const GEMINI_MODELS: VertexModelConfig[] = [
|
|
|
28
174
|
},
|
|
29
175
|
region: "global",
|
|
30
176
|
},
|
|
177
|
+
{
|
|
178
|
+
id: "gemini-3.5-flash-lite",
|
|
179
|
+
name: "Gemini 3.5 Flash Lite",
|
|
180
|
+
apiId: "gemini-3.5-flash-lite",
|
|
181
|
+
publisher: "google",
|
|
182
|
+
endpointType: "gemini",
|
|
183
|
+
contextWindow: 1048576,
|
|
184
|
+
maxTokens: 65536,
|
|
185
|
+
input: ["text", "image"],
|
|
186
|
+
reasoning: true,
|
|
187
|
+
tools: true,
|
|
188
|
+
cost: {
|
|
189
|
+
input: 0.30,
|
|
190
|
+
output: 2.50,
|
|
191
|
+
cacheRead: 0.03,
|
|
192
|
+
cacheWrite: 0,
|
|
193
|
+
},
|
|
194
|
+
region: "global",
|
|
195
|
+
},
|
|
31
196
|
|
|
32
|
-
// --- Gemini 3.1 (Preview) ---
|
|
197
|
+
// --- Gemini 3.1 (Pro still Preview; Flash Lite now GA) ---
|
|
33
198
|
{
|
|
34
199
|
id: "gemini-3.1-pro",
|
|
35
200
|
name: "Gemini 3.1 Pro",
|
|
@@ -52,11 +217,11 @@ export const GEMINI_MODELS: VertexModelConfig[] = [
|
|
|
52
217
|
{
|
|
53
218
|
id: "gemini-3.1-flash-lite",
|
|
54
219
|
name: "Gemini 3.1 Flash Lite",
|
|
55
|
-
apiId: "gemini-3.1-flash-lite
|
|
220
|
+
apiId: "gemini-3.1-flash-lite",
|
|
56
221
|
publisher: "google",
|
|
57
222
|
endpointType: "gemini",
|
|
58
223
|
contextWindow: 1048576,
|
|
59
|
-
maxTokens:
|
|
224
|
+
maxTokens: 65536,
|
|
60
225
|
input: ["text", "image"],
|
|
61
226
|
reasoning: true,
|
|
62
227
|
tools: true,
|
|
@@ -149,43 +314,7 @@ export const GEMINI_MODELS: VertexModelConfig[] = [
|
|
|
149
314
|
region: "global",
|
|
150
315
|
},
|
|
151
316
|
|
|
152
|
-
//
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
name: "Gemini 2.0 Flash",
|
|
156
|
-
apiId: "gemini-2.0-flash",
|
|
157
|
-
publisher: "google",
|
|
158
|
-
endpointType: "gemini",
|
|
159
|
-
contextWindow: 1048576,
|
|
160
|
-
maxTokens: 8192,
|
|
161
|
-
input: ["text", "image"],
|
|
162
|
-
reasoning: false,
|
|
163
|
-
tools: true,
|
|
164
|
-
cost: {
|
|
165
|
-
input: 0.15,
|
|
166
|
-
output: 0.60,
|
|
167
|
-
cacheRead: 0,
|
|
168
|
-
cacheWrite: 0,
|
|
169
|
-
},
|
|
170
|
-
region: "global",
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
id: "gemini-2.0-flash-lite",
|
|
174
|
-
name: "Gemini 2.0 Flash Lite",
|
|
175
|
-
apiId: "gemini-2.0-flash-lite",
|
|
176
|
-
publisher: "google",
|
|
177
|
-
endpointType: "gemini",
|
|
178
|
-
contextWindow: 1048576,
|
|
179
|
-
maxTokens: 8192,
|
|
180
|
-
input: ["text", "image"],
|
|
181
|
-
reasoning: false,
|
|
182
|
-
tools: true,
|
|
183
|
-
cost: {
|
|
184
|
-
input: 0.075,
|
|
185
|
-
output: 0.30,
|
|
186
|
-
cacheRead: 0,
|
|
187
|
-
cacheWrite: 0,
|
|
188
|
-
},
|
|
189
|
-
region: "global",
|
|
190
|
-
},
|
|
317
|
+
// Gemini 2.0 Flash / Flash Lite were shut down on Vertex AI on 2026-06-01.
|
|
318
|
+
// Migration path is gemini-2.5-flash / gemini-2.5-flash-lite, which are
|
|
319
|
+
// themselves retired on 2026-10-16.
|
|
191
320
|
];
|
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/
|
|
4
|
-
* Pricing: https://cloud.google.com/
|
|
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,76 @@ export const MAAS_MODELS: VertexModelConfig[] = [
|
|
|
47
91
|
},
|
|
48
92
|
region: "global",
|
|
49
93
|
},
|
|
94
|
+
|
|
95
|
+
// --- Meta Muse (Preview) ---
|
|
96
|
+
// Served only through the stateless OpenAI-compatible Responses API on the
|
|
97
|
+
// global endpoint (no chat completions, no `store: true`). Input and output
|
|
98
|
+
// share the 1,048,576-token context; maxTokens is a default that leaves room
|
|
99
|
+
// for input. Reasoning effort minimal..xhigh (Ember also max); `none` is
|
|
100
|
+
// rejected, so "off" sends no effort and the model uses its default.
|
|
50
101
|
{
|
|
51
|
-
id: "
|
|
52
|
-
name: "
|
|
53
|
-
apiId: "
|
|
54
|
-
publisher: "
|
|
102
|
+
id: "muse-wonder-1.0",
|
|
103
|
+
name: "Muse Wonder 1.0",
|
|
104
|
+
apiId: "muse-wonder-1.0",
|
|
105
|
+
publisher: "meta",
|
|
55
106
|
endpointType: "maas",
|
|
56
|
-
|
|
57
|
-
|
|
107
|
+
maasApi: "responses",
|
|
108
|
+
contextWindow: 1048576,
|
|
109
|
+
maxTokens: 128000,
|
|
110
|
+
input: ["text", "image"],
|
|
111
|
+
reasoning: true,
|
|
112
|
+
tools: true,
|
|
113
|
+
cost: {
|
|
114
|
+
input: 4.00,
|
|
115
|
+
output: 20.00,
|
|
116
|
+
cacheRead: 0.20,
|
|
117
|
+
cacheWrite: 0,
|
|
118
|
+
},
|
|
119
|
+
region: "global",
|
|
120
|
+
thinkingLevelMap: { xhigh: "xhigh" },
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "muse-spark-1.3",
|
|
124
|
+
name: "Muse Spark 1.3",
|
|
125
|
+
apiId: "muse-spark-1.3",
|
|
126
|
+
publisher: "meta",
|
|
127
|
+
endpointType: "maas",
|
|
128
|
+
maasApi: "responses",
|
|
129
|
+
contextWindow: 1048576,
|
|
130
|
+
maxTokens: 128000,
|
|
131
|
+
input: ["text", "image"],
|
|
132
|
+
reasoning: true,
|
|
133
|
+
tools: true,
|
|
134
|
+
cost: {
|
|
135
|
+
input: 1.25,
|
|
136
|
+
output: 4.25,
|
|
137
|
+
cacheRead: 0.15,
|
|
138
|
+
cacheWrite: 0,
|
|
139
|
+
},
|
|
140
|
+
region: "global",
|
|
141
|
+
thinkingLevelMap: { xhigh: "xhigh" },
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
id: "muse-ember-1.0",
|
|
145
|
+
name: "Muse Ember 1.0",
|
|
146
|
+
apiId: "muse-ember-1.0",
|
|
147
|
+
publisher: "meta",
|
|
148
|
+
endpointType: "maas",
|
|
149
|
+
maasApi: "responses",
|
|
150
|
+
contextWindow: 1048576,
|
|
151
|
+
maxTokens: 128000,
|
|
58
152
|
input: ["text", "image"],
|
|
59
153
|
reasoning: true,
|
|
60
154
|
tools: true,
|
|
155
|
+
// Above 200K input every token bills at 3x ($0.30/$1.50/$0.012).
|
|
61
156
|
cost: {
|
|
62
|
-
input: 0.
|
|
157
|
+
input: 0.10,
|
|
63
158
|
output: 0.50,
|
|
64
|
-
cacheRead: 0.
|
|
159
|
+
cacheRead: 0.004,
|
|
65
160
|
cacheWrite: 0,
|
|
66
161
|
},
|
|
67
162
|
region: "global",
|
|
163
|
+
thinkingLevelMap: { xhigh: "xhigh", max: "max" },
|
|
68
164
|
},
|
|
69
165
|
|
|
70
166
|
// --- Meta Llama ---
|
|
@@ -106,25 +202,6 @@ export const MAAS_MODELS: VertexModelConfig[] = [
|
|
|
106
202
|
},
|
|
107
203
|
region: "global",
|
|
108
204
|
},
|
|
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
205
|
|
|
129
206
|
// --- Mistral AI ---
|
|
130
207
|
{
|
|
@@ -205,81 +282,28 @@ export const MAAS_MODELS: VertexModelConfig[] = [
|
|
|
205
282
|
},
|
|
206
283
|
|
|
207
284
|
// --- DeepSeek ---
|
|
285
|
+
// DeepSeek-V4.1-Flash: global only. 1M context; output shares it, so maxTokens
|
|
286
|
+
// is a default. Thinks only when `reasoning_effort` is sent: minimal/low/medium/high/max
|
|
287
|
+
// (`xhigh` and `none` are rejected), so "off" sends nothing and does not think.
|
|
208
288
|
{
|
|
209
|
-
id: "deepseek-
|
|
210
|
-
name: "DeepSeek
|
|
211
|
-
apiId: "deepseek-ai/deepseek-
|
|
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",
|
|
231
|
-
publisher: "deepseek-ai",
|
|
232
|
-
endpointType: "maas",
|
|
233
|
-
contextWindow: 163840,
|
|
234
|
-
maxTokens: 32000,
|
|
235
|
-
input: ["text"],
|
|
236
|
-
reasoning: true,
|
|
237
|
-
tools: true,
|
|
238
|
-
cost: {
|
|
239
|
-
input: 0.60,
|
|
240
|
-
output: 1.70,
|
|
241
|
-
cacheRead: 0.06,
|
|
242
|
-
cacheWrite: 0,
|
|
243
|
-
},
|
|
244
|
-
region: "global",
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
id: "deepseek-r1",
|
|
248
|
-
name: "DeepSeek R1",
|
|
249
|
-
apiId: "deepseek-ai/deepseek-r1-0528-maas",
|
|
289
|
+
id: "deepseek-v4.1-flash",
|
|
290
|
+
name: "DeepSeek V4.1 Flash",
|
|
291
|
+
apiId: "deepseek-ai/deepseek-v4.1-flash-maas",
|
|
250
292
|
publisher: "deepseek-ai",
|
|
251
293
|
endpointType: "maas",
|
|
252
|
-
contextWindow:
|
|
253
|
-
maxTokens:
|
|
254
|
-
input: ["text"],
|
|
294
|
+
contextWindow: 1048576,
|
|
295
|
+
maxTokens: 65536,
|
|
296
|
+
input: ["text", "image"],
|
|
255
297
|
reasoning: true,
|
|
256
298
|
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
299
|
cost: {
|
|
277
300
|
input: 0.30,
|
|
278
301
|
output: 1.20,
|
|
279
|
-
cacheRead: 0,
|
|
302
|
+
cacheRead: 0.03,
|
|
280
303
|
cacheWrite: 0,
|
|
281
304
|
},
|
|
282
305
|
region: "global",
|
|
306
|
+
thinkingLevelMap: { max: "max" },
|
|
283
307
|
},
|
|
284
308
|
|
|
285
309
|
// --- OpenAI (gpt-oss) ---
|
|
@@ -302,145 +326,6 @@ export const MAAS_MODELS: VertexModelConfig[] = [
|
|
|
302
326
|
},
|
|
303
327
|
region: "global",
|
|
304
328
|
},
|
|
305
|
-
{
|
|
306
|
-
id: "gpt-oss-20b",
|
|
307
|
-
name: "GPT-OSS 20B",
|
|
308
|
-
apiId: "openai/gpt-oss-20b-maas",
|
|
309
|
-
publisher: "openai",
|
|
310
|
-
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"],
|
|
335
|
-
reasoning: true,
|
|
336
|
-
tools: true,
|
|
337
|
-
cost: {
|
|
338
|
-
input: 0.22,
|
|
339
|
-
output: 0.88,
|
|
340
|
-
cacheRead: 0,
|
|
341
|
-
cacheWrite: 0,
|
|
342
|
-
},
|
|
343
|
-
region: "global",
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
id: "qwen3-next-instruct",
|
|
347
|
-
name: "Qwen 3 Next Instruct",
|
|
348
|
-
apiId: "qwen/qwen3-next-instruct-80b-maas",
|
|
349
|
-
publisher: "qwen",
|
|
350
|
-
endpointType: "maas",
|
|
351
|
-
contextWindow: 262144,
|
|
352
|
-
maxTokens: 32000,
|
|
353
|
-
input: ["text"],
|
|
354
|
-
reasoning: true,
|
|
355
|
-
tools: true,
|
|
356
|
-
cost: {
|
|
357
|
-
input: 0.15,
|
|
358
|
-
output: 1.20,
|
|
359
|
-
cacheRead: 0,
|
|
360
|
-
cacheWrite: 0,
|
|
361
|
-
},
|
|
362
|
-
region: "global",
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
id: "qwen3-next-thinking",
|
|
366
|
-
name: "Qwen 3 Next Thinking",
|
|
367
|
-
apiId: "qwen/qwen3-next-thinking-80b-maas",
|
|
368
|
-
publisher: "qwen",
|
|
369
|
-
endpointType: "maas",
|
|
370
|
-
contextWindow: 262144,
|
|
371
|
-
maxTokens: 32000,
|
|
372
|
-
input: ["text"],
|
|
373
|
-
reasoning: true,
|
|
374
|
-
tools: true,
|
|
375
|
-
cost: {
|
|
376
|
-
input: 0.15,
|
|
377
|
-
output: 1.20,
|
|
378
|
-
cacheRead: 0,
|
|
379
|
-
cacheWrite: 0,
|
|
380
|
-
},
|
|
381
|
-
region: "global",
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
id: "qwen3-coder",
|
|
385
|
-
name: "Qwen 3 Coder",
|
|
386
|
-
apiId: "qwen/qwen3-coder-480b-a35b-instruct-maas",
|
|
387
|
-
publisher: "qwen",
|
|
388
|
-
endpointType: "maas",
|
|
389
|
-
contextWindow: 262144,
|
|
390
|
-
maxTokens: 32000,
|
|
391
|
-
input: ["text"],
|
|
392
|
-
reasoning: true,
|
|
393
|
-
tools: true,
|
|
394
|
-
cost: {
|
|
395
|
-
input: 0.22,
|
|
396
|
-
output: 1.80,
|
|
397
|
-
cacheRead: 0.022,
|
|
398
|
-
cacheWrite: 0,
|
|
399
|
-
},
|
|
400
|
-
region: "global",
|
|
401
|
-
},
|
|
402
|
-
|
|
403
|
-
// --- Moonshot ---
|
|
404
|
-
{
|
|
405
|
-
id: "kimi-k2-thinking",
|
|
406
|
-
name: "Kimi K2 Thinking",
|
|
407
|
-
apiId: "moonshotai/kimi-k2-thinking-maas",
|
|
408
|
-
publisher: "moonshotai",
|
|
409
|
-
endpointType: "maas",
|
|
410
|
-
contextWindow: 262144,
|
|
411
|
-
maxTokens: 32000,
|
|
412
|
-
input: ["text"],
|
|
413
|
-
reasoning: true,
|
|
414
|
-
tools: true,
|
|
415
|
-
cost: {
|
|
416
|
-
input: 0.60,
|
|
417
|
-
output: 2.50,
|
|
418
|
-
cacheRead: 0.06,
|
|
419
|
-
cacheWrite: 0,
|
|
420
|
-
},
|
|
421
|
-
region: "global",
|
|
422
|
-
},
|
|
423
|
-
|
|
424
|
-
// --- MiniMax ---
|
|
425
|
-
{
|
|
426
|
-
id: "minimax-m2",
|
|
427
|
-
name: "MiniMax M2",
|
|
428
|
-
apiId: "minimaxai/minimax-m2-maas",
|
|
429
|
-
publisher: "minimaxai",
|
|
430
|
-
endpointType: "maas",
|
|
431
|
-
contextWindow: 196608,
|
|
432
|
-
maxTokens: 32000,
|
|
433
|
-
input: ["text"],
|
|
434
|
-
reasoning: true,
|
|
435
|
-
tools: true,
|
|
436
|
-
cost: {
|
|
437
|
-
input: 0.30,
|
|
438
|
-
output: 1.20,
|
|
439
|
-
cacheRead: 0.03,
|
|
440
|
-
cacheWrite: 0,
|
|
441
|
-
},
|
|
442
|
-
region: "global",
|
|
443
|
-
},
|
|
444
329
|
|
|
445
330
|
// --- Google Gemma (MaaS) ---
|
|
446
331
|
{
|
|
@@ -465,39 +350,20 @@ export const MAAS_MODELS: VertexModelConfig[] = [
|
|
|
465
350
|
|
|
466
351
|
// --- GLM (Zhipu AI) ---
|
|
467
352
|
{
|
|
468
|
-
id: "glm-5",
|
|
469
|
-
name: "GLM 5",
|
|
470
|
-
apiId: "zai-org/glm-5-maas",
|
|
471
|
-
publisher: "zai-org",
|
|
472
|
-
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",
|
|
353
|
+
id: "glm-5.2",
|
|
354
|
+
name: "GLM 5.2",
|
|
355
|
+
apiId: "zai-org/glm-5.2-maas",
|
|
490
356
|
publisher: "zai-org",
|
|
491
357
|
endpointType: "maas",
|
|
492
|
-
contextWindow:
|
|
493
|
-
maxTokens:
|
|
358
|
+
contextWindow: 1000000,
|
|
359
|
+
maxTokens: 64000,
|
|
494
360
|
input: ["text"],
|
|
495
361
|
reasoning: true,
|
|
496
362
|
tools: true,
|
|
497
363
|
cost: {
|
|
498
|
-
input:
|
|
499
|
-
output:
|
|
500
|
-
cacheRead: 0,
|
|
364
|
+
input: 1.40,
|
|
365
|
+
output: 4.40,
|
|
366
|
+
cacheRead: 0.14,
|
|
501
367
|
cacheWrite: 0,
|
|
502
368
|
},
|
|
503
369
|
region: "global",
|