@hebo-ai/gateway 0.11.5 → 0.11.6

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.
@@ -71,18 +71,53 @@ export declare const grok43: import("../../utils").Preset<"xai/grok-4.3", Catalo
71
71
  };
72
72
  providers: readonly ["xai"];
73
73
  }>;
74
+ export declare const grok420: import("../../utils").Preset<"xai/grok-4.20", 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
+ }>;
86
+ export declare const grok420MultiAgent: import("../../utils").Preset<"xai/grok-4.20-multi-agent", CatalogModel, {
87
+ name: string;
88
+ created: string;
89
+ knowledge: string;
90
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
91
+ modalities: {
92
+ input: readonly ["text", "image"];
93
+ output: readonly ["text"];
94
+ };
95
+ providers: readonly ["xai"];
96
+ context: number;
97
+ }>;
74
98
  export declare const grok: {
75
- readonly latest: readonly [import("../../utils").Preset<"xai/grok-4.3", CatalogModel, {
99
+ readonly latest: readonly [import("../../utils").Preset<"xai/grok-4.20", CatalogModel, {
76
100
  name: string;
77
101
  created: string;
78
102
  knowledge: string;
103
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
104
+ modalities: {
105
+ input: readonly ["text", "image"];
106
+ output: readonly ["text"];
107
+ };
108
+ providers: readonly ["xai"];
79
109
  context: number;
110
+ }>, import("../../utils").Preset<"xai/grok-4.20-multi-agent", CatalogModel, {
111
+ name: string;
112
+ created: string;
113
+ knowledge: string;
80
114
  capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
81
115
  modalities: {
82
116
  input: readonly ["text", "image"];
83
117
  output: readonly ["text"];
84
118
  };
85
119
  providers: readonly ["xai"];
120
+ context: number;
86
121
  }>];
87
122
  readonly all: (import("../../utils").Preset<"xai/grok-4.1-fast", CatalogModel, {
88
123
  name: string;
@@ -150,6 +185,28 @@ export declare const grok: {
150
185
  output: readonly ["text"];
151
186
  };
152
187
  providers: readonly ["xai"];
188
+ }> | import("../../utils").Preset<"xai/grok-4.20", CatalogModel, {
189
+ name: string;
190
+ created: string;
191
+ knowledge: string;
192
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
193
+ modalities: {
194
+ input: readonly ["text", "image"];
195
+ output: readonly ["text"];
196
+ };
197
+ providers: readonly ["xai"];
198
+ context: number;
199
+ }> | import("../../utils").Preset<"xai/grok-4.20-multi-agent", CatalogModel, {
200
+ name: string;
201
+ created: string;
202
+ knowledge: string;
203
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
204
+ modalities: {
205
+ input: readonly ["text", "image"];
206
+ output: readonly ["text"];
207
+ };
208
+ providers: readonly ["xai"];
209
+ context: number;
153
210
  }>)[];
154
211
  readonly "v4.1": readonly [import("../../utils").Preset<"xai/grok-4.1-fast", CatalogModel, {
155
212
  name: string;
@@ -220,4 +277,27 @@ export declare const grok: {
220
277
  };
221
278
  providers: readonly ["xai"];
222
279
  }>];
280
+ readonly "v4.20": readonly [import("../../utils").Preset<"xai/grok-4.20", CatalogModel, {
281
+ name: string;
282
+ created: string;
283
+ knowledge: string;
284
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
285
+ modalities: {
286
+ input: readonly ["text", "image"];
287
+ output: readonly ["text"];
288
+ };
289
+ providers: readonly ["xai"];
290
+ context: number;
291
+ }>, import("../../utils").Preset<"xai/grok-4.20-multi-agent", CatalogModel, {
292
+ name: string;
293
+ created: string;
294
+ knowledge: string;
295
+ capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
296
+ modalities: {
297
+ input: readonly ["text", "image"];
298
+ output: readonly ["text"];
299
+ };
300
+ providers: readonly ["xai"];
301
+ context: number;
302
+ }>];
223
303
  };
@@ -49,15 +49,28 @@ export const grok43 = presetFor()("xai/grok-4.3", {
49
49
  knowledge: "2024-11",
50
50
  context: 1000000,
51
51
  });
52
+ export const grok420 = presetFor()("xai/grok-4.20", {
53
+ ...GROK_REASONING_BASE,
54
+ name: "Grok 4.20",
55
+ created: "2026-03-09",
56
+ knowledge: "2024-11",
57
+ });
58
+ export const grok420MultiAgent = presetFor()("xai/grok-4.20-multi-agent", {
59
+ ...GROK_REASONING_BASE,
60
+ name: "Grok 4.20 Multi-Agent",
61
+ created: "2026-03-09",
62
+ knowledge: "2024-11",
63
+ });
52
64
  const grokAtomic = {
53
65
  "v4.1": [grok41Fast, grok41FastReasoning],
54
66
  "v4.2": [grok42, grok42Reasoning, grok42MultiAgent],
55
67
  "v4.3": [grok43],
68
+ "v4.20": [grok420, grok420MultiAgent],
56
69
  };
57
70
  const grokGroups = {};
58
71
  export const grok = {
59
72
  ...grokAtomic,
60
73
  ...grokGroups,
61
- latest: [grok43],
74
+ latest: [...grokAtomic["v4.20"]],
62
75
  all: Object.values(grokAtomic).flat(),
63
76
  };
@@ -32,9 +32,21 @@ export declare const glm51: import("../../utils").Preset<"zhipu/glm-5.1", Catalo
32
32
  capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
33
33
  context: number;
34
34
  }>;
35
+ export declare const glm52: import("../../utils").Preset<"zhipu/glm-5.2", CatalogModel, {
36
+ name: string;
37
+ context: number;
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
+ }>;
35
46
  export declare const glm: {
36
- readonly latest: readonly [import("../../utils").Preset<"zhipu/glm-5.1", CatalogModel, {
47
+ readonly latest: readonly [import("../../utils").Preset<"zhipu/glm-5.2", CatalogModel, {
37
48
  name: string;
49
+ context: number;
38
50
  created: string;
39
51
  providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
40
52
  modalities: {
@@ -42,7 +54,6 @@ export declare const glm: {
42
54
  output: readonly ["text"];
43
55
  };
44
56
  capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
45
- context: number;
46
57
  }>];
47
58
  readonly all: (import("../../utils").Preset<"zhipu/glm-5", CatalogModel, {
48
59
  name: string;
@@ -74,6 +85,16 @@ export declare const glm: {
74
85
  };
75
86
  capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
76
87
  context: number;
88
+ }> | import("../../utils").Preset<"zhipu/glm-5.2", CatalogModel, {
89
+ name: string;
90
+ context: number;
91
+ created: string;
92
+ providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
93
+ modalities: {
94
+ input: readonly ["text"];
95
+ output: readonly ["text"];
96
+ };
97
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
77
98
  }>)[];
78
99
  readonly "v5.x": readonly [import("../../utils").Preset<"zhipu/glm-5", CatalogModel, {
79
100
  name: string;
@@ -105,6 +126,16 @@ export declare const glm: {
105
126
  };
106
127
  capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
107
128
  context: number;
129
+ }>, import("../../utils").Preset<"zhipu/glm-5.2", CatalogModel, {
130
+ name: string;
131
+ context: number;
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"];
108
139
  }>];
109
140
  readonly v5: readonly [import("../../utils").Preset<"zhipu/glm-5", CatalogModel, {
110
141
  name: string;
@@ -138,4 +169,15 @@ export declare const glm: {
138
169
  capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
139
170
  context: number;
140
171
  }>];
172
+ readonly "v5.2": readonly [import("../../utils").Preset<"zhipu/glm-5.2", CatalogModel, {
173
+ name: string;
174
+ context: number;
175
+ created: string;
176
+ providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
177
+ modalities: {
178
+ input: readonly ["text"];
179
+ output: readonly ["text"];
180
+ };
181
+ capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
182
+ }>];
141
183
  };
@@ -26,16 +26,24 @@ export const glm51 = presetFor()("zhipu/glm-5.1", {
26
26
  created: "2026-03-27",
27
27
  providers: ["zai", "deepinfra", "chutes", "togetherai", "fireworks"],
28
28
  });
29
+ export const glm52 = presetFor()("zhipu/glm-5.2", {
30
+ ...GLM_5_BASE,
31
+ name: "GLM 5.2",
32
+ context: 1_000_000,
33
+ created: "2026-06-13",
34
+ providers: ["zai", "deepinfra", "chutes", "togetherai", "fireworks"],
35
+ });
29
36
  const glmAtomic = {
30
37
  v5: [glm5, glm5Turbo],
31
38
  "v5.1": [glm51],
39
+ "v5.2": [glm52],
32
40
  };
33
41
  const glmGroups = {
34
- "v5.x": [...glmAtomic["v5"], ...glmAtomic["v5.1"]],
42
+ "v5.x": [...glmAtomic["v5"], ...glmAtomic["v5.1"], ...glmAtomic["v5.2"]],
35
43
  };
36
44
  export const glm = {
37
45
  ...glmAtomic,
38
46
  ...glmGroups,
39
- latest: [...glmAtomic["v5.1"]],
47
+ latest: [...glmAtomic["v5.2"]],
40
48
  all: Object.values(glmAtomic).flat(),
41
49
  };
@@ -9,6 +9,8 @@ import { withCanonicalIds } from "../registry";
9
9
  const MAPPING = {
10
10
  // Require Inference Profiles and can't be resolved from standard name mapping
11
11
  "anthropic/claude-haiku-4.5": "{ip}anthropic.claude-haiku-4-5-20251001-v1:0",
12
+ "anthropic/claude-fable-5": "{ip}anthropic.claude-fable-5",
13
+ "anthropic/claude-opus-4.8": "{ip}anthropic.claude-opus-4-8",
12
14
  "anthropic/claude-opus-4.7": "{ip}anthropic.claude-opus-4-7",
13
15
  "anthropic/claude-sonnet-4.6": "{ip}anthropic.claude-sonnet-4-6",
14
16
  "anthropic/claude-sonnet-4.5": "{ip}anthropic.claude-sonnet-4-5-20250929-v1:0",
@@ -64,21 +64,17 @@ export const bedrockClaudeReasoningMiddleware = {
64
64
  return params;
65
65
  const target = (bedrock.reasoningConfig ??= {});
66
66
  if (thinking && typeof thinking === "object") {
67
- // Bedrock's InvokeModel (Messages) API supports "adaptive" thinking natively,
68
- // but @ai-sdk/amazon-bedrock only uses the Converse API which rejects "adaptive"
69
- // in additionalModelRequestFields it only accepts "enabled" / "disabled".
70
- // Map "adaptive" → "enabled" until the SDK adds InvokeModel support.
71
- // See: https://docs.aws.amazon.com/bedrock/latest/userguide/claude-messages-adaptive-thinking.html
72
- // SDK tracking issue: https://github.com/vercel/ai/issues/8513
73
- target.type = thinking.type === "adaptive" ? "enabled" : thinking.type;
67
+ // Bedrock Converse API supports "adaptive" natively for Claude Opus 4.6/4.7
68
+ // and Sonnet 4.6 via additionalModelRequestFields. Opus 4.7 *only* supports
69
+ // adaptive — "enabled" returns a 400.
70
+ // https://docs.aws.amazon.com/bedrock/latest/userguide/claude-messages-adaptive-thinking.html
71
+ target.type = thinking.type;
74
72
  if ("budgetTokens" in thinking && thinking.budgetTokens !== undefined) {
75
73
  target.budgetTokens = thinking.budgetTokens;
76
74
  }
77
75
  else if (target.type === "enabled") {
78
- // Bedrock requires budgetTokens when type is "enabled". When mapping from
79
- // "adaptive" (which doesn't require budgetTokens), compute a fallback using
80
- // the same effort-based logic as other model cases, defaulting to "medium".
81
- // Note: Bedrock Converse API doesn't support "adaptive" natively — see vercel/ai#8513
76
+ // Bedrock requires budgetTokens when type is "enabled" compute a fallback
77
+ // from effort, defaulting to "medium".
82
78
  const mappedEffort = effort === "max" ? "xhigh" : (effort ?? "medium");
83
79
  target.budgetTokens = calculateReasoningBudgetFromEffort(mappedEffort, params.maxOutputTokens ?? 65536, 1024);
84
80
  }
@@ -6,6 +6,8 @@ const MAPPING = {
6
6
  "xai/grok-4.2-reasoning": "grok-4.20-0309-reasoning",
7
7
  "xai/grok-4.2-multi-agent": "grok-4.20-multi-agent-0309",
8
8
  "xai/grok-4.3": "grok-4.3",
9
+ "xai/grok-4.20": "grok-4.20-0309-reasoning",
10
+ "xai/grok-4.20-multi-agent": "grok-4.20-multi-agent-0309",
9
11
  };
10
12
  export const withCanonicalIdsForXai = (provider, extraMapping) => withCanonicalIds(provider, {
11
13
  mapping: { ...MAPPING, ...extraMapping },
@@ -3,6 +3,7 @@ const MAPPING = {
3
3
  "zhipu/glm-5": "glm-5-20260211",
4
4
  "zhipu/glm-5-turbo": "glm-5-turbo-20260315",
5
5
  "zhipu/glm-5.1": "glm-5.1-20260406",
6
+ "zhipu/glm-5.2": "glm-5.2-20260616",
6
7
  };
7
8
  export const withCanonicalIdsForZai = (provider, extraMapping) => withCanonicalIds(provider, {
8
9
  mapping: { ...MAPPING, ...extraMapping },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebo-ai/gateway",
3
- "version": "0.11.5",
3
+ "version": "0.11.6",
4
4
  "description": "AI gateway as a framework. For full control over models, routing & lifecycle. OpenAI /chat/completions, OpenResponses /responses & Anthropic /messages.",
5
5
  "keywords": [
6
6
  "ai",
@@ -252,57 +252,57 @@
252
252
  "fix": "bun lint:staged && bun format:staged"
253
253
  },
254
254
  "dependencies": {
255
- "@ai-sdk/provider": "^3.0.10",
256
- "ai": "^6.0.176",
257
- "lru-cache": "^11.3.6",
258
- "uuid": "^14.0.0",
255
+ "@ai-sdk/provider": "^3.0.13",
256
+ "ai": "^6.0.221",
257
+ "lru-cache": "^11.5.2",
258
+ "uuid": "^14.0.1",
259
259
  "zod": "^4.3.6"
260
260
  },
261
261
  "devDependencies": {
262
- "@ai-sdk/alibaba": "^1.0.23",
263
- "@ai-sdk/amazon-bedrock": "^4.0.103",
264
- "@ai-sdk/anthropic": "^3.0.76",
265
- "@ai-sdk/cohere": "^3.0.35",
266
- "@ai-sdk/deepinfra": "^2.0.51",
267
- "@ai-sdk/deepseek": "^2.0.34",
268
- "@ai-sdk/fireworks": "^2.0.52",
269
- "@ai-sdk/google-vertex": "^4.0.124",
270
- "@ai-sdk/groq": "^3.0.39",
271
- "@ai-sdk/moonshotai": "^2.0.22",
272
- "@ai-sdk/openai": "^3.0.63",
273
- "@ai-sdk/togetherai": "^2.0.51",
274
- "@ai-sdk/xai": "^3.0.89",
262
+ "@ai-sdk/alibaba": "^1.0.36",
263
+ "@ai-sdk/amazon-bedrock": "^4.0.131",
264
+ "@ai-sdk/anthropic": "^3.0.95",
265
+ "@ai-sdk/cohere": "^3.0.46",
266
+ "@ai-sdk/deepinfra": "^2.0.62",
267
+ "@ai-sdk/deepseek": "^2.0.46",
268
+ "@ai-sdk/fireworks": "^2.0.66",
269
+ "@ai-sdk/google-vertex": "^4.0.158",
270
+ "@ai-sdk/groq": "^3.0.49",
271
+ "@ai-sdk/moonshotai": "^2.0.34",
272
+ "@ai-sdk/openai": "^3.0.82",
273
+ "@ai-sdk/togetherai": "^2.0.63",
274
+ "@ai-sdk/xai": "^3.0.105",
275
275
  "@anthropic-ai/sdk": "^0.91.1",
276
- "@aws-sdk/credential-providers": "^3.1045.0",
277
- "@langfuse/otel": "^5.3.0",
278
- "@libsql/client": "^0.17.3",
276
+ "@aws-sdk/credential-providers": "^3.1083.0",
277
+ "@langfuse/otel": "^5.9.1",
278
+ "@libsql/client": "^0.17.4",
279
279
  "@mjackson/node-fetch-server": "^0.7.0",
280
280
  "@opentelemetry/api": "^1.9.1",
281
- "@opentelemetry/context-async-hooks": "^2.7.1",
282
- "@opentelemetry/sdk-trace-base": "^2.7.1",
283
- "@tanstack/react-router": "^1.169.2",
284
- "@tanstack/react-start": "^1.167.65",
281
+ "@opentelemetry/context-async-hooks": "^2.9.0",
282
+ "@opentelemetry/sdk-trace-base": "^2.9.0",
283
+ "@tanstack/react-router": "^1.170.17",
284
+ "@tanstack/react-start": "^1.168.27",
285
285
  "@types/better-sqlite3": "^7.6.13",
286
- "@types/bun": "1.3.13",
286
+ "@types/bun": "1.3.14",
287
287
  "@types/pg": "^8.20.0",
288
- "@types/react": "^19.2.14",
288
+ "@types/react": "^19.2.17",
289
289
  "@types/react-dom": "^19.2.3",
290
290
  "@types/uuid": "^11.0.0",
291
- "better-sqlite3": "^12.9.0",
292
- "elysia": "^1.4.28",
293
- "hono": "^4.12.18",
294
- "lefthook": "^2.1.6",
295
- "mysql2": "^3.22.3",
296
- "next": "^16.2.6",
297
- "openai": "^6.37.0",
291
+ "better-sqlite3": "^12.11.1",
292
+ "elysia": "^1.4.29",
293
+ "hono": "^4.12.28",
294
+ "lefthook": "^2.1.10",
295
+ "mysql2": "^3.22.6",
296
+ "next": "^16.2.10",
297
+ "openai": "^6.45.0",
298
298
  "oxfmt": "^0.46.0",
299
299
  "oxlint": "^1.63.0",
300
300
  "oxlint-tsgolint": "^0.22.1",
301
- "pg": "^8.20.0",
301
+ "pg": "^8.22.0",
302
302
  "pino": "^10.3.1",
303
303
  "postgres": "^3.4.9",
304
304
  "typescript": "^6.0.3",
305
- "vite": "^8.0.11",
305
+ "vite": "^8.1.4",
306
306
  "vite-tsconfig-paths": "^6.1.1",
307
307
  "voyage-ai-provider": "^3.0.0",
308
308
  "zhipu-ai-provider": "^0.3.1"