Skip to content

Commit 3241255

Browse files
committed
feat(types): expand Z.AI international model catalog and add GLM-4.6 link
1 parent 35ee073 commit 3241255

File tree

1 file changed

+64
-21
lines changed
  • packages/types/src/providers

1 file changed

+64
-21
lines changed

packages/types/src/providers/zai.ts

Lines changed: 64 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ZaiApiLine } from "../provider-settings.js"
33

44
// Z AI
55
// https://docs.z.ai/guides/llm/glm-4.5
6+
// https://docs.z.ai/guides/llm/glm-4.6
67
// https://docs.z.ai/guides/overview/pricing
78

89
export type InternationalZAiModelId = keyof typeof internationalZAiModels
@@ -20,17 +21,17 @@ export const internationalZAiModels = {
2021
description:
2122
"GLM-4.5 is Zhipu's latest featured model. Its comprehensive capabilities in reasoning, coding, and agent reach the state-of-the-art (SOTA) level among open-source models, with a context length of up to 128k.",
2223
},
23-
"glm-4.5-air": {
24+
"glm-4.6": {
2425
maxTokens: 98_304,
25-
contextWindow: 131_072,
26+
contextWindow: 204_800,
2627
supportsImages: false,
2728
supportsPromptCache: true,
28-
inputPrice: 0.2,
29-
outputPrice: 1.1,
29+
inputPrice: 0.6,
30+
outputPrice: 2.2,
3031
cacheWritesPrice: 0,
31-
cacheReadsPrice: 0.03,
32+
cacheReadsPrice: 0.11,
3233
description:
33-
"GLM-4.5-Air is the lightweight version of GLM-4.5. It balances performance and cost-effectiveness, and can flexibly switch to hybrid thinking models.",
34+
"GLM-4.6 is Zhipu's newest model with an extended context window of up to 200k tokens, providing enhanced capabilities for processing longer documents and conversations.",
3435
},
3536
"glm-4.5v": {
3637
maxTokens: 16_384,
@@ -41,21 +42,64 @@ export const internationalZAiModels = {
4142
outputPrice: 1.8,
4243
cacheWritesPrice: 0,
4344
cacheReadsPrice: 0.11,
44-
description:
45-
"GLM-4.5V is Zhipu's new generation of visual reasoning models based on the MOE architecture.",
45+
description: "GLM-4.5V is Zhipu's new generation of visual reasoning models based on the MOE architecture.",
4646
},
47-
"glm-4.6": {
47+
"glm-4.5-air": {
4848
maxTokens: 98_304,
49-
contextWindow: 204_800,
49+
contextWindow: 131_072,
5050
supportsImages: false,
5151
supportsPromptCache: true,
52-
inputPrice: 0.6,
53-
outputPrice: 2.2,
52+
inputPrice: 0.2,
53+
outputPrice: 1.1,
5454
cacheWritesPrice: 0,
55-
cacheReadsPrice: 0.11,
55+
cacheReadsPrice: 0.03,
5656
description:
57-
"GLM-4.6 is Zhipu's newest model with an extended context window of up to 200k tokens, providing enhanced capabilities for processing longer documents and conversations.",
58-
}
57+
"GLM-4.5-Air is the lightweight version of GLM-4.5. It balances performance and cost-effectiveness, and can flexibly switch to hybrid thinking models.",
58+
},
59+
"glm-4.5-x": {
60+
maxTokens: 98_304,
61+
contextWindow: 131_072,
62+
supportsImages: false,
63+
supportsPromptCache: true,
64+
inputPrice: 2.2,
65+
outputPrice: 8.9,
66+
cacheWritesPrice: 0,
67+
cacheReadsPrice: 0.45,
68+
description: "GLM-4.5-X is the extended version with enhanced capabilities and performance for complex tasks.",
69+
},
70+
"glm-4.5-airx": {
71+
maxTokens: 98_304,
72+
contextWindow: 131_072,
73+
supportsImages: false,
74+
supportsPromptCache: true,
75+
inputPrice: 1.1,
76+
outputPrice: 4.5,
77+
cacheWritesPrice: 0,
78+
cacheReadsPrice: 0.22,
79+
description: "GLM-4.5-AirX is the extended version of GLM-4.5-Air with enhanced capabilities.",
80+
},
81+
"glm-4-32b-0414-128k": {
82+
maxTokens: 98_304,
83+
contextWindow: 131_072,
84+
supportsImages: false,
85+
supportsPromptCache: false,
86+
inputPrice: 0.1,
87+
outputPrice: 0.1,
88+
cacheWritesPrice: 0,
89+
cacheReadsPrice: 0,
90+
description: "GLM-4-32B is a 32 billion parameter model with 128k context length, optimized for efficiency.",
91+
},
92+
"glm-4.5-flash": {
93+
maxTokens: 98_304,
94+
contextWindow: 131_072,
95+
supportsImages: false,
96+
supportsPromptCache: false,
97+
inputPrice: 0,
98+
outputPrice: 0,
99+
cacheWritesPrice: 0,
100+
cacheReadsPrice: 0,
101+
description: "Zhipu's most advanced free model to date.",
102+
},
59103
} as const satisfies Record<string, ModelInfo>
60104

61105
export type MainlandZAiModelId = keyof typeof mainlandZAiModels
@@ -134,26 +178,25 @@ export const mainlandZAiModels = {
134178
outputPrice: 1.8,
135179
cacheWritesPrice: 0,
136180
cacheReadsPrice: 0.11,
137-
description:
138-
"GLM-4.5V is Zhipu's new generation of visual reasoning models based on the MOE architecture.",
181+
description: "GLM-4.5V is Zhipu's new generation of visual reasoning models based on the MOE architecture.",
139182
tiers: [
140183
{
141184
contextWindow: 32_000,
142185
inputPrice: 0.21,
143186
outputPrice: 0.4,
144-
cacheReadsPrice: 0.06
187+
cacheReadsPrice: 0.06,
145188
},
146189
{
147190
contextWindow: 64_000,
148191
inputPrice: 0.6,
149192
outputPrice: 1.8,
150-
cacheReadsPrice: 0.11
193+
cacheReadsPrice: 0.11,
151194
},
152195
{
153196
contextWindow: Infinity,
154197
inputPrice: 0.6,
155198
outputPrice: 1.8,
156-
cacheReadsPrice: 0.11
199+
cacheReadsPrice: 0.11,
157200
},
158201
],
159202
},
@@ -194,7 +237,7 @@ export const mainlandZAiModels = {
194237
cacheReadsPrice: 0.057,
195238
},
196239
],
197-
}
240+
},
198241
} as const satisfies Record<string, ModelInfo>
199242

200243
export const ZAI_DEFAULT_TEMPERATURE = 0

0 commit comments

Comments
 (0)