@hebo-ai/gateway 0.10.7 → 0.11.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.
Files changed (111) hide show
  1. package/README.md +97 -84
  2. package/dist/config.js +21 -4
  3. package/dist/endpoints/chat-completions/handler.js +9 -5
  4. package/dist/endpoints/conversations/handler.js +3 -3
  5. package/dist/endpoints/embeddings/handler.js +2 -2
  6. package/dist/endpoints/messages/converters.js +17 -21
  7. package/dist/endpoints/messages/handler.js +5 -5
  8. package/dist/endpoints/responses/handler.js +9 -5
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.js +1 -0
  11. package/dist/models/alibaba/index.d.ts +2 -0
  12. package/dist/models/alibaba/index.js +2 -0
  13. package/dist/models/alibaba/middleware.d.ts +2 -0
  14. package/dist/models/alibaba/middleware.js +31 -0
  15. package/dist/models/alibaba/presets.d.ts +900 -0
  16. package/dist/models/alibaba/presets.js +252 -0
  17. package/dist/models/amazon/presets.d.ts +31 -31
  18. package/dist/models/anthropic/presets.d.ts +68 -68
  19. package/dist/models/cohere/presets.d.ts +38 -38
  20. package/dist/models/deepseek/index.d.ts +2 -0
  21. package/dist/models/deepseek/index.js +2 -0
  22. package/dist/models/deepseek/middleware.d.ts +2 -0
  23. package/dist/models/deepseek/middleware.js +25 -0
  24. package/dist/models/deepseek/presets.d.ts +51 -0
  25. package/dist/models/deepseek/presets.js +33 -0
  26. package/dist/models/google/presets.d.ts +94 -94
  27. package/dist/models/google/presets.js +3 -1
  28. package/dist/models/meta/presets.d.ts +84 -84
  29. package/dist/models/meta/presets.js +11 -12
  30. package/dist/models/minimax/index.d.ts +2 -0
  31. package/dist/models/minimax/index.js +2 -0
  32. package/dist/models/minimax/middleware.d.ts +2 -0
  33. package/dist/models/minimax/middleware.js +43 -0
  34. package/dist/models/minimax/presets.d.ts +99 -0
  35. package/dist/models/minimax/presets.js +47 -0
  36. package/dist/models/moonshot/index.d.ts +2 -0
  37. package/dist/models/moonshot/index.js +2 -0
  38. package/dist/models/moonshot/middleware.d.ts +2 -0
  39. package/dist/models/moonshot/middleware.js +32 -0
  40. package/dist/models/moonshot/presets.d.ts +104 -0
  41. package/dist/models/moonshot/presets.js +36 -0
  42. package/dist/models/openai/presets.d.ts +128 -128
  43. package/dist/models/openai/presets.js +1 -1
  44. package/dist/models/types.d.ts +1 -1
  45. package/dist/models/types.js +39 -0
  46. package/dist/models/voyage/presets.d.ts +46 -46
  47. package/dist/models/xai/index.d.ts +2 -0
  48. package/dist/models/xai/index.js +2 -0
  49. package/dist/models/xai/middleware.d.ts +2 -0
  50. package/dist/models/xai/middleware.js +37 -0
  51. package/dist/models/xai/presets.d.ts +210 -0
  52. package/dist/models/xai/presets.js +55 -0
  53. package/dist/models/zai/index.d.ts +2 -0
  54. package/dist/models/zai/index.js +2 -0
  55. package/dist/models/zai/middleware.d.ts +2 -0
  56. package/dist/models/zai/middleware.js +25 -0
  57. package/dist/models/zai/presets.d.ts +141 -0
  58. package/dist/models/zai/presets.js +41 -0
  59. package/dist/providers/alibaba/canonical.d.ts +3 -0
  60. package/dist/providers/alibaba/canonical.js +13 -0
  61. package/dist/providers/alibaba/index.d.ts +1 -0
  62. package/dist/providers/alibaba/index.js +1 -0
  63. package/dist/providers/bedrock/canonical.js +3 -0
  64. package/dist/providers/chutes/canonical.d.ts +3 -0
  65. package/dist/providers/chutes/canonical.js +14 -0
  66. package/dist/providers/chutes/index.d.ts +1 -0
  67. package/dist/providers/chutes/index.js +1 -0
  68. package/dist/providers/deepinfra/canonical.d.ts +3 -0
  69. package/dist/providers/deepinfra/canonical.js +40 -0
  70. package/dist/providers/deepinfra/index.d.ts +1 -0
  71. package/dist/providers/deepinfra/index.js +1 -0
  72. package/dist/providers/deepseek/canonical.d.ts +3 -0
  73. package/dist/providers/deepseek/canonical.js +9 -0
  74. package/dist/providers/deepseek/index.d.ts +1 -0
  75. package/dist/providers/deepseek/index.js +1 -0
  76. package/dist/providers/fireworks/canonical.d.ts +3 -0
  77. package/dist/providers/fireworks/canonical.js +27 -0
  78. package/dist/providers/fireworks/index.d.ts +2 -0
  79. package/dist/providers/fireworks/index.js +2 -0
  80. package/dist/providers/fireworks/middleware.d.ts +2 -0
  81. package/dist/providers/fireworks/middleware.js +35 -0
  82. package/dist/providers/groq/canonical.js +1 -1
  83. package/dist/providers/minimax/canonical.d.ts +3 -0
  84. package/dist/providers/minimax/canonical.js +9 -0
  85. package/dist/providers/minimax/index.d.ts +1 -0
  86. package/dist/providers/minimax/index.js +1 -0
  87. package/dist/providers/moonshot/canonical.d.ts +3 -0
  88. package/dist/providers/moonshot/canonical.js +6 -0
  89. package/dist/providers/moonshot/index.d.ts +1 -0
  90. package/dist/providers/moonshot/index.js +1 -0
  91. package/dist/providers/togetherai/canonical.d.ts +3 -0
  92. package/dist/providers/togetherai/canonical.js +24 -0
  93. package/dist/providers/togetherai/index.d.ts +1 -0
  94. package/dist/providers/togetherai/index.js +1 -0
  95. package/dist/providers/types.d.ts +1 -1
  96. package/dist/providers/types.js +10 -0
  97. package/dist/providers/vertex/canonical.js +5 -1
  98. package/dist/providers/xai/canonical.d.ts +3 -0
  99. package/dist/providers/xai/canonical.js +12 -0
  100. package/dist/providers/xai/index.d.ts +1 -0
  101. package/dist/providers/xai/index.js +1 -0
  102. package/dist/providers/zai/canonical.d.ts +3 -0
  103. package/dist/providers/zai/canonical.js +10 -0
  104. package/dist/providers/zai/index.d.ts +1 -0
  105. package/dist/providers/zai/index.js +1 -0
  106. package/dist/types.d.ts +30 -16
  107. package/dist/utils/index.d.ts +8 -0
  108. package/dist/utils/index.js +8 -0
  109. package/dist/utils/request.d.ts +2 -1
  110. package/dist/utils/request.js +35 -7
  111. package/package.json +133 -9
@@ -0,0 +1,210 @@
1
+ import type { CatalogModel } from "../types";
2
+ export declare const grok41Fast: import("../../utils").Preset<"xai/grok-4.1-fast", CatalogModel, {
3
+ name: string;
4
+ created: string;
5
+ knowledge: string;
6
+ modalities: {
7
+ input: readonly ["text", "image"];
8
+ output: readonly ["text"];
9
+ };
10
+ capabilities: readonly ["tool_call", "structured_output", "temperature"];
11
+ providers: readonly ["xai"];
12
+ context: number;
13
+ }>;
14
+ export declare const grok41FastReasoning: import("../../utils").Preset<"xai/grok-4.1-fast-reasoning", CatalogModel, {
15
+ name: string;
16
+ created: string;
17
+ knowledge: string;
18
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
19
+ modalities: {
20
+ input: readonly ["text", "image"];
21
+ output: readonly ["text"];
22
+ };
23
+ providers: readonly ["xai"];
24
+ context: number;
25
+ }>;
26
+ export declare const grok42: import("../../utils").Preset<"xai/grok-4.2", CatalogModel, {
27
+ name: string;
28
+ created: string;
29
+ knowledge: string;
30
+ modalities: {
31
+ input: readonly ["text", "image"];
32
+ output: readonly ["text"];
33
+ };
34
+ capabilities: readonly ["tool_call", "structured_output", "temperature"];
35
+ providers: readonly ["xai"];
36
+ context: number;
37
+ }>;
38
+ export declare const grok42Reasoning: import("../../utils").Preset<"xai/grok-4.2-reasoning", CatalogModel, {
39
+ name: string;
40
+ created: string;
41
+ knowledge: string;
42
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
43
+ modalities: {
44
+ input: readonly ["text", "image"];
45
+ output: readonly ["text"];
46
+ };
47
+ providers: readonly ["xai"];
48
+ context: number;
49
+ }>;
50
+ export declare const grok42MultiAgent: import("../../utils").Preset<"xai/grok-4.2-multi-agent", CatalogModel, {
51
+ name: string;
52
+ created: string;
53
+ knowledge: string;
54
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
55
+ modalities: {
56
+ input: readonly ["text", "image"];
57
+ output: readonly ["text"];
58
+ };
59
+ providers: readonly ["xai"];
60
+ context: number;
61
+ }>;
62
+ export declare const grok: {
63
+ readonly latest: readonly [import("../../utils").Preset<"xai/grok-4.2", CatalogModel, {
64
+ name: string;
65
+ created: string;
66
+ knowledge: string;
67
+ modalities: {
68
+ input: readonly ["text", "image"];
69
+ output: readonly ["text"];
70
+ };
71
+ capabilities: readonly ["tool_call", "structured_output", "temperature"];
72
+ providers: readonly ["xai"];
73
+ context: number;
74
+ }>, import("../../utils").Preset<"xai/grok-4.2-reasoning", CatalogModel, {
75
+ name: string;
76
+ created: string;
77
+ knowledge: string;
78
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
79
+ modalities: {
80
+ input: readonly ["text", "image"];
81
+ output: readonly ["text"];
82
+ };
83
+ providers: readonly ["xai"];
84
+ context: number;
85
+ }>, import("../../utils").Preset<"xai/grok-4.2-multi-agent", CatalogModel, {
86
+ name: string;
87
+ created: string;
88
+ knowledge: string;
89
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
90
+ modalities: {
91
+ input: readonly ["text", "image"];
92
+ output: readonly ["text"];
93
+ };
94
+ providers: readonly ["xai"];
95
+ context: number;
96
+ }>];
97
+ readonly all: (import("../../utils").Preset<"xai/grok-4.1-fast", CatalogModel, {
98
+ name: string;
99
+ created: string;
100
+ knowledge: string;
101
+ modalities: {
102
+ input: readonly ["text", "image"];
103
+ output: readonly ["text"];
104
+ };
105
+ capabilities: readonly ["tool_call", "structured_output", "temperature"];
106
+ providers: readonly ["xai"];
107
+ context: number;
108
+ }> | import("../../utils").Preset<"xai/grok-4.1-fast-reasoning", CatalogModel, {
109
+ name: string;
110
+ created: string;
111
+ knowledge: string;
112
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
113
+ modalities: {
114
+ input: readonly ["text", "image"];
115
+ output: readonly ["text"];
116
+ };
117
+ providers: readonly ["xai"];
118
+ context: number;
119
+ }> | import("../../utils").Preset<"xai/grok-4.2", CatalogModel, {
120
+ name: string;
121
+ created: string;
122
+ knowledge: string;
123
+ modalities: {
124
+ input: readonly ["text", "image"];
125
+ output: readonly ["text"];
126
+ };
127
+ capabilities: readonly ["tool_call", "structured_output", "temperature"];
128
+ providers: readonly ["xai"];
129
+ context: number;
130
+ }> | import("../../utils").Preset<"xai/grok-4.2-reasoning", CatalogModel, {
131
+ name: string;
132
+ created: string;
133
+ knowledge: string;
134
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
135
+ modalities: {
136
+ input: readonly ["text", "image"];
137
+ output: readonly ["text"];
138
+ };
139
+ providers: readonly ["xai"];
140
+ context: number;
141
+ }> | import("../../utils").Preset<"xai/grok-4.2-multi-agent", CatalogModel, {
142
+ name: string;
143
+ created: string;
144
+ knowledge: string;
145
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
146
+ modalities: {
147
+ input: readonly ["text", "image"];
148
+ output: readonly ["text"];
149
+ };
150
+ providers: readonly ["xai"];
151
+ context: number;
152
+ }>)[];
153
+ readonly "v4.1": readonly [import("../../utils").Preset<"xai/grok-4.1-fast", CatalogModel, {
154
+ name: string;
155
+ created: string;
156
+ knowledge: string;
157
+ modalities: {
158
+ input: readonly ["text", "image"];
159
+ output: readonly ["text"];
160
+ };
161
+ capabilities: readonly ["tool_call", "structured_output", "temperature"];
162
+ providers: readonly ["xai"];
163
+ context: number;
164
+ }>, import("../../utils").Preset<"xai/grok-4.1-fast-reasoning", CatalogModel, {
165
+ name: string;
166
+ created: string;
167
+ knowledge: string;
168
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
169
+ modalities: {
170
+ input: readonly ["text", "image"];
171
+ output: readonly ["text"];
172
+ };
173
+ providers: readonly ["xai"];
174
+ context: number;
175
+ }>];
176
+ readonly "v4.2": readonly [import("../../utils").Preset<"xai/grok-4.2", CatalogModel, {
177
+ name: string;
178
+ created: string;
179
+ knowledge: string;
180
+ modalities: {
181
+ input: readonly ["text", "image"];
182
+ output: readonly ["text"];
183
+ };
184
+ capabilities: readonly ["tool_call", "structured_output", "temperature"];
185
+ providers: readonly ["xai"];
186
+ context: number;
187
+ }>, import("../../utils").Preset<"xai/grok-4.2-reasoning", CatalogModel, {
188
+ name: string;
189
+ created: string;
190
+ knowledge: string;
191
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
192
+ modalities: {
193
+ input: readonly ["text", "image"];
194
+ output: readonly ["text"];
195
+ };
196
+ providers: readonly ["xai"];
197
+ context: number;
198
+ }>, import("../../utils").Preset<"xai/grok-4.2-multi-agent", CatalogModel, {
199
+ name: string;
200
+ created: string;
201
+ knowledge: string;
202
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
203
+ modalities: {
204
+ input: readonly ["text", "image"];
205
+ output: readonly ["text"];
206
+ };
207
+ providers: readonly ["xai"];
208
+ context: number;
209
+ }>];
210
+ };
@@ -0,0 +1,55 @@
1
+ import { presetFor } from "../../utils/preset";
2
+ const GROK_BASE = {
3
+ modalities: {
4
+ input: ["text", "image"],
5
+ output: ["text"],
6
+ },
7
+ capabilities: ["tool_call", "structured_output", "temperature"],
8
+ providers: ["xai"],
9
+ context: 2000000,
10
+ };
11
+ const GROK_REASONING_BASE = {
12
+ ...GROK_BASE,
13
+ capabilities: ["tool_call", "structured_output", "reasoning", "temperature"],
14
+ };
15
+ export const grok41Fast = presetFor()("xai/grok-4.1-fast", {
16
+ ...GROK_BASE,
17
+ name: "Grok 4.1 Fast",
18
+ created: "2025-11-20",
19
+ knowledge: "2025-06",
20
+ });
21
+ export const grok41FastReasoning = presetFor()("xai/grok-4.1-fast-reasoning", {
22
+ ...GROK_REASONING_BASE,
23
+ name: "Grok 4.1 Fast Reasoning",
24
+ created: "2025-11-20",
25
+ knowledge: "2025-06",
26
+ });
27
+ export const grok42 = presetFor()("xai/grok-4.2", {
28
+ ...GROK_BASE,
29
+ name: "Grok 4.2",
30
+ created: "2026-03-16",
31
+ knowledge: "2024-11",
32
+ });
33
+ export const grok42Reasoning = presetFor()("xai/grok-4.2-reasoning", {
34
+ ...GROK_REASONING_BASE,
35
+ name: "Grok 4.2 Reasoning",
36
+ created: "2026-03-16",
37
+ knowledge: "2024-11",
38
+ });
39
+ export const grok42MultiAgent = presetFor()("xai/grok-4.2-multi-agent", {
40
+ ...GROK_REASONING_BASE,
41
+ name: "Grok 4.2 Multi-Agent",
42
+ created: "2026-03-16",
43
+ knowledge: "2024-11",
44
+ });
45
+ const grokAtomic = {
46
+ "v4.1": [grok41Fast, grok41FastReasoning],
47
+ "v4.2": [grok42, grok42Reasoning, grok42MultiAgent],
48
+ };
49
+ const grokGroups = {};
50
+ export const grok = {
51
+ ...grokAtomic,
52
+ ...grokGroups,
53
+ latest: [grok42, grok42Reasoning, grok42MultiAgent],
54
+ all: Object.values(grokAtomic).flat(),
55
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./presets";
2
+ export * from "./middleware";
@@ -0,0 +1,2 @@
1
+ export * from "./presets";
2
+ export * from "./middleware";
@@ -0,0 +1,2 @@
1
+ import type { LanguageModelMiddleware } from "ai";
2
+ export declare const glmReasoningMiddleware: LanguageModelMiddleware;
@@ -0,0 +1,25 @@
1
+ import { modelMiddlewareMatcher } from "../../middleware/matcher";
2
+ export const glmReasoningMiddleware = {
3
+ specificationVersion: "v3",
4
+ // oxlint-disable-next-line require-await
5
+ transformParams: async ({ params }) => {
6
+ const unknown = params.providerOptions?.["unknown"];
7
+ if (!unknown)
8
+ return params;
9
+ const reasoning = unknown["reasoning"];
10
+ if (!reasoning)
11
+ return params;
12
+ const target = (params.providerOptions["zhipu"] ??= {});
13
+ if (!reasoning.enabled || reasoning.effort === "none") {
14
+ target["thinking"] = { type: "disabled" };
15
+ }
16
+ else {
17
+ target["thinking"] = { type: "enabled" };
18
+ }
19
+ delete unknown["reasoning"];
20
+ return params;
21
+ },
22
+ };
23
+ modelMiddlewareMatcher.useForModel("zhipu/glm-*", {
24
+ language: [glmReasoningMiddleware],
25
+ });
@@ -0,0 +1,141 @@
1
+ import type { CatalogModel } from "../types";
2
+ export declare const glm5: import("../../utils").Preset<"zhipu/glm-5", CatalogModel, {
3
+ name: string;
4
+ created: string;
5
+ context: number;
6
+ providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
7
+ modalities: {
8
+ input: readonly ["text"];
9
+ output: readonly ["text"];
10
+ };
11
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
12
+ }>;
13
+ export declare const glm5Turbo: import("../../utils").Preset<"zhipu/glm-5-turbo", CatalogModel, {
14
+ name: string;
15
+ created: string;
16
+ providers: readonly ["zai"];
17
+ modalities: {
18
+ input: readonly ["text"];
19
+ output: readonly ["text"];
20
+ };
21
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
22
+ context: number;
23
+ }>;
24
+ export declare const glm51: import("../../utils").Preset<"zhipu/glm-5.1", CatalogModel, {
25
+ name: string;
26
+ created: string;
27
+ providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
28
+ modalities: {
29
+ input: readonly ["text"];
30
+ output: readonly ["text"];
31
+ };
32
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
33
+ context: number;
34
+ }>;
35
+ export declare const glm: {
36
+ readonly latest: readonly [import("../../utils").Preset<"zhipu/glm-5.1", CatalogModel, {
37
+ name: string;
38
+ created: string;
39
+ providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
40
+ modalities: {
41
+ input: readonly ["text"];
42
+ output: readonly ["text"];
43
+ };
44
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
45
+ context: number;
46
+ }>];
47
+ readonly all: (import("../../utils").Preset<"zhipu/glm-5", CatalogModel, {
48
+ name: string;
49
+ created: string;
50
+ context: number;
51
+ providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
52
+ modalities: {
53
+ input: readonly ["text"];
54
+ output: readonly ["text"];
55
+ };
56
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
57
+ }> | import("../../utils").Preset<"zhipu/glm-5-turbo", CatalogModel, {
58
+ name: string;
59
+ created: string;
60
+ providers: readonly ["zai"];
61
+ modalities: {
62
+ input: readonly ["text"];
63
+ output: readonly ["text"];
64
+ };
65
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
66
+ context: number;
67
+ }> | import("../../utils").Preset<"zhipu/glm-5.1", CatalogModel, {
68
+ name: string;
69
+ created: string;
70
+ providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
71
+ modalities: {
72
+ input: readonly ["text"];
73
+ output: readonly ["text"];
74
+ };
75
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
76
+ context: number;
77
+ }>)[];
78
+ readonly "v5.x": readonly [import("../../utils").Preset<"zhipu/glm-5", CatalogModel, {
79
+ name: string;
80
+ created: string;
81
+ context: number;
82
+ providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
83
+ modalities: {
84
+ input: readonly ["text"];
85
+ output: readonly ["text"];
86
+ };
87
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
88
+ }>, import("../../utils").Preset<"zhipu/glm-5-turbo", CatalogModel, {
89
+ name: string;
90
+ created: string;
91
+ providers: readonly ["zai"];
92
+ modalities: {
93
+ input: readonly ["text"];
94
+ output: readonly ["text"];
95
+ };
96
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
97
+ context: number;
98
+ }>, import("../../utils").Preset<"zhipu/glm-5.1", CatalogModel, {
99
+ name: string;
100
+ created: string;
101
+ providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
102
+ modalities: {
103
+ input: readonly ["text"];
104
+ output: readonly ["text"];
105
+ };
106
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
107
+ context: number;
108
+ }>];
109
+ readonly v5: readonly [import("../../utils").Preset<"zhipu/glm-5", CatalogModel, {
110
+ name: string;
111
+ created: string;
112
+ context: number;
113
+ providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
114
+ modalities: {
115
+ input: readonly ["text"];
116
+ output: readonly ["text"];
117
+ };
118
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
119
+ }>, import("../../utils").Preset<"zhipu/glm-5-turbo", CatalogModel, {
120
+ name: string;
121
+ created: string;
122
+ providers: readonly ["zai"];
123
+ modalities: {
124
+ input: readonly ["text"];
125
+ output: readonly ["text"];
126
+ };
127
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
128
+ context: number;
129
+ }>];
130
+ readonly "v5.1": readonly [import("../../utils").Preset<"zhipu/glm-5.1", CatalogModel, {
131
+ name: string;
132
+ created: string;
133
+ providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
134
+ modalities: {
135
+ input: readonly ["text"];
136
+ output: readonly ["text"];
137
+ };
138
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
139
+ context: number;
140
+ }>];
141
+ };
@@ -0,0 +1,41 @@
1
+ import { presetFor } from "../../utils/preset";
2
+ const GLM_5_BASE = {
3
+ modalities: {
4
+ input: ["text"],
5
+ output: ["text"],
6
+ },
7
+ capabilities: ["reasoning", "tool_call", "structured_output", "temperature"],
8
+ context: 200000,
9
+ };
10
+ export const glm5 = presetFor()("zhipu/glm-5", {
11
+ ...GLM_5_BASE,
12
+ name: "GLM 5",
13
+ created: "2026-02-11",
14
+ context: 204800,
15
+ providers: ["zai", "deepinfra", "chutes", "togetherai", "fireworks"],
16
+ });
17
+ export const glm5Turbo = presetFor()("zhipu/glm-5-turbo", {
18
+ ...GLM_5_BASE,
19
+ name: "GLM 5 Turbo",
20
+ created: "2026-03-15",
21
+ providers: ["zai"],
22
+ });
23
+ export const glm51 = presetFor()("zhipu/glm-5.1", {
24
+ ...GLM_5_BASE,
25
+ name: "GLM 5.1",
26
+ created: "2026-03-27",
27
+ providers: ["zai", "deepinfra", "chutes", "togetherai", "fireworks"],
28
+ });
29
+ const glmAtomic = {
30
+ v5: [glm5, glm5Turbo],
31
+ "v5.1": [glm51],
32
+ };
33
+ const glmGroups = {
34
+ "v5.x": [...glmAtomic["v5"], ...glmAtomic["v5.1"]],
35
+ };
36
+ export const glm = {
37
+ ...glmAtomic,
38
+ ...glmGroups,
39
+ latest: [...glmAtomic["v5.1"]],
40
+ all: Object.values(glmAtomic).flat(),
41
+ };
@@ -0,0 +1,3 @@
1
+ import type { AlibabaProvider } from "@ai-sdk/alibaba";
2
+ import type { ModelId } from "../../models/types";
3
+ export declare const withCanonicalIdsForAlibaba: (provider: AlibabaProvider, extraMapping?: Record<ModelId, string>) => import("@ai-sdk/provider").ProviderV3;
@@ -0,0 +1,13 @@
1
+ import { withCanonicalIds } from "../registry";
2
+ const MAPPING = {
3
+ "alibaba/qwen3-235b": "qwen3-235b-a22b",
4
+ "alibaba/qwen3.5-397b": "qwen3.5-397b-a17b",
5
+ "alibaba/qwen3.5-122b": "qwen3.5-122b-a10b",
6
+ "alibaba/qwen3.5-35b": "qwen3.5-35b-a3b",
7
+ "alibaba/qwen3.5-0.8b": "qwen3.5-0.8b",
8
+ "alibaba/qwen3.6-flash": "qwen3.6-35b-a3b",
9
+ "alibaba/qwen3-vl-235b": "qwen3-vl-235b-a22b",
10
+ };
11
+ export const withCanonicalIdsForAlibaba = (provider, extraMapping) => withCanonicalIds(provider, {
12
+ mapping: { ...MAPPING, ...extraMapping },
13
+ });
@@ -0,0 +1 @@
1
+ export * from "./canonical";
@@ -0,0 +1 @@
1
+ export * from "./canonical";
@@ -43,6 +43,9 @@ const MAPPING = {
43
43
  "google/gemma-3-27b": "google.gemma-3-27b-it",
44
44
  "openai/gpt-oss-20b": "openai.gpt-oss-20b-1:0",
45
45
  "openai/gpt-oss-120b": "openai.gpt-oss-120b-1:0",
46
+ "alibaba/qwen3-235b": "qwen.qwen3-235b-a22b-2507-v1:0",
47
+ "alibaba/qwen3-32b": "qwen.qwen3-32b-v1:0",
48
+ "alibaba/qwen3-vl-235b": "qwen.qwen3-vl-235b-a22b",
46
49
  };
47
50
  const resolveInferenceProfile = ({ geo = "us", arn } = {}) => `${arn ? `arn:aws:bedrock:${arn.region}:${arn.accountId}:inference-profile/` : ""}${geo}.`;
48
51
  export const withCanonicalIdsForBedrock = (provider, config = {}) => withCanonicalIds(provider, {
@@ -0,0 +1,3 @@
1
+ import type { ProviderV3 } from "@ai-sdk/provider";
2
+ import type { ModelId } from "../../models/types";
3
+ export declare const withCanonicalIdsForChutes: (provider: ProviderV3, extraMapping?: Record<ModelId, string>) => ProviderV3;
@@ -0,0 +1,14 @@
1
+ import { withCanonicalIds } from "../registry";
2
+ const MAPPING = {
3
+ "minimax/m2.5": "MiniMax/MiniMax-M2.5",
4
+ "alibaba/qwen3-32b": "qwen/qwen3-32b",
5
+ "alibaba/qwen3.5-397b": "qwen/qwen3.5-397b-a17b",
6
+ "deepseek/deepseek-v3.2": "deepseek-ai/DeepSeek-V3.2-TEE",
7
+ "moonshot/kimi-k2.5": "moonshotai/Kimi-K2.5",
8
+ "zhipu/glm-5": "zai-org/GLM-5",
9
+ "zhipu/glm-5.1": "zai-org/GLM-5.1",
10
+ };
11
+ export const withCanonicalIdsForChutes = (provider, extraMapping) => withCanonicalIds(provider, {
12
+ mapping: { ...MAPPING, ...extraMapping },
13
+ options: { stripNamespace: false },
14
+ });
@@ -0,0 +1 @@
1
+ export * from "./canonical";
@@ -0,0 +1 @@
1
+ export * from "./canonical";
@@ -0,0 +1,3 @@
1
+ import { type DeepInfraProvider } from "@ai-sdk/deepinfra";
2
+ import type { ModelId } from "../../models/types";
3
+ export declare const withCanonicalIdsForDeepInfra: (provider: DeepInfraProvider, extraMapping?: Record<ModelId, string>) => import("@ai-sdk/provider").ProviderV3;
@@ -0,0 +1,40 @@
1
+ import {} from "@ai-sdk/deepinfra";
2
+ import { withCanonicalIds } from "../registry";
3
+ const MAPPING = {
4
+ "google/gemma-3-4b": "google/gemma-3-4b-it",
5
+ "google/gemma-3-12b": "google/gemma-3-12b-it",
6
+ "google/gemma-3-27b": "google/gemma-3-27b-it",
7
+ "google/gemma-4-26b-a4b": "google/gemma-4-26b-a4b-it",
8
+ "google/gemma-4-31b": "google/gemma-4-31b-it",
9
+ "meta/llama-3.1-8b": "meta-llama/Meta-Llama-3.1-8B-Instruct",
10
+ "meta/llama-3.1-70b": "meta-llama/Meta-Llama-3.1-70B-Instruct",
11
+ "meta/llama-3.1-405b": "meta-llama/Meta-Llama-3.1-405B-Instruct",
12
+ "meta/llama-3.2-11b": "meta-llama/Llama-3.2-11B-Vision-Instruct",
13
+ "meta/llama-3.2-90b": "meta-llama/Llama-3.2-90B-Vision-Instruct",
14
+ "meta/llama-3.3-70b": "meta-llama/Llama-3.3-70B-Instruct",
15
+ "meta/llama-4-scout": "meta-llama/Llama-4-Scout-17B-16E-Instruct",
16
+ "meta/llama-4-maverick": "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
17
+ "minimax/m2.5": "MiniMax/MiniMax-M2.5",
18
+ "alibaba/qwen3-235b": "Qwen/Qwen3-235B-A22B",
19
+ "alibaba/qwen3-32b": "Qwen/Qwen3-32B",
20
+ "alibaba/qwen3.5-397b": "Qwen/Qwen3.5-397B-A17B",
21
+ "alibaba/qwen3.5-122b": "Qwen/Qwen3.5-122B-A10B",
22
+ "alibaba/qwen3.5-35b": "Qwen/Qwen3.5-35B-A3B",
23
+ "alibaba/qwen3.5-27b": "Qwen/Qwen3.5-27B",
24
+ "alibaba/qwen3.5-9b": "Qwen/Qwen3.5-9B",
25
+ "alibaba/qwen3.5-4b": "Qwen/Qwen3.5-4B",
26
+ "alibaba/qwen3.5-2b": "Qwen/Qwen3.5-2B",
27
+ "alibaba/qwen3.5-0.8b": "Qwen/Qwen3.5-0.8B",
28
+ "alibaba/qwen3.6-flash": "Qwen/Qwen3.6-35B-A3B",
29
+ "alibaba/qwen3-embedding-0.6b": "Qwen/Qwen3-Embedding-0.6B",
30
+ "alibaba/qwen3-embedding-4b": "Qwen/Qwen3-Embedding-4B",
31
+ "alibaba/qwen3-embedding-8b": "Qwen/Qwen3-Embedding-8B",
32
+ "deepseek/deepseek-v3.2": "deepseek-ai/DeepSeek-V3.2",
33
+ "moonshot/kimi-k2.5": "moonshotai/Kimi-K2.5",
34
+ "zhipu/glm-5": "zai-org/GLM-5",
35
+ "zhipu/glm-5.1": "zai-org/GLM-5.1",
36
+ };
37
+ export const withCanonicalIdsForDeepInfra = (provider, extraMapping) => withCanonicalIds(provider, {
38
+ mapping: { ...MAPPING, ...extraMapping },
39
+ options: { stripNamespace: false },
40
+ });
@@ -0,0 +1 @@
1
+ export * from "./canonical";
@@ -0,0 +1 @@
1
+ export * from "./canonical";
@@ -0,0 +1,3 @@
1
+ import { type DeepSeekProvider } from "@ai-sdk/deepseek";
2
+ import type { ModelId } from "../../models/types";
3
+ export declare const withCanonicalIdsForDeepSeek: (provider: DeepSeekProvider, extraMapping?: Partial<Record<ModelId, string>>) => import("@ai-sdk/provider").ProviderV3;
@@ -0,0 +1,9 @@
1
+ import {} from "@ai-sdk/deepseek";
2
+ import { withCanonicalIds } from "../registry";
3
+ const MAPPING = {
4
+ "deepseek/deepseek-v3.2": "deepseek-chat",
5
+ };
6
+ export const withCanonicalIdsForDeepSeek = (provider, extraMapping) => withCanonicalIds(provider, {
7
+ mapping: { ...MAPPING, ...extraMapping },
8
+ options: { stripNamespace: true },
9
+ });
@@ -0,0 +1 @@
1
+ export * from "./canonical";
@@ -0,0 +1 @@
1
+ export * from "./canonical";
@@ -0,0 +1,3 @@
1
+ import { type FireworksProvider } from "@ai-sdk/fireworks";
2
+ import type { ModelId } from "../../models/types";
3
+ export declare const withCanonicalIdsForFireworks: (provider: FireworksProvider, extraMapping?: Partial<Record<ModelId, string>>) => import("@ai-sdk/provider").ProviderV3;