@hebo-ai/gateway 0.11.0 → 0.11.2

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.
@@ -49,12 +49,16 @@ export function convertToModelMessages(messages) {
49
49
  if (message.role === "tool")
50
50
  continue;
51
51
  if (message.role === "system") {
52
+ const content = Array.isArray(message.content)
53
+ ? message.content.map((p) => p.text).join("")
54
+ : message.content;
55
+ const out = { role: "system", content };
52
56
  if (message.cache_control) {
53
- message.providerOptions = {
57
+ out.providerOptions = {
54
58
  unknown: { cache_control: message.cache_control },
55
59
  };
56
60
  }
57
- modelMessages.push(message);
61
+ modelMessages.push(out);
58
62
  continue;
59
63
  }
60
64
  if (message.role === "user") {
@@ -134,7 +134,18 @@ export declare const ChatCompletionsToolCallSchema: z.ZodObject<{
134
134
  export type ChatCompletionsToolCall = z.infer<typeof ChatCompletionsToolCallSchema>;
135
135
  export declare const ChatCompletionsSystemMessageSchema: z.ZodObject<{
136
136
  role: z.ZodLiteral<"system">;
137
- content: z.ZodString;
137
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
138
+ type: z.ZodLiteral<"text">;
139
+ text: z.ZodString;
140
+ cache_control: z.ZodOptional<z.ZodObject<{
141
+ type: z.ZodLiteral<"ephemeral">;
142
+ ttl: z.ZodOptional<z.ZodEnum<{
143
+ "5m": "5m";
144
+ "1h": "1h";
145
+ "24h": "24h";
146
+ }>>;
147
+ }, z.core.$strip>>;
148
+ }, z.core.$strip>>]>;
138
149
  name: z.ZodOptional<z.ZodString>;
139
150
  cache_control: z.ZodOptional<z.ZodObject<{
140
151
  type: z.ZodLiteral<"ephemeral">;
@@ -306,7 +317,18 @@ export declare const ChatCompletionsToolMessageSchema: z.ZodObject<{
306
317
  export type ChatCompletionsToolMessage = z.infer<typeof ChatCompletionsToolMessageSchema>;
307
318
  export declare const ChatCompletionsMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
308
319
  role: z.ZodLiteral<"system">;
309
- content: z.ZodString;
320
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
321
+ type: z.ZodLiteral<"text">;
322
+ text: z.ZodString;
323
+ cache_control: z.ZodOptional<z.ZodObject<{
324
+ type: z.ZodLiteral<"ephemeral">;
325
+ ttl: z.ZodOptional<z.ZodEnum<{
326
+ "5m": "5m";
327
+ "1h": "1h";
328
+ "24h": "24h";
329
+ }>>;
330
+ }, z.core.$strip>>;
331
+ }, z.core.$strip>>]>;
310
332
  name: z.ZodOptional<z.ZodString>;
311
333
  cache_control: z.ZodOptional<z.ZodObject<{
312
334
  type: z.ZodLiteral<"ephemeral">;
@@ -524,7 +546,18 @@ export type ChatCompletionsMetadata = z.infer<typeof ChatCompletionsMetadataSche
524
546
  declare const ChatCompletionsInputsSchema: z.ZodObject<{
525
547
  messages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
526
548
  role: z.ZodLiteral<"system">;
527
- content: z.ZodString;
549
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
550
+ type: z.ZodLiteral<"text">;
551
+ text: z.ZodString;
552
+ cache_control: z.ZodOptional<z.ZodObject<{
553
+ type: z.ZodLiteral<"ephemeral">;
554
+ ttl: z.ZodOptional<z.ZodEnum<{
555
+ "5m": "5m";
556
+ "1h": "1h";
557
+ "24h": "24h";
558
+ }>>;
559
+ }, z.core.$strip>>;
560
+ }, z.core.$strip>>]>;
528
561
  name: z.ZodOptional<z.ZodString>;
529
562
  cache_control: z.ZodOptional<z.ZodObject<{
530
563
  type: z.ZodLiteral<"ephemeral">;
@@ -786,7 +819,18 @@ export type ChatCompletionsInputs = z.infer<typeof ChatCompletionsInputsSchema>;
786
819
  export declare const ChatCompletionsBodySchema: z.ZodObject<{
787
820
  messages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
788
821
  role: z.ZodLiteral<"system">;
789
- content: z.ZodString;
822
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
823
+ type: z.ZodLiteral<"text">;
824
+ text: z.ZodString;
825
+ cache_control: z.ZodOptional<z.ZodObject<{
826
+ type: z.ZodLiteral<"ephemeral">;
827
+ ttl: z.ZodOptional<z.ZodEnum<{
828
+ "5m": "5m";
829
+ "1h": "1h";
830
+ "24h": "24h";
831
+ }>>;
832
+ }, z.core.$strip>>;
833
+ }, z.core.$strip>>]>;
790
834
  name: z.ZodOptional<z.ZodString>;
791
835
  cache_control: z.ZodOptional<z.ZodObject<{
792
836
  type: z.ZodLiteral<"ephemeral">;
@@ -44,7 +44,7 @@ export const ChatCompletionsToolCallSchema = z.object({
44
44
  });
45
45
  export const ChatCompletionsSystemMessageSchema = z.object({
46
46
  role: z.literal("system"),
47
- content: z.string(),
47
+ content: z.union([z.string(), z.array(ChatCompletionsContentPartTextSchema)]),
48
48
  name: z.string().optional(),
49
49
  // Extension origin: OpenRouter/Vercel/Anthropic
50
50
  cache_control: ChatCompletionsCacheControlSchema.optional().meta({ extension: true }),
@@ -6,7 +6,7 @@ export declare function createParamsMapper(mappers: ((v: unknown) => unknown)[])
6
6
  * Normalizes an object (row) by applying a chain of atomic mappers.
7
7
  * Mappers are expected to mutate the object for performance and to avoid spreads.
8
8
  */
9
- export declare function createRowMapper<T>(mappers: ((row: Record<string, unknown>) => Record<string, unknown>)[]): (row: Record<string, unknown>) => T;
9
+ export declare function createRowMapper<T>(mappers: ((row: T) => T)[]): (row: T) => T;
10
10
  /**
11
11
  * Atomic mappers for input parameters.
12
12
  */
@@ -541,17 +541,20 @@ export class MessagesTransformStream extends TransformStream {
541
541
  }
542
542
  case "tool-input-start": {
543
543
  currentToolCallId = part.id;
544
+ const contentBlock = {
545
+ type: "tool_use",
546
+ id: part.id,
547
+ name: normalizeToolName(part.toolName),
548
+ input: {},
549
+ };
550
+ if (part.providerMetadata)
551
+ contentBlock.extra_content = part.providerMetadata;
544
552
  controller.enqueue({
545
553
  event: "content_block_start",
546
554
  data: {
547
555
  type: "content_block_start",
548
556
  index: blockIndex,
549
- content_block: {
550
- type: "tool_use",
551
- id: part.id,
552
- name: normalizeToolName(part.toolName),
553
- input: {},
554
- },
557
+ content_block: contentBlock,
555
558
  },
556
559
  });
557
560
  break;
@@ -167,6 +167,18 @@ export declare const qwen36Flash: import("../../utils").Preset<"alibaba/qwen3.6-
167
167
  created: string;
168
168
  knowledge: string;
169
169
  }>;
170
+ export declare const qwen36_27b: import("../../utils").Preset<"alibaba/qwen3.6-27b", CatalogModel, {
171
+ modalities: {
172
+ input: readonly ["text", "image", "video", "file"];
173
+ output: readonly ["text"];
174
+ };
175
+ capabilities: ("reasoning" | "temperature" | "attachments" | "tool_call" | "structured_output")[];
176
+ providers: readonly ["alibaba"];
177
+ name: string;
178
+ context: number;
179
+ created: string;
180
+ knowledge: string;
181
+ }>;
170
182
  export declare const qwen36MaxPreview: import("../../utils").Preset<"alibaba/qwen3.6-max-preview", CatalogModel, {
171
183
  modalities: {
172
184
  input: readonly ["text", "image", "video", "file"];
@@ -256,6 +268,17 @@ export declare const qwen: {
256
268
  context: number;
257
269
  created: string;
258
270
  knowledge: string;
271
+ }>, import("../../utils").Preset<"alibaba/qwen3.6-27b", CatalogModel, {
272
+ modalities: {
273
+ input: readonly ["text", "image", "video", "file"];
274
+ output: readonly ["text"];
275
+ };
276
+ capabilities: ("reasoning" | "temperature" | "attachments" | "tool_call" | "structured_output")[];
277
+ providers: readonly ["alibaba"];
278
+ name: string;
279
+ context: number;
280
+ created: string;
281
+ knowledge: string;
259
282
  }>, import("../../utils").Preset<"alibaba/qwen3.6-max-preview", CatalogModel, {
260
283
  modalities: {
261
284
  input: readonly ["text", "image", "video", "file"];
@@ -422,6 +445,17 @@ export declare const qwen: {
422
445
  context: number;
423
446
  created: string;
424
447
  knowledge: string;
448
+ }> | import("../../utils").Preset<"alibaba/qwen3.6-27b", CatalogModel, {
449
+ modalities: {
450
+ input: readonly ["text", "image", "video", "file"];
451
+ output: readonly ["text"];
452
+ };
453
+ capabilities: ("reasoning" | "temperature" | "attachments" | "tool_call" | "structured_output")[];
454
+ providers: readonly ["alibaba"];
455
+ name: string;
456
+ context: number;
457
+ created: string;
458
+ knowledge: string;
425
459
  }> | import("../../utils").Preset<"alibaba/qwen3.6-max-preview", CatalogModel, {
426
460
  modalities: {
427
461
  input: readonly ["text", "image", "video", "file"];
@@ -637,6 +671,17 @@ export declare const qwen: {
637
671
  context: number;
638
672
  created: string;
639
673
  knowledge: string;
674
+ }>, import("../../utils").Preset<"alibaba/qwen3.6-27b", CatalogModel, {
675
+ modalities: {
676
+ input: readonly ["text", "image", "video", "file"];
677
+ output: readonly ["text"];
678
+ };
679
+ capabilities: ("reasoning" | "temperature" | "attachments" | "tool_call" | "structured_output")[];
680
+ providers: readonly ["alibaba"];
681
+ name: string;
682
+ context: number;
683
+ created: string;
684
+ knowledge: string;
640
685
  }>, import("../../utils").Preset<"alibaba/qwen3.6-max-preview", CatalogModel, {
641
686
  modalities: {
642
687
  input: readonly ["text", "image", "video", "file"];
@@ -833,6 +878,17 @@ export declare const qwen: {
833
878
  context: number;
834
879
  created: string;
835
880
  knowledge: string;
881
+ }>, import("../../utils").Preset<"alibaba/qwen3.6-27b", CatalogModel, {
882
+ modalities: {
883
+ input: readonly ["text", "image", "video", "file"];
884
+ output: readonly ["text"];
885
+ };
886
+ capabilities: ("reasoning" | "temperature" | "attachments" | "tool_call" | "structured_output")[];
887
+ providers: readonly ["alibaba"];
888
+ name: string;
889
+ context: number;
890
+ created: string;
891
+ knowledge: string;
836
892
  }>, import("../../utils").Preset<"alibaba/qwen3.6-max-preview", CatalogModel, {
837
893
  modalities: {
838
894
  input: readonly ["text", "image", "video", "file"];
@@ -178,6 +178,18 @@ export const qwen36Flash = presetFor()("alibaba/qwen3.6-flash", {
178
178
  created: "2026-04-02",
179
179
  knowledge: "2025-04",
180
180
  });
181
+ export const qwen36_27b = presetFor()("alibaba/qwen3.6-27b", {
182
+ modalities: {
183
+ input: ["text", "image", "video", "file"],
184
+ output: ["text"],
185
+ },
186
+ capabilities: ["attachments", "reasoning", "tool_call", "structured_output", "temperature"],
187
+ providers: ["alibaba"],
188
+ name: "Qwen3.6 27B",
189
+ context: 262144,
190
+ created: "2026-04-21",
191
+ knowledge: "2025-04",
192
+ });
181
193
  export const qwen36MaxPreview = presetFor()("alibaba/qwen3.6-max-preview", {
182
194
  modalities: {
183
195
  input: ["text", "image", "video", "file"],
@@ -235,7 +247,7 @@ export const qwen3Embedding8b = presetFor()("alibaba/qwen3-embedding-8b", {
235
247
  const qwenAtomic = {
236
248
  v3: [qwen3_235b, qwen3_32b],
237
249
  "v3.5": [qwen35Plus, qwen35Flash, qwen35_397b, qwen35_122b, qwen35_35b, qwen35_27b, qwen35_9b, qwen35_4b, qwen35_2b, qwen35_08b],
238
- "v3.6": [qwen36Plus, qwen36Flash, qwen36MaxPreview],
250
+ "v3.6": [qwen36Plus, qwen36Flash, qwen36_27b, qwen36MaxPreview],
239
251
  coder: [qwen3CoderNext],
240
252
  vl: [qwen3Vl235b],
241
253
  embedding: [qwen3Embedding06b, qwen3Embedding4b, qwen3Embedding8b],
@@ -90,7 +90,6 @@ export const claudeReasoningMiddleware = {
90
90
  }
91
91
  else if (reasoning.effort) {
92
92
  if (isClaude4(modelId)) {
93
- // @ts-expect-error AI SDK type missing "xhigh" effort level (native on Opus 4.7+)
94
93
  target.effort = mapClaudeReasoningEffort(reasoning.effort, modelId);
95
94
  }
96
95
  if (isOpus47(modelId)) {
@@ -9,14 +9,14 @@ export declare const geminiEmbedding001: import("../../utils").Preset<"google/em
9
9
  };
10
10
  providers: readonly ["vertex"];
11
11
  }>;
12
- export declare const geminiEmbedding2Preview: import("../../utils").Preset<"google/gemini-embedding-2-preview", CatalogModel, {
13
- name: string;
14
- created: string;
15
- context: number;
12
+ export declare const geminiEmbedding2: import("../../utils").Preset<"google/gemini-embedding-2", CatalogModel, {
16
13
  modalities: {
17
- input: readonly ["text"];
14
+ input: readonly ["text", "image", "video", "audio", "pdf"];
18
15
  output: readonly ["embedding"];
19
16
  };
17
+ name: string;
18
+ created: string;
19
+ context: number;
20
20
  providers: readonly ["vertex"];
21
21
  }>;
22
22
  export declare const gemini3FlashPreview: import("../../utils").Preset<"google/gemini-3-flash-preview", CatalogModel, {
@@ -581,14 +581,14 @@ export declare const gemini: {
581
581
  output: readonly ["embedding"];
582
582
  };
583
583
  providers: readonly ["vertex"];
584
- }>, import("../../utils").Preset<"google/gemini-embedding-2-preview", CatalogModel, {
585
- name: string;
586
- created: string;
587
- context: number;
584
+ }>, import("../../utils").Preset<"google/gemini-embedding-2", CatalogModel, {
588
585
  modalities: {
589
- input: readonly ["text"];
586
+ input: readonly ["text", "image", "video", "audio", "pdf"];
590
587
  output: readonly ["embedding"];
591
588
  };
589
+ name: string;
590
+ created: string;
591
+ context: number;
592
592
  providers: readonly ["vertex"];
593
593
  }>];
594
594
  readonly all: (import("../../utils").Preset<"google/embedding-001", CatalogModel, {
@@ -600,14 +600,14 @@ export declare const gemini: {
600
600
  output: readonly ["embedding"];
601
601
  };
602
602
  providers: readonly ["vertex"];
603
- }> | import("../../utils").Preset<"google/gemini-embedding-2-preview", CatalogModel, {
604
- name: string;
605
- created: string;
606
- context: number;
603
+ }> | import("../../utils").Preset<"google/gemini-embedding-2", CatalogModel, {
607
604
  modalities: {
608
- input: readonly ["text"];
605
+ input: readonly ["text", "image", "video", "audio", "pdf"];
609
606
  output: readonly ["embedding"];
610
607
  };
608
+ name: string;
609
+ created: string;
610
+ context: number;
611
611
  providers: readonly ["vertex"];
612
612
  }> | import("../../utils").Preset<"google/gemini-3-flash-preview", CatalogModel, {
613
613
  name: string;
@@ -27,10 +27,14 @@ export const geminiEmbedding001 = presetFor()("google/embedding-001", {
27
27
  created: "2025-05-20",
28
28
  context: 8192,
29
29
  });
30
- export const geminiEmbedding2Preview = presetFor()("google/gemini-embedding-2-preview", {
30
+ export const geminiEmbedding2 = presetFor()("google/gemini-embedding-2", {
31
31
  ...GEMINI_EMBEDDINGS_BASE,
32
- name: "Gemini Embedding 2 (Preview)",
33
- created: "2026-03-10",
32
+ modalities: {
33
+ input: ["text", "image", "video", "audio", "pdf"],
34
+ output: ["embedding"],
35
+ },
36
+ name: "Gemini Embedding 2",
37
+ created: "2026-04-23",
34
38
  context: 8192,
35
39
  });
36
40
  export const gemini3FlashPreview = presetFor()("google/gemini-3-flash-preview", {
@@ -170,7 +174,7 @@ export const gemma = {
170
174
  const geminiAtomic = {
171
175
  "v2.5": [gemini25FlashLite, gemini25Flash, gemini25Pro],
172
176
  "v3-preview": [gemini3FlashPreview, gemini31FlashLitePreview, gemini31ProPreview],
173
- embeddings: [geminiEmbedding001, geminiEmbedding2Preview],
177
+ embeddings: [geminiEmbedding001, geminiEmbedding2],
174
178
  };
175
179
  const geminiGroups = {
176
180
  "v2.x": [...geminiAtomic["v2.5"]],
@@ -249,6 +249,30 @@ export declare const gpt54Pro: import("../../utils").Preset<"openai/gpt-5.4-pro"
249
249
  capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
250
250
  providers: readonly ["openai", "azure"];
251
251
  }>;
252
+ export declare const gpt55: import("../../utils").Preset<"openai/gpt-5.5", CatalogModel, {
253
+ name: string;
254
+ created: string;
255
+ knowledge: string;
256
+ context: number;
257
+ modalities: {
258
+ input: readonly ["text", "image"];
259
+ output: readonly ["text"];
260
+ };
261
+ capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
262
+ providers: readonly ["openai", "azure"];
263
+ }>;
264
+ export declare const gpt55Pro: import("../../utils").Preset<"openai/gpt-5.5-pro", CatalogModel, {
265
+ name: string;
266
+ created: string;
267
+ knowledge: string;
268
+ context: number;
269
+ modalities: {
270
+ input: readonly ["text", "image"];
271
+ output: readonly ["text"];
272
+ };
273
+ capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
274
+ providers: readonly ["openai", "azure"];
275
+ }>;
252
276
  export declare const textEmbedding3Small: import("../../utils").Preset<"openai/text-embedding-3-small", CatalogModel, {
253
277
  name: string;
254
278
  created: string;
@@ -388,7 +412,18 @@ export declare const gptOss: {
388
412
  }>];
389
413
  };
390
414
  export declare const gpt: {
391
- readonly latest: readonly [import("../../utils").Preset<"openai/gpt-5.4", CatalogModel, {
415
+ readonly latest: readonly [import("../../utils").Preset<"openai/gpt-5.5", CatalogModel, {
416
+ name: string;
417
+ created: string;
418
+ knowledge: string;
419
+ context: number;
420
+ modalities: {
421
+ input: readonly ["text", "image"];
422
+ output: readonly ["text"];
423
+ };
424
+ capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
425
+ providers: readonly ["openai", "azure"];
426
+ }>, import("../../utils").Preset<"openai/gpt-5.5-pro", CatalogModel, {
392
427
  name: string;
393
428
  created: string;
394
429
  knowledge: string;
@@ -651,6 +686,28 @@ export declare const gpt: {
651
686
  };
652
687
  capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
653
688
  providers: readonly ["openai", "azure"];
689
+ }> | import("../../utils").Preset<"openai/gpt-5.5", CatalogModel, {
690
+ name: string;
691
+ created: string;
692
+ knowledge: string;
693
+ context: number;
694
+ modalities: {
695
+ input: readonly ["text", "image"];
696
+ output: readonly ["text"];
697
+ };
698
+ capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
699
+ providers: readonly ["openai", "azure"];
700
+ }> | import("../../utils").Preset<"openai/gpt-5.5-pro", CatalogModel, {
701
+ name: string;
702
+ created: string;
703
+ knowledge: string;
704
+ context: number;
705
+ modalities: {
706
+ input: readonly ["text", "image"];
707
+ output: readonly ["text"];
708
+ };
709
+ capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
710
+ providers: readonly ["openai", "azure"];
654
711
  }>)[];
655
712
  readonly "v5.x": readonly [import("../../utils").Preset<"openai/gpt-5", CatalogModel, {
656
713
  name: string;
@@ -870,6 +927,28 @@ export declare const gpt: {
870
927
  };
871
928
  capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
872
929
  providers: readonly ["openai", "azure"];
930
+ }>, import("../../utils").Preset<"openai/gpt-5.5", CatalogModel, {
931
+ name: string;
932
+ created: string;
933
+ knowledge: string;
934
+ context: number;
935
+ modalities: {
936
+ input: readonly ["text", "image"];
937
+ output: readonly ["text"];
938
+ };
939
+ capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
940
+ providers: readonly ["openai", "azure"];
941
+ }>, import("../../utils").Preset<"openai/gpt-5.5-pro", CatalogModel, {
942
+ name: string;
943
+ created: string;
944
+ knowledge: string;
945
+ context: number;
946
+ modalities: {
947
+ input: readonly ["text", "image"];
948
+ output: readonly ["text"];
949
+ };
950
+ capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
951
+ providers: readonly ["openai", "azure"];
873
952
  }>];
874
953
  readonly v5: readonly [import("../../utils").Preset<"openai/gpt-5", CatalogModel, {
875
954
  name: string;
@@ -1094,6 +1173,29 @@ export declare const gpt: {
1094
1173
  capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
1095
1174
  providers: readonly ["openai", "azure"];
1096
1175
  }>];
1176
+ readonly "v5.5": readonly [import("../../utils").Preset<"openai/gpt-5.5", CatalogModel, {
1177
+ name: string;
1178
+ created: string;
1179
+ knowledge: string;
1180
+ context: number;
1181
+ modalities: {
1182
+ input: readonly ["text", "image"];
1183
+ output: readonly ["text"];
1184
+ };
1185
+ capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
1186
+ providers: readonly ["openai", "azure"];
1187
+ }>, import("../../utils").Preset<"openai/gpt-5.5-pro", CatalogModel, {
1188
+ name: string;
1189
+ created: string;
1190
+ knowledge: string;
1191
+ context: number;
1192
+ modalities: {
1193
+ input: readonly ["text", "image"];
1194
+ output: readonly ["text"];
1195
+ };
1196
+ capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
1197
+ providers: readonly ["openai", "azure"];
1198
+ }>];
1097
1199
  readonly codex: readonly [import("../../utils").Preset<"openai/gpt-5-codex", CatalogModel, {
1098
1200
  name: string;
1099
1201
  created: string;
@@ -1237,6 +1339,17 @@ export declare const gpt: {
1237
1339
  };
1238
1340
  capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
1239
1341
  providers: readonly ["openai", "azure"];
1342
+ }>, import("../../utils").Preset<"openai/gpt-5.5-pro", CatalogModel, {
1343
+ name: string;
1344
+ created: string;
1345
+ knowledge: string;
1346
+ context: number;
1347
+ modalities: {
1348
+ input: readonly ["text", "image"];
1349
+ output: readonly ["text"];
1350
+ };
1351
+ capabilities: readonly ["attachments", "reasoning", "tool_call", "structured_output", "temperature"];
1352
+ providers: readonly ["openai", "azure"];
1240
1353
  }>];
1241
1354
  };
1242
1355
  export declare const textEmbeddings: {
@@ -194,6 +194,20 @@ export const gpt54Pro = presetFor()("openai/gpt-5.4-pro", {
194
194
  knowledge: "2025-08",
195
195
  context: 1050000,
196
196
  });
197
+ export const gpt55 = presetFor()("openai/gpt-5.5", {
198
+ ...GPT_BASE,
199
+ name: "GPT-5.5",
200
+ created: "2026-04-22",
201
+ knowledge: "2025-08",
202
+ context: 1050000,
203
+ });
204
+ export const gpt55Pro = presetFor()("openai/gpt-5.5-pro", {
205
+ ...GPT_PRO_BASE,
206
+ name: "GPT-5.5 Pro",
207
+ created: "2026-04-24",
208
+ knowledge: "2025-12",
209
+ context: 1050000,
210
+ });
197
211
  export const textEmbedding3Small = presetFor()("openai/text-embedding-3-small", {
198
212
  ...EMBEDDINGS_BASE,
199
213
  name: "Text Embedding 3 Small",
@@ -230,6 +244,7 @@ const gptAtomic = {
230
244
  "v5.2": [gpt52, gpt52Chat, gpt52Pro, gpt52Codex],
231
245
  "v5.3": [gpt53Codex, gpt53CodexSpark, gpt53Chat],
232
246
  "v5.4": [gpt54, gpt54Mini, gpt54Nano, gpt54Pro],
247
+ "v5.5": [gpt55, gpt55Pro],
233
248
  codex: [
234
249
  gpt5Codex,
235
250
  gpt51Codex,
@@ -240,7 +255,7 @@ const gptAtomic = {
240
255
  gpt53CodexSpark,
241
256
  ],
242
257
  chat: [gpt51Chat, gpt52Chat, gpt53Chat],
243
- pro: [gpt5Pro, gpt52Pro, gpt54Pro],
258
+ pro: [gpt5Pro, gpt52Pro, gpt54Pro, gpt55Pro],
244
259
  };
245
260
  const gptGroups = {
246
261
  "v5.x": [
@@ -249,6 +264,7 @@ const gptGroups = {
249
264
  ...gptAtomic["v5.2"],
250
265
  ...gptAtomic["v5.3"],
251
266
  ...gptAtomic["v5.4"],
267
+ ...gptAtomic["v5.5"],
252
268
  ],
253
269
  };
254
270
  const textEmbeddingsAtomic = {
@@ -266,7 +282,8 @@ export const gptOss = {
266
282
  export const gpt = {
267
283
  ...gptAtomic,
268
284
  ...gptGroups,
269
- latest: [gpt54, gpt54Mini, gpt54Nano],
285
+ // 5.5 Mini/Nano not released yet; keep 5.4 small variants in `latest` until they ship.
286
+ latest: [gpt55, gpt55Pro, gpt54Mini, gpt54Nano],
270
287
  all: Object.values(gptAtomic).flat(),
271
288
  };
272
289
  export const textEmbeddings = {
@@ -1,5 +1,5 @@
1
1
  import type { ProviderId } from "../providers/types";
2
- export declare const CANONICAL_MODEL_IDS: readonly ["anthropic/claude-opus-4.7", "anthropic/claude-opus-4.6", "anthropic/claude-sonnet-4.6", "anthropic/claude-haiku-4.5", "anthropic/claude-sonnet-4.5", "anthropic/claude-opus-4.5", "anthropic/claude-opus-4.1", "anthropic/claude-opus-4", "anthropic/claude-sonnet-4", "anthropic/claude-sonnet-3.7", "anthropic/claude-sonnet-3.5", "anthropic/claude-haiku-3.5", "anthropic/claude-haiku-3", "openai/gpt-oss-20b", "openai/gpt-oss-120b", "openai/gpt-5", "openai/gpt-5-pro", "openai/gpt-5.2", "openai/gpt-5.2-chat", "openai/gpt-5.2-pro", "openai/gpt-5.2-codex", "openai/gpt-5.3-codex", "openai/gpt-5.3-codex-spark", "openai/gpt-5.3-chat", "openai/gpt-5.4", "openai/gpt-5.4-mini", "openai/gpt-5.4-nano", "openai/gpt-5.4-pro", "openai/gpt-5-mini", "openai/gpt-5-nano", "openai/gpt-5-codex", "openai/gpt-5.1-codex", "openai/gpt-5.1-codex-max", "openai/gpt-5.1-codex-mini", "openai/gpt-5.1-chat", "openai/gpt-5.1", "openai/text-embedding-3-small", "openai/text-embedding-3-large", "amazon/nova-micro", "amazon/nova-lite", "amazon/nova-pro", "amazon/nova-premier", "amazon/nova-2-lite", "amazon/nova-2-multimodal-embeddings", "google/gemini-2.5-flash-lite", "google/gemini-2.5-flash", "google/gemini-2.5-pro", "google/gemini-3-flash-preview", "google/gemini-3.1-flash-lite-preview", "google/gemini-3.1-pro-preview", "google/gemini-embedding-2-preview", "google/embedding-001", "google/gemma-3-1b", "google/gemma-3-4b", "google/gemma-3-12b", "google/gemma-3-27b", "google/gemma-4-e2b", "google/gemma-4-e4b", "google/gemma-4-26b-a4b", "google/gemma-4-31b", "meta/llama-3.1-8b", "meta/llama-3.1-70b", "meta/llama-3.1-405b", "meta/llama-3.2-1b", "meta/llama-3.2-3b", "meta/llama-3.2-11b", "meta/llama-3.2-90b", "meta/llama-3.3-70b", "meta/llama-4-scout", "meta/llama-4-maverick", "cohere/embed-v4.0", "cohere/embed-english-v3.0", "cohere/embed-english-light-v3.0", "cohere/embed-multilingual-v3.0", "cohere/embed-multilingual-light-v3.0", "cohere/command-a", "cohere/command-r7b", "cohere/command-a-translate", "cohere/command-a-reasoning", "cohere/command-a-vision", "cohere/command-r", "cohere/command-r-plus", "minimax/m2.5", "minimax/m2.7", "moonshot/kimi-k2.5", "moonshot/kimi-k2.6", "xai/grok-4.1-fast", "xai/grok-4.1-fast-reasoning", "xai/grok-4.2", "xai/grok-4.2-reasoning", "xai/grok-4.2-multi-agent", "deepseek/deepseek-v3.2", "voyage/voyage-2-code", "voyage/voyage-2-law", "voyage/voyage-2-finance", "voyage/voyage-3-code", "voyage/voyage-3-large", "voyage/voyage-3.5-lite", "voyage/voyage-3.5", "voyage/voyage-4-lite", "voyage/voyage-4", "voyage/voyage-4-large", "alibaba/qwen3-235b", "alibaba/qwen3-32b", "alibaba/qwen3.5-plus", "alibaba/qwen3.5-flash", "alibaba/qwen3.5-397b", "alibaba/qwen3.5-122b", "alibaba/qwen3.5-35b", "alibaba/qwen3.5-27b", "alibaba/qwen3.5-9b", "alibaba/qwen3.5-4b", "alibaba/qwen3.5-2b", "alibaba/qwen3.5-0.8b", "alibaba/qwen3.6-plus", "alibaba/qwen3.6-flash", "alibaba/qwen3.6-max-preview", "alibaba/qwen3-coder-next", "alibaba/qwen3-vl-235b", "alibaba/qwen3-embedding-0.6b", "alibaba/qwen3-embedding-4b", "alibaba/qwen3-embedding-8b", "zhipu/glm-5", "zhipu/glm-5-turbo", "zhipu/glm-5.1"];
2
+ export declare const CANONICAL_MODEL_IDS: readonly ["anthropic/claude-opus-4.7", "anthropic/claude-opus-4.6", "anthropic/claude-sonnet-4.6", "anthropic/claude-haiku-4.5", "anthropic/claude-sonnet-4.5", "anthropic/claude-opus-4.5", "anthropic/claude-opus-4.1", "anthropic/claude-opus-4", "anthropic/claude-sonnet-4", "anthropic/claude-sonnet-3.7", "anthropic/claude-sonnet-3.5", "anthropic/claude-haiku-3.5", "anthropic/claude-haiku-3", "openai/gpt-oss-20b", "openai/gpt-oss-120b", "openai/gpt-5", "openai/gpt-5-pro", "openai/gpt-5.2", "openai/gpt-5.2-chat", "openai/gpt-5.2-pro", "openai/gpt-5.2-codex", "openai/gpt-5.3-codex", "openai/gpt-5.3-codex-spark", "openai/gpt-5.3-chat", "openai/gpt-5.4", "openai/gpt-5.4-mini", "openai/gpt-5.4-nano", "openai/gpt-5.4-pro", "openai/gpt-5.5", "openai/gpt-5.5-pro", "openai/gpt-5-mini", "openai/gpt-5-nano", "openai/gpt-5-codex", "openai/gpt-5.1-codex", "openai/gpt-5.1-codex-max", "openai/gpt-5.1-codex-mini", "openai/gpt-5.1-chat", "openai/gpt-5.1", "openai/text-embedding-3-small", "openai/text-embedding-3-large", "amazon/nova-micro", "amazon/nova-lite", "amazon/nova-pro", "amazon/nova-premier", "amazon/nova-2-lite", "amazon/nova-2-multimodal-embeddings", "google/gemini-2.5-flash-lite", "google/gemini-2.5-flash", "google/gemini-2.5-pro", "google/gemini-3-flash-preview", "google/gemini-3.1-flash-lite-preview", "google/gemini-3.1-pro-preview", "google/gemini-embedding-2", "google/embedding-001", "google/gemma-3-1b", "google/gemma-3-4b", "google/gemma-3-12b", "google/gemma-3-27b", "google/gemma-4-e2b", "google/gemma-4-e4b", "google/gemma-4-26b-a4b", "google/gemma-4-31b", "meta/llama-3.1-8b", "meta/llama-3.1-70b", "meta/llama-3.1-405b", "meta/llama-3.2-1b", "meta/llama-3.2-3b", "meta/llama-3.2-11b", "meta/llama-3.2-90b", "meta/llama-3.3-70b", "meta/llama-4-scout", "meta/llama-4-maverick", "cohere/embed-v4.0", "cohere/embed-english-v3.0", "cohere/embed-english-light-v3.0", "cohere/embed-multilingual-v3.0", "cohere/embed-multilingual-light-v3.0", "cohere/command-a", "cohere/command-r7b", "cohere/command-a-translate", "cohere/command-a-reasoning", "cohere/command-a-vision", "cohere/command-r", "cohere/command-r-plus", "minimax/m2.5", "minimax/m2.7", "moonshot/kimi-k2.5", "moonshot/kimi-k2.6", "xai/grok-4.1-fast", "xai/grok-4.1-fast-reasoning", "xai/grok-4.2", "xai/grok-4.2-reasoning", "xai/grok-4.2-multi-agent", "deepseek/deepseek-v3.2", "voyage/voyage-2-code", "voyage/voyage-2-law", "voyage/voyage-2-finance", "voyage/voyage-3-code", "voyage/voyage-3-large", "voyage/voyage-3.5-lite", "voyage/voyage-3.5", "voyage/voyage-4-lite", "voyage/voyage-4", "voyage/voyage-4-large", "alibaba/qwen3-235b", "alibaba/qwen3-32b", "alibaba/qwen3.5-plus", "alibaba/qwen3.5-flash", "alibaba/qwen3.5-397b", "alibaba/qwen3.5-122b", "alibaba/qwen3.5-35b", "alibaba/qwen3.5-27b", "alibaba/qwen3.5-9b", "alibaba/qwen3.5-4b", "alibaba/qwen3.5-2b", "alibaba/qwen3.5-0.8b", "alibaba/qwen3.6-plus", "alibaba/qwen3.6-flash", "alibaba/qwen3.6-27b", "alibaba/qwen3.6-max-preview", "alibaba/qwen3-coder-next", "alibaba/qwen3-vl-235b", "alibaba/qwen3-embedding-0.6b", "alibaba/qwen3-embedding-4b", "alibaba/qwen3-embedding-8b", "zhipu/glm-5", "zhipu/glm-5-turbo", "zhipu/glm-5.1"];
3
3
  export type CanonicalModelId = (typeof CANONICAL_MODEL_IDS)[number];
4
4
  export type ModelId = CanonicalModelId | (string & {});
5
5
  export type CatalogModel = {
@@ -29,6 +29,8 @@ export const CANONICAL_MODEL_IDS = [
29
29
  "openai/gpt-5.4-mini",
30
30
  "openai/gpt-5.4-nano",
31
31
  "openai/gpt-5.4-pro",
32
+ "openai/gpt-5.5",
33
+ "openai/gpt-5.5-pro",
32
34
  "openai/gpt-5-mini",
33
35
  "openai/gpt-5-nano",
34
36
  "openai/gpt-5-codex",
@@ -53,7 +55,7 @@ export const CANONICAL_MODEL_IDS = [
53
55
  "google/gemini-3-flash-preview",
54
56
  "google/gemini-3.1-flash-lite-preview",
55
57
  "google/gemini-3.1-pro-preview",
56
- "google/gemini-embedding-2-preview",
58
+ "google/gemini-embedding-2",
57
59
  "google/embedding-001",
58
60
  "google/gemma-3-1b",
59
61
  "google/gemma-3-4b",
@@ -127,6 +129,7 @@ export const CANONICAL_MODEL_IDS = [
127
129
  "alibaba/qwen3.5-0.8b",
128
130
  "alibaba/qwen3.6-plus",
129
131
  "alibaba/qwen3.6-flash",
132
+ "alibaba/qwen3.6-27b",
130
133
  "alibaba/qwen3.6-max-preview",
131
134
  "alibaba/qwen3-coder-next",
132
135
  "alibaba/qwen3-vl-235b",
@@ -31,6 +31,7 @@ export function deepMerge(base, override) {
31
31
  }
32
32
  return out;
33
33
  }
34
+ // oxlint-disable-next-line no-unnecessary-type-parameters
34
35
  export function presetFor() {
35
36
  return function preset(id, base) {
36
37
  return (override) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebo-ai/gateway",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
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",
@@ -253,56 +253,56 @@
253
253
  },
254
254
  "dependencies": {
255
255
  "@ai-sdk/provider": "^3.0.8",
256
- "ai": "^6.0.154",
257
- "lru-cache": "^11.3.3",
258
- "uuid": "^13.0.0",
256
+ "ai": "^6.0.168",
257
+ "lru-cache": "^11.3.5",
258
+ "uuid": "^14.0.0",
259
259
  "zod": "^4.3.6"
260
260
  },
261
261
  "devDependencies": {
262
262
  "@ai-sdk/alibaba": "^1.0.17",
263
- "@ai-sdk/amazon-bedrock": "^4.0.92",
264
- "@ai-sdk/anthropic": "^3.0.68",
263
+ "@ai-sdk/amazon-bedrock": "^4.0.96",
264
+ "@ai-sdk/anthropic": "^3.0.71",
265
265
  "@ai-sdk/cohere": "^3.0.30",
266
266
  "@ai-sdk/deepinfra": "^2.0.45",
267
267
  "@ai-sdk/deepseek": "^2.0.29",
268
268
  "@ai-sdk/fireworks": "^2.0.46",
269
- "@ai-sdk/google-vertex": "^4.0.105",
269
+ "@ai-sdk/google-vertex": "^4.0.112",
270
270
  "@ai-sdk/groq": "^3.0.35",
271
271
  "@ai-sdk/moonshotai": "^2.0.16",
272
- "@ai-sdk/openai": "^3.0.52",
272
+ "@ai-sdk/openai": "^3.0.53",
273
273
  "@ai-sdk/togetherai": "^2.0.45",
274
274
  "@ai-sdk/xai": "^3.0.83",
275
- "@anthropic-ai/sdk": "^0.88.0",
276
- "@aws-sdk/credential-providers": "^3.1027.0",
277
- "@langfuse/otel": "^5.0.2",
278
- "@libsql/client": "^0.17.2",
275
+ "@anthropic-ai/sdk": "^0.91.1",
276
+ "@aws-sdk/credential-providers": "^3.1037.0",
277
+ "@langfuse/otel": "^5.2.0",
278
+ "@libsql/client": "^0.17.3",
279
279
  "@mjackson/node-fetch-server": "^0.7.0",
280
280
  "@opentelemetry/api": "^1.9.1",
281
- "@opentelemetry/context-async-hooks": "^2.6.1",
282
- "@opentelemetry/sdk-trace-base": "^2.6.1",
283
- "@tanstack/react-router": "^1.168.10",
284
- "@tanstack/react-start": "^1.167.16",
281
+ "@opentelemetry/context-async-hooks": "^2.7.0",
282
+ "@opentelemetry/sdk-trace-base": "^2.7.0",
283
+ "@tanstack/react-router": "^1.168.24",
284
+ "@tanstack/react-start": "^1.167.49",
285
285
  "@types/better-sqlite3": "^7.6.13",
286
- "@types/bun": "1.3.12",
286
+ "@types/bun": "1.3.13",
287
287
  "@types/pg": "^8.20.0",
288
288
  "@types/react": "^19.2.14",
289
289
  "@types/react-dom": "^19.2.3",
290
290
  "@types/uuid": "^11.0.0",
291
- "better-sqlite3": "^12.8.0",
291
+ "better-sqlite3": "^12.9.0",
292
292
  "elysia": "^1.4.28",
293
- "hono": "^4.12.12",
294
- "lefthook": "^2.1.5",
295
- "mysql2": "^3.21.0",
296
- "next": "^16.2.3",
293
+ "hono": "^4.12.15",
294
+ "lefthook": "^2.1.6",
295
+ "mysql2": "^3.22.3",
296
+ "next": "^16.2.4",
297
297
  "openai": "^6.34.0",
298
- "oxfmt": "^0.44.0",
299
- "oxlint": "^1.59.0",
300
- "oxlint-tsgolint": "^0.20.0",
301
- "pg": "^8.19.0",
298
+ "oxfmt": "^0.46.0",
299
+ "oxlint": "^1.61.0",
300
+ "oxlint-tsgolint": "^0.22.0",
301
+ "pg": "^8.20.0",
302
302
  "pino": "^10.3.1",
303
303
  "postgres": "^3.4.9",
304
- "typescript": "^6.0.2",
305
- "vite": "^7.3.2",
304
+ "typescript": "^6.0.3",
305
+ "vite": "^8.0.10",
306
306
  "vite-tsconfig-paths": "^6.1.1",
307
307
  "voyage-ai-provider": "^3.0.0",
308
308
  "zhipu-ai-provider": "^0.3.0"
@@ -315,7 +315,7 @@
315
315
  "@ai-sdk/deepinfra": "^2.0.45",
316
316
  "@ai-sdk/deepseek": "^2.0.29",
317
317
  "@ai-sdk/fireworks": "^2.0.46",
318
- "@ai-sdk/google": "^3.0.43",
318
+ "@ai-sdk/google": "^3.0.64",
319
319
  "@ai-sdk/google-vertex": "^4.0.80",
320
320
  "@ai-sdk/groq": "^3.0.29",
321
321
  "@ai-sdk/moonshotai": "^2.0.16",