@hebo-ai/gateway 0.11.0 → 0.11.1
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/dist/endpoints/chat-completions/converters.js +6 -2
- package/dist/endpoints/chat-completions/schema.d.ts +48 -4
- package/dist/endpoints/chat-completions/schema.js +1 -1
- package/dist/models/alibaba/presets.d.ts +56 -0
- package/dist/models/alibaba/presets.js +13 -1
- package/dist/models/anthropic/middleware.js +0 -1
- package/dist/models/google/presets.d.ts +15 -15
- package/dist/models/google/presets.js +8 -4
- package/dist/models/types.d.ts +1 -1
- package/dist/models/types.js +2 -1
- package/package.json +22 -22
|
@@ -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
|
-
|
|
57
|
+
out.providerOptions = {
|
|
54
58
|
unknown: { cache_control: message.cache_control },
|
|
55
59
|
};
|
|
56
60
|
}
|
|
57
|
-
modelMessages.push(
|
|
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 }),
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
30
|
+
export const geminiEmbedding2 = presetFor()("google/gemini-embedding-2", {
|
|
31
31
|
...GEMINI_EMBEDDINGS_BASE,
|
|
32
|
-
|
|
33
|
-
|
|
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,
|
|
177
|
+
embeddings: [geminiEmbedding001, geminiEmbedding2],
|
|
174
178
|
};
|
|
175
179
|
const geminiGroups = {
|
|
176
180
|
"v2.x": [...geminiAtomic["v2.5"]],
|
package/dist/models/types.d.ts
CHANGED
|
@@ -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
|
|
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", "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 = {
|
package/dist/models/types.js
CHANGED
|
@@ -53,7 +53,7 @@ export const CANONICAL_MODEL_IDS = [
|
|
|
53
53
|
"google/gemini-3-flash-preview",
|
|
54
54
|
"google/gemini-3.1-flash-lite-preview",
|
|
55
55
|
"google/gemini-3.1-pro-preview",
|
|
56
|
-
"google/gemini-embedding-2
|
|
56
|
+
"google/gemini-embedding-2",
|
|
57
57
|
"google/embedding-001",
|
|
58
58
|
"google/gemma-3-1b",
|
|
59
59
|
"google/gemma-3-4b",
|
|
@@ -127,6 +127,7 @@ export const CANONICAL_MODEL_IDS = [
|
|
|
127
127
|
"alibaba/qwen3.5-0.8b",
|
|
128
128
|
"alibaba/qwen3.6-plus",
|
|
129
129
|
"alibaba/qwen3.6-flash",
|
|
130
|
+
"alibaba/qwen3.6-27b",
|
|
130
131
|
"alibaba/qwen3.6-max-preview",
|
|
131
132
|
"alibaba/qwen3-coder-next",
|
|
132
133
|
"alibaba/qwen3-vl-235b",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebo-ai/gateway",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
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,55 +253,55 @@
|
|
|
253
253
|
},
|
|
254
254
|
"dependencies": {
|
|
255
255
|
"@ai-sdk/provider": "^3.0.8",
|
|
256
|
-
"ai": "^6.0.
|
|
257
|
-
"lru-cache": "^11.3.
|
|
256
|
+
"ai": "^6.0.168",
|
|
257
|
+
"lru-cache": "^11.3.5",
|
|
258
258
|
"uuid": "^13.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.
|
|
264
|
-
"@ai-sdk/anthropic": "^3.0.
|
|
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.
|
|
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.
|
|
272
|
+
"@ai-sdk/openai": "^3.0.53",
|
|
273
273
|
"@ai-sdk/togetherai": "^2.0.45",
|
|
274
274
|
"@ai-sdk/xai": "^3.0.83",
|
|
275
275
|
"@anthropic-ai/sdk": "^0.88.0",
|
|
276
|
-
"@aws-sdk/credential-providers": "^3.
|
|
277
|
-
"@langfuse/otel": "^5.0
|
|
276
|
+
"@aws-sdk/credential-providers": "^3.1035.0",
|
|
277
|
+
"@langfuse/otel": "^5.2.0",
|
|
278
278
|
"@libsql/client": "^0.17.2",
|
|
279
279
|
"@mjackson/node-fetch-server": "^0.7.0",
|
|
280
280
|
"@opentelemetry/api": "^1.9.1",
|
|
281
|
-
"@opentelemetry/context-async-hooks": "^2.
|
|
282
|
-
"@opentelemetry/sdk-trace-base": "^2.
|
|
283
|
-
"@tanstack/react-router": "^1.168.
|
|
284
|
-
"@tanstack/react-start": "^1.167.
|
|
281
|
+
"@opentelemetry/context-async-hooks": "^2.7.0",
|
|
282
|
+
"@opentelemetry/sdk-trace-base": "^2.7.0",
|
|
283
|
+
"@tanstack/react-router": "^1.168.23",
|
|
284
|
+
"@tanstack/react-start": "^1.167.42",
|
|
285
285
|
"@types/better-sqlite3": "^7.6.13",
|
|
286
286
|
"@types/bun": "1.3.12",
|
|
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.
|
|
291
|
+
"better-sqlite3": "^12.9.0",
|
|
292
292
|
"elysia": "^1.4.28",
|
|
293
|
-
"hono": "^4.12.
|
|
294
|
-
"lefthook": "^2.1.
|
|
295
|
-
"mysql2": "^3.
|
|
296
|
-
"next": "^16.2.
|
|
293
|
+
"hono": "^4.12.14",
|
|
294
|
+
"lefthook": "^2.1.6",
|
|
295
|
+
"mysql2": "^3.22.2",
|
|
296
|
+
"next": "^16.2.4",
|
|
297
297
|
"openai": "^6.34.0",
|
|
298
298
|
"oxfmt": "^0.44.0",
|
|
299
|
-
"oxlint": "^1.
|
|
299
|
+
"oxlint": "^1.61.0",
|
|
300
300
|
"oxlint-tsgolint": "^0.20.0",
|
|
301
|
-
"pg": "^8.
|
|
301
|
+
"pg": "^8.20.0",
|
|
302
302
|
"pino": "^10.3.1",
|
|
303
303
|
"postgres": "^3.4.9",
|
|
304
|
-
"typescript": "^6.0.
|
|
304
|
+
"typescript": "^6.0.3",
|
|
305
305
|
"vite": "^7.3.2",
|
|
306
306
|
"vite-tsconfig-paths": "^6.1.1",
|
|
307
307
|
"voyage-ai-provider": "^3.0.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.
|
|
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",
|