@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.
- package/README.md +97 -84
- package/dist/config.js +21 -4
- package/dist/endpoints/chat-completions/handler.js +9 -5
- package/dist/endpoints/conversations/handler.js +3 -3
- package/dist/endpoints/embeddings/handler.js +2 -2
- package/dist/endpoints/messages/converters.js +17 -21
- package/dist/endpoints/messages/handler.js +5 -5
- package/dist/endpoints/responses/handler.js +9 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/models/alibaba/index.d.ts +2 -0
- package/dist/models/alibaba/index.js +2 -0
- package/dist/models/alibaba/middleware.d.ts +2 -0
- package/dist/models/alibaba/middleware.js +31 -0
- package/dist/models/alibaba/presets.d.ts +900 -0
- package/dist/models/alibaba/presets.js +252 -0
- package/dist/models/amazon/presets.d.ts +31 -31
- package/dist/models/anthropic/presets.d.ts +68 -68
- package/dist/models/cohere/presets.d.ts +38 -38
- package/dist/models/deepseek/index.d.ts +2 -0
- package/dist/models/deepseek/index.js +2 -0
- package/dist/models/deepseek/middleware.d.ts +2 -0
- package/dist/models/deepseek/middleware.js +25 -0
- package/dist/models/deepseek/presets.d.ts +51 -0
- package/dist/models/deepseek/presets.js +33 -0
- package/dist/models/google/presets.d.ts +94 -94
- package/dist/models/google/presets.js +3 -1
- package/dist/models/meta/presets.d.ts +84 -84
- package/dist/models/meta/presets.js +11 -12
- package/dist/models/minimax/index.d.ts +2 -0
- package/dist/models/minimax/index.js +2 -0
- package/dist/models/minimax/middleware.d.ts +2 -0
- package/dist/models/minimax/middleware.js +43 -0
- package/dist/models/minimax/presets.d.ts +99 -0
- package/dist/models/minimax/presets.js +47 -0
- package/dist/models/moonshot/index.d.ts +2 -0
- package/dist/models/moonshot/index.js +2 -0
- package/dist/models/moonshot/middleware.d.ts +2 -0
- package/dist/models/moonshot/middleware.js +32 -0
- package/dist/models/moonshot/presets.d.ts +104 -0
- package/dist/models/moonshot/presets.js +36 -0
- package/dist/models/openai/presets.d.ts +128 -128
- package/dist/models/openai/presets.js +1 -1
- package/dist/models/types.d.ts +1 -1
- package/dist/models/types.js +39 -0
- package/dist/models/voyage/presets.d.ts +46 -46
- package/dist/models/xai/index.d.ts +2 -0
- package/dist/models/xai/index.js +2 -0
- package/dist/models/xai/middleware.d.ts +2 -0
- package/dist/models/xai/middleware.js +37 -0
- package/dist/models/xai/presets.d.ts +210 -0
- package/dist/models/xai/presets.js +55 -0
- package/dist/models/zai/index.d.ts +2 -0
- package/dist/models/zai/index.js +2 -0
- package/dist/models/zai/middleware.d.ts +2 -0
- package/dist/models/zai/middleware.js +25 -0
- package/dist/models/zai/presets.d.ts +141 -0
- package/dist/models/zai/presets.js +41 -0
- package/dist/providers/alibaba/canonical.d.ts +3 -0
- package/dist/providers/alibaba/canonical.js +13 -0
- package/dist/providers/alibaba/index.d.ts +1 -0
- package/dist/providers/alibaba/index.js +1 -0
- package/dist/providers/bedrock/canonical.js +3 -0
- package/dist/providers/chutes/canonical.d.ts +3 -0
- package/dist/providers/chutes/canonical.js +14 -0
- package/dist/providers/chutes/index.d.ts +1 -0
- package/dist/providers/chutes/index.js +1 -0
- package/dist/providers/deepinfra/canonical.d.ts +3 -0
- package/dist/providers/deepinfra/canonical.js +40 -0
- package/dist/providers/deepinfra/index.d.ts +1 -0
- package/dist/providers/deepinfra/index.js +1 -0
- package/dist/providers/deepseek/canonical.d.ts +3 -0
- package/dist/providers/deepseek/canonical.js +9 -0
- package/dist/providers/deepseek/index.d.ts +1 -0
- package/dist/providers/deepseek/index.js +1 -0
- package/dist/providers/fireworks/canonical.d.ts +3 -0
- package/dist/providers/fireworks/canonical.js +27 -0
- package/dist/providers/fireworks/index.d.ts +2 -0
- package/dist/providers/fireworks/index.js +2 -0
- package/dist/providers/fireworks/middleware.d.ts +2 -0
- package/dist/providers/fireworks/middleware.js +35 -0
- package/dist/providers/groq/canonical.js +1 -1
- package/dist/providers/minimax/canonical.d.ts +3 -0
- package/dist/providers/minimax/canonical.js +9 -0
- package/dist/providers/minimax/index.d.ts +1 -0
- package/dist/providers/minimax/index.js +1 -0
- package/dist/providers/moonshot/canonical.d.ts +3 -0
- package/dist/providers/moonshot/canonical.js +6 -0
- package/dist/providers/moonshot/index.d.ts +1 -0
- package/dist/providers/moonshot/index.js +1 -0
- package/dist/providers/togetherai/canonical.d.ts +3 -0
- package/dist/providers/togetherai/canonical.js +24 -0
- package/dist/providers/togetherai/index.d.ts +1 -0
- package/dist/providers/togetherai/index.js +1 -0
- package/dist/providers/types.d.ts +1 -1
- package/dist/providers/types.js +10 -0
- package/dist/providers/vertex/canonical.js +5 -1
- package/dist/providers/xai/canonical.d.ts +3 -0
- package/dist/providers/xai/canonical.js +12 -0
- package/dist/providers/xai/index.d.ts +1 -0
- package/dist/providers/xai/index.js +1 -0
- package/dist/providers/zai/canonical.d.ts +3 -0
- package/dist/providers/zai/canonical.js +10 -0
- package/dist/providers/zai/index.d.ts +1 -0
- package/dist/providers/zai/index.js +1 -0
- package/dist/types.d.ts +30 -16
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/request.d.ts +2 -1
- package/dist/utils/request.js +35 -7
- package/package.json +133 -9
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-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", "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"];
|
|
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"];
|
|
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
|
@@ -87,6 +87,20 @@ export const CANONICAL_MODEL_IDS = [
|
|
|
87
87
|
"cohere/command-a-vision",
|
|
88
88
|
"cohere/command-r",
|
|
89
89
|
"cohere/command-r-plus",
|
|
90
|
+
// MiniMax
|
|
91
|
+
"minimax/m2.5",
|
|
92
|
+
"minimax/m2.7",
|
|
93
|
+
// Moonshot
|
|
94
|
+
"moonshot/kimi-k2.5",
|
|
95
|
+
"moonshot/kimi-k2.6",
|
|
96
|
+
// xAI
|
|
97
|
+
"xai/grok-4.1-fast",
|
|
98
|
+
"xai/grok-4.1-fast-reasoning",
|
|
99
|
+
"xai/grok-4.2",
|
|
100
|
+
"xai/grok-4.2-reasoning",
|
|
101
|
+
"xai/grok-4.2-multi-agent",
|
|
102
|
+
// DeepSeek
|
|
103
|
+
"deepseek/deepseek-v3.2",
|
|
90
104
|
// Voyage
|
|
91
105
|
"voyage/voyage-2-code",
|
|
92
106
|
"voyage/voyage-2-law",
|
|
@@ -98,4 +112,29 @@ export const CANONICAL_MODEL_IDS = [
|
|
|
98
112
|
"voyage/voyage-4-lite",
|
|
99
113
|
"voyage/voyage-4",
|
|
100
114
|
"voyage/voyage-4-large",
|
|
115
|
+
// Alibaba (Qwen)
|
|
116
|
+
"alibaba/qwen3-235b",
|
|
117
|
+
"alibaba/qwen3-32b",
|
|
118
|
+
"alibaba/qwen3.5-plus",
|
|
119
|
+
"alibaba/qwen3.5-flash",
|
|
120
|
+
"alibaba/qwen3.5-397b",
|
|
121
|
+
"alibaba/qwen3.5-122b",
|
|
122
|
+
"alibaba/qwen3.5-35b",
|
|
123
|
+
"alibaba/qwen3.5-27b",
|
|
124
|
+
"alibaba/qwen3.5-9b",
|
|
125
|
+
"alibaba/qwen3.5-4b",
|
|
126
|
+
"alibaba/qwen3.5-2b",
|
|
127
|
+
"alibaba/qwen3.5-0.8b",
|
|
128
|
+
"alibaba/qwen3.6-plus",
|
|
129
|
+
"alibaba/qwen3.6-flash",
|
|
130
|
+
"alibaba/qwen3.6-max-preview",
|
|
131
|
+
"alibaba/qwen3-coder-next",
|
|
132
|
+
"alibaba/qwen3-vl-235b",
|
|
133
|
+
"alibaba/qwen3-embedding-0.6b",
|
|
134
|
+
"alibaba/qwen3-embedding-4b",
|
|
135
|
+
"alibaba/qwen3-embedding-8b",
|
|
136
|
+
// Z.ai (GLM)
|
|
137
|
+
"zhipu/glm-5",
|
|
138
|
+
"zhipu/glm-5-turbo",
|
|
139
|
+
"zhipu/glm-5.1",
|
|
101
140
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CatalogModel } from "../types";
|
|
2
|
-
export declare const voyage2Code: import("../../utils
|
|
2
|
+
export declare const voyage2Code: import("../../utils").Preset<"voyage/voyage-2-code", CatalogModel, {
|
|
3
3
|
name: string;
|
|
4
4
|
created: string;
|
|
5
5
|
context: number;
|
|
@@ -9,7 +9,7 @@ export declare const voyage2Code: import("../../utils/preset").Preset<"voyage/vo
|
|
|
9
9
|
};
|
|
10
10
|
providers: readonly ["voyage"];
|
|
11
11
|
}>;
|
|
12
|
-
export declare const voyage2Finance: import("../../utils
|
|
12
|
+
export declare const voyage2Finance: import("../../utils").Preset<"voyage/voyage-2-finance", CatalogModel, {
|
|
13
13
|
name: string;
|
|
14
14
|
created: string;
|
|
15
15
|
context: number;
|
|
@@ -19,7 +19,7 @@ export declare const voyage2Finance: import("../../utils/preset").Preset<"voyage
|
|
|
19
19
|
};
|
|
20
20
|
providers: readonly ["voyage"];
|
|
21
21
|
}>;
|
|
22
|
-
export declare const voyage2Law: import("../../utils
|
|
22
|
+
export declare const voyage2Law: import("../../utils").Preset<"voyage/voyage-2-law", CatalogModel, {
|
|
23
23
|
name: string;
|
|
24
24
|
created: string;
|
|
25
25
|
context: number;
|
|
@@ -29,7 +29,7 @@ export declare const voyage2Law: import("../../utils/preset").Preset<"voyage/voy
|
|
|
29
29
|
};
|
|
30
30
|
providers: readonly ["voyage"];
|
|
31
31
|
}>;
|
|
32
|
-
export declare const voyage3Code: import("../../utils
|
|
32
|
+
export declare const voyage3Code: import("../../utils").Preset<"voyage/voyage-3-code", CatalogModel, {
|
|
33
33
|
name: string;
|
|
34
34
|
created: string;
|
|
35
35
|
context: number;
|
|
@@ -39,7 +39,7 @@ export declare const voyage3Code: import("../../utils/preset").Preset<"voyage/vo
|
|
|
39
39
|
};
|
|
40
40
|
providers: readonly ["voyage"];
|
|
41
41
|
}>;
|
|
42
|
-
export declare const voyage3Large: import("../../utils
|
|
42
|
+
export declare const voyage3Large: import("../../utils").Preset<"voyage/voyage-3-large", CatalogModel, {
|
|
43
43
|
name: string;
|
|
44
44
|
created: string;
|
|
45
45
|
context: number;
|
|
@@ -49,7 +49,7 @@ export declare const voyage3Large: import("../../utils/preset").Preset<"voyage/v
|
|
|
49
49
|
};
|
|
50
50
|
providers: readonly ["voyage"];
|
|
51
51
|
}>;
|
|
52
|
-
export declare const voyage35: import("../../utils
|
|
52
|
+
export declare const voyage35: import("../../utils").Preset<"voyage/voyage-3.5", CatalogModel, {
|
|
53
53
|
name: string;
|
|
54
54
|
created: string;
|
|
55
55
|
context: number;
|
|
@@ -59,7 +59,7 @@ export declare const voyage35: import("../../utils/preset").Preset<"voyage/voyag
|
|
|
59
59
|
};
|
|
60
60
|
providers: readonly ["voyage"];
|
|
61
61
|
}>;
|
|
62
|
-
export declare const voyage35Lite: import("../../utils
|
|
62
|
+
export declare const voyage35Lite: import("../../utils").Preset<"voyage/voyage-3.5-lite", CatalogModel, {
|
|
63
63
|
name: string;
|
|
64
64
|
created: string;
|
|
65
65
|
context: number;
|
|
@@ -69,7 +69,7 @@ export declare const voyage35Lite: import("../../utils/preset").Preset<"voyage/v
|
|
|
69
69
|
};
|
|
70
70
|
providers: readonly ["voyage"];
|
|
71
71
|
}>;
|
|
72
|
-
export declare const voyage4Lite: import("../../utils
|
|
72
|
+
export declare const voyage4Lite: import("../../utils").Preset<"voyage/voyage-4-lite", CatalogModel, {
|
|
73
73
|
name: string;
|
|
74
74
|
created: string;
|
|
75
75
|
context: number;
|
|
@@ -79,7 +79,7 @@ export declare const voyage4Lite: import("../../utils/preset").Preset<"voyage/vo
|
|
|
79
79
|
};
|
|
80
80
|
providers: readonly ["voyage"];
|
|
81
81
|
}>;
|
|
82
|
-
export declare const voyage4: import("../../utils
|
|
82
|
+
export declare const voyage4: import("../../utils").Preset<"voyage/voyage-4", CatalogModel, {
|
|
83
83
|
name: string;
|
|
84
84
|
created: string;
|
|
85
85
|
context: number;
|
|
@@ -89,7 +89,7 @@ export declare const voyage4: import("../../utils/preset").Preset<"voyage/voyage
|
|
|
89
89
|
};
|
|
90
90
|
providers: readonly ["voyage"];
|
|
91
91
|
}>;
|
|
92
|
-
export declare const voyage4Large: import("../../utils
|
|
92
|
+
export declare const voyage4Large: import("../../utils").Preset<"voyage/voyage-4-large", CatalogModel, {
|
|
93
93
|
name: string;
|
|
94
94
|
created: string;
|
|
95
95
|
context: number;
|
|
@@ -100,7 +100,7 @@ export declare const voyage4Large: import("../../utils/preset").Preset<"voyage/v
|
|
|
100
100
|
providers: readonly ["voyage"];
|
|
101
101
|
}>;
|
|
102
102
|
export declare const voyage: {
|
|
103
|
-
readonly latest: readonly [import("../../utils
|
|
103
|
+
readonly latest: readonly [import("../../utils").Preset<"voyage/voyage-2-finance", CatalogModel, {
|
|
104
104
|
name: string;
|
|
105
105
|
created: string;
|
|
106
106
|
context: number;
|
|
@@ -109,7 +109,7 @@ export declare const voyage: {
|
|
|
109
109
|
output: readonly ["embedding"];
|
|
110
110
|
};
|
|
111
111
|
providers: readonly ["voyage"];
|
|
112
|
-
}>, import("../../utils
|
|
112
|
+
}>, import("../../utils").Preset<"voyage/voyage-2-law", CatalogModel, {
|
|
113
113
|
name: string;
|
|
114
114
|
created: string;
|
|
115
115
|
context: number;
|
|
@@ -118,7 +118,7 @@ export declare const voyage: {
|
|
|
118
118
|
output: readonly ["embedding"];
|
|
119
119
|
};
|
|
120
120
|
providers: readonly ["voyage"];
|
|
121
|
-
}>, import("../../utils
|
|
121
|
+
}>, import("../../utils").Preset<"voyage/voyage-3-code", CatalogModel, {
|
|
122
122
|
name: string;
|
|
123
123
|
created: string;
|
|
124
124
|
context: number;
|
|
@@ -127,7 +127,7 @@ export declare const voyage: {
|
|
|
127
127
|
output: readonly ["embedding"];
|
|
128
128
|
};
|
|
129
129
|
providers: readonly ["voyage"];
|
|
130
|
-
}>, import("../../utils
|
|
130
|
+
}>, import("../../utils").Preset<"voyage/voyage-4-lite", CatalogModel, {
|
|
131
131
|
name: string;
|
|
132
132
|
created: string;
|
|
133
133
|
context: number;
|
|
@@ -136,7 +136,7 @@ export declare const voyage: {
|
|
|
136
136
|
output: readonly ["embedding"];
|
|
137
137
|
};
|
|
138
138
|
providers: readonly ["voyage"];
|
|
139
|
-
}>, import("../../utils
|
|
139
|
+
}>, import("../../utils").Preset<"voyage/voyage-4", CatalogModel, {
|
|
140
140
|
name: string;
|
|
141
141
|
created: string;
|
|
142
142
|
context: number;
|
|
@@ -145,7 +145,7 @@ export declare const voyage: {
|
|
|
145
145
|
output: readonly ["embedding"];
|
|
146
146
|
};
|
|
147
147
|
providers: readonly ["voyage"];
|
|
148
|
-
}>, import("../../utils
|
|
148
|
+
}>, import("../../utils").Preset<"voyage/voyage-4-large", CatalogModel, {
|
|
149
149
|
name: string;
|
|
150
150
|
created: string;
|
|
151
151
|
context: number;
|
|
@@ -155,7 +155,7 @@ export declare const voyage: {
|
|
|
155
155
|
};
|
|
156
156
|
providers: readonly ["voyage"];
|
|
157
157
|
}>];
|
|
158
|
-
readonly all: (import("../../utils
|
|
158
|
+
readonly all: (import("../../utils").Preset<"voyage/voyage-2-code", CatalogModel, {
|
|
159
159
|
name: string;
|
|
160
160
|
created: string;
|
|
161
161
|
context: number;
|
|
@@ -164,7 +164,7 @@ export declare const voyage: {
|
|
|
164
164
|
output: readonly ["embedding"];
|
|
165
165
|
};
|
|
166
166
|
providers: readonly ["voyage"];
|
|
167
|
-
}> | import("../../utils
|
|
167
|
+
}> | import("../../utils").Preset<"voyage/voyage-2-finance", CatalogModel, {
|
|
168
168
|
name: string;
|
|
169
169
|
created: string;
|
|
170
170
|
context: number;
|
|
@@ -173,7 +173,7 @@ export declare const voyage: {
|
|
|
173
173
|
output: readonly ["embedding"];
|
|
174
174
|
};
|
|
175
175
|
providers: readonly ["voyage"];
|
|
176
|
-
}> | import("../../utils
|
|
176
|
+
}> | import("../../utils").Preset<"voyage/voyage-2-law", CatalogModel, {
|
|
177
177
|
name: string;
|
|
178
178
|
created: string;
|
|
179
179
|
context: number;
|
|
@@ -182,7 +182,7 @@ export declare const voyage: {
|
|
|
182
182
|
output: readonly ["embedding"];
|
|
183
183
|
};
|
|
184
184
|
providers: readonly ["voyage"];
|
|
185
|
-
}> | import("../../utils
|
|
185
|
+
}> | import("../../utils").Preset<"voyage/voyage-3-code", CatalogModel, {
|
|
186
186
|
name: string;
|
|
187
187
|
created: string;
|
|
188
188
|
context: number;
|
|
@@ -191,7 +191,7 @@ export declare const voyage: {
|
|
|
191
191
|
output: readonly ["embedding"];
|
|
192
192
|
};
|
|
193
193
|
providers: readonly ["voyage"];
|
|
194
|
-
}> | import("../../utils
|
|
194
|
+
}> | import("../../utils").Preset<"voyage/voyage-3-large", CatalogModel, {
|
|
195
195
|
name: string;
|
|
196
196
|
created: string;
|
|
197
197
|
context: number;
|
|
@@ -200,7 +200,7 @@ export declare const voyage: {
|
|
|
200
200
|
output: readonly ["embedding"];
|
|
201
201
|
};
|
|
202
202
|
providers: readonly ["voyage"];
|
|
203
|
-
}> | import("../../utils
|
|
203
|
+
}> | import("../../utils").Preset<"voyage/voyage-3.5", CatalogModel, {
|
|
204
204
|
name: string;
|
|
205
205
|
created: string;
|
|
206
206
|
context: number;
|
|
@@ -209,7 +209,7 @@ export declare const voyage: {
|
|
|
209
209
|
output: readonly ["embedding"];
|
|
210
210
|
};
|
|
211
211
|
providers: readonly ["voyage"];
|
|
212
|
-
}> | import("../../utils
|
|
212
|
+
}> | import("../../utils").Preset<"voyage/voyage-3.5-lite", CatalogModel, {
|
|
213
213
|
name: string;
|
|
214
214
|
created: string;
|
|
215
215
|
context: number;
|
|
@@ -218,7 +218,7 @@ export declare const voyage: {
|
|
|
218
218
|
output: readonly ["embedding"];
|
|
219
219
|
};
|
|
220
220
|
providers: readonly ["voyage"];
|
|
221
|
-
}> | import("../../utils
|
|
221
|
+
}> | import("../../utils").Preset<"voyage/voyage-4-lite", CatalogModel, {
|
|
222
222
|
name: string;
|
|
223
223
|
created: string;
|
|
224
224
|
context: number;
|
|
@@ -227,7 +227,7 @@ export declare const voyage: {
|
|
|
227
227
|
output: readonly ["embedding"];
|
|
228
228
|
};
|
|
229
229
|
providers: readonly ["voyage"];
|
|
230
|
-
}> | import("../../utils
|
|
230
|
+
}> | import("../../utils").Preset<"voyage/voyage-4", CatalogModel, {
|
|
231
231
|
name: string;
|
|
232
232
|
created: string;
|
|
233
233
|
context: number;
|
|
@@ -236,7 +236,7 @@ export declare const voyage: {
|
|
|
236
236
|
output: readonly ["embedding"];
|
|
237
237
|
};
|
|
238
238
|
providers: readonly ["voyage"];
|
|
239
|
-
}> | import("../../utils
|
|
239
|
+
}> | import("../../utils").Preset<"voyage/voyage-4-large", CatalogModel, {
|
|
240
240
|
name: string;
|
|
241
241
|
created: string;
|
|
242
242
|
context: number;
|
|
@@ -246,7 +246,7 @@ export declare const voyage: {
|
|
|
246
246
|
};
|
|
247
247
|
providers: readonly ["voyage"];
|
|
248
248
|
}>)[];
|
|
249
|
-
readonly "v2.x": readonly [import("../../utils
|
|
249
|
+
readonly "v2.x": readonly [import("../../utils").Preset<"voyage/voyage-2-code", CatalogModel, {
|
|
250
250
|
name: string;
|
|
251
251
|
created: string;
|
|
252
252
|
context: number;
|
|
@@ -255,7 +255,7 @@ export declare const voyage: {
|
|
|
255
255
|
output: readonly ["embedding"];
|
|
256
256
|
};
|
|
257
257
|
providers: readonly ["voyage"];
|
|
258
|
-
}>, import("../../utils
|
|
258
|
+
}>, import("../../utils").Preset<"voyage/voyage-2-finance", CatalogModel, {
|
|
259
259
|
name: string;
|
|
260
260
|
created: string;
|
|
261
261
|
context: number;
|
|
@@ -264,7 +264,7 @@ export declare const voyage: {
|
|
|
264
264
|
output: readonly ["embedding"];
|
|
265
265
|
};
|
|
266
266
|
providers: readonly ["voyage"];
|
|
267
|
-
}>, import("../../utils
|
|
267
|
+
}>, import("../../utils").Preset<"voyage/voyage-2-law", CatalogModel, {
|
|
268
268
|
name: string;
|
|
269
269
|
created: string;
|
|
270
270
|
context: number;
|
|
@@ -274,7 +274,7 @@ export declare const voyage: {
|
|
|
274
274
|
};
|
|
275
275
|
providers: readonly ["voyage"];
|
|
276
276
|
}>];
|
|
277
|
-
readonly "v3.x": readonly [import("../../utils
|
|
277
|
+
readonly "v3.x": readonly [import("../../utils").Preset<"voyage/voyage-3-code", CatalogModel, {
|
|
278
278
|
name: string;
|
|
279
279
|
created: string;
|
|
280
280
|
context: number;
|
|
@@ -283,7 +283,7 @@ export declare const voyage: {
|
|
|
283
283
|
output: readonly ["embedding"];
|
|
284
284
|
};
|
|
285
285
|
providers: readonly ["voyage"];
|
|
286
|
-
}>, import("../../utils
|
|
286
|
+
}>, import("../../utils").Preset<"voyage/voyage-3-large", CatalogModel, {
|
|
287
287
|
name: string;
|
|
288
288
|
created: string;
|
|
289
289
|
context: number;
|
|
@@ -292,7 +292,7 @@ export declare const voyage: {
|
|
|
292
292
|
output: readonly ["embedding"];
|
|
293
293
|
};
|
|
294
294
|
providers: readonly ["voyage"];
|
|
295
|
-
}>, import("../../utils
|
|
295
|
+
}>, import("../../utils").Preset<"voyage/voyage-3.5", CatalogModel, {
|
|
296
296
|
name: string;
|
|
297
297
|
created: string;
|
|
298
298
|
context: number;
|
|
@@ -301,7 +301,7 @@ export declare const voyage: {
|
|
|
301
301
|
output: readonly ["embedding"];
|
|
302
302
|
};
|
|
303
303
|
providers: readonly ["voyage"];
|
|
304
|
-
}>, import("../../utils
|
|
304
|
+
}>, import("../../utils").Preset<"voyage/voyage-3.5-lite", CatalogModel, {
|
|
305
305
|
name: string;
|
|
306
306
|
created: string;
|
|
307
307
|
context: number;
|
|
@@ -311,7 +311,7 @@ export declare const voyage: {
|
|
|
311
311
|
};
|
|
312
312
|
providers: readonly ["voyage"];
|
|
313
313
|
}>];
|
|
314
|
-
readonly "v4.x": readonly [import("../../utils
|
|
314
|
+
readonly "v4.x": readonly [import("../../utils").Preset<"voyage/voyage-4-lite", CatalogModel, {
|
|
315
315
|
name: string;
|
|
316
316
|
created: string;
|
|
317
317
|
context: number;
|
|
@@ -320,7 +320,7 @@ export declare const voyage: {
|
|
|
320
320
|
output: readonly ["embedding"];
|
|
321
321
|
};
|
|
322
322
|
providers: readonly ["voyage"];
|
|
323
|
-
}>, import("../../utils
|
|
323
|
+
}>, import("../../utils").Preset<"voyage/voyage-4", CatalogModel, {
|
|
324
324
|
name: string;
|
|
325
325
|
created: string;
|
|
326
326
|
context: number;
|
|
@@ -329,7 +329,7 @@ export declare const voyage: {
|
|
|
329
329
|
output: readonly ["embedding"];
|
|
330
330
|
};
|
|
331
331
|
providers: readonly ["voyage"];
|
|
332
|
-
}>, import("../../utils
|
|
332
|
+
}>, import("../../utils").Preset<"voyage/voyage-4-large", CatalogModel, {
|
|
333
333
|
name: string;
|
|
334
334
|
created: string;
|
|
335
335
|
context: number;
|
|
@@ -339,7 +339,7 @@ export declare const voyage: {
|
|
|
339
339
|
};
|
|
340
340
|
providers: readonly ["voyage"];
|
|
341
341
|
}>];
|
|
342
|
-
readonly v2: readonly [import("../../utils
|
|
342
|
+
readonly v2: readonly [import("../../utils").Preset<"voyage/voyage-2-code", CatalogModel, {
|
|
343
343
|
name: string;
|
|
344
344
|
created: string;
|
|
345
345
|
context: number;
|
|
@@ -348,7 +348,7 @@ export declare const voyage: {
|
|
|
348
348
|
output: readonly ["embedding"];
|
|
349
349
|
};
|
|
350
350
|
providers: readonly ["voyage"];
|
|
351
|
-
}>, import("../../utils
|
|
351
|
+
}>, import("../../utils").Preset<"voyage/voyage-2-finance", CatalogModel, {
|
|
352
352
|
name: string;
|
|
353
353
|
created: string;
|
|
354
354
|
context: number;
|
|
@@ -357,7 +357,7 @@ export declare const voyage: {
|
|
|
357
357
|
output: readonly ["embedding"];
|
|
358
358
|
};
|
|
359
359
|
providers: readonly ["voyage"];
|
|
360
|
-
}>, import("../../utils
|
|
360
|
+
}>, import("../../utils").Preset<"voyage/voyage-2-law", CatalogModel, {
|
|
361
361
|
name: string;
|
|
362
362
|
created: string;
|
|
363
363
|
context: number;
|
|
@@ -367,7 +367,7 @@ export declare const voyage: {
|
|
|
367
367
|
};
|
|
368
368
|
providers: readonly ["voyage"];
|
|
369
369
|
}>];
|
|
370
|
-
readonly v3: readonly [import("../../utils
|
|
370
|
+
readonly v3: readonly [import("../../utils").Preset<"voyage/voyage-3-code", CatalogModel, {
|
|
371
371
|
name: string;
|
|
372
372
|
created: string;
|
|
373
373
|
context: number;
|
|
@@ -376,7 +376,7 @@ export declare const voyage: {
|
|
|
376
376
|
output: readonly ["embedding"];
|
|
377
377
|
};
|
|
378
378
|
providers: readonly ["voyage"];
|
|
379
|
-
}>, import("../../utils
|
|
379
|
+
}>, import("../../utils").Preset<"voyage/voyage-3-large", CatalogModel, {
|
|
380
380
|
name: string;
|
|
381
381
|
created: string;
|
|
382
382
|
context: number;
|
|
@@ -386,7 +386,7 @@ export declare const voyage: {
|
|
|
386
386
|
};
|
|
387
387
|
providers: readonly ["voyage"];
|
|
388
388
|
}>];
|
|
389
|
-
readonly "v3.5": readonly [import("../../utils
|
|
389
|
+
readonly "v3.5": readonly [import("../../utils").Preset<"voyage/voyage-3.5", CatalogModel, {
|
|
390
390
|
name: string;
|
|
391
391
|
created: string;
|
|
392
392
|
context: number;
|
|
@@ -395,7 +395,7 @@ export declare const voyage: {
|
|
|
395
395
|
output: readonly ["embedding"];
|
|
396
396
|
};
|
|
397
397
|
providers: readonly ["voyage"];
|
|
398
|
-
}>, import("../../utils
|
|
398
|
+
}>, import("../../utils").Preset<"voyage/voyage-3.5-lite", CatalogModel, {
|
|
399
399
|
name: string;
|
|
400
400
|
created: string;
|
|
401
401
|
context: number;
|
|
@@ -405,7 +405,7 @@ export declare const voyage: {
|
|
|
405
405
|
};
|
|
406
406
|
providers: readonly ["voyage"];
|
|
407
407
|
}>];
|
|
408
|
-
readonly v4: readonly [import("../../utils
|
|
408
|
+
readonly v4: readonly [import("../../utils").Preset<"voyage/voyage-4-lite", CatalogModel, {
|
|
409
409
|
name: string;
|
|
410
410
|
created: string;
|
|
411
411
|
context: number;
|
|
@@ -414,7 +414,7 @@ export declare const voyage: {
|
|
|
414
414
|
output: readonly ["embedding"];
|
|
415
415
|
};
|
|
416
416
|
providers: readonly ["voyage"];
|
|
417
|
-
}>, import("../../utils
|
|
417
|
+
}>, import("../../utils").Preset<"voyage/voyage-4", CatalogModel, {
|
|
418
418
|
name: string;
|
|
419
419
|
created: string;
|
|
420
420
|
context: number;
|
|
@@ -423,7 +423,7 @@ export declare const voyage: {
|
|
|
423
423
|
output: readonly ["embedding"];
|
|
424
424
|
};
|
|
425
425
|
providers: readonly ["voyage"];
|
|
426
|
-
}>, import("../../utils
|
|
426
|
+
}>, import("../../utils").Preset<"voyage/voyage-4-large", CatalogModel, {
|
|
427
427
|
name: string;
|
|
428
428
|
created: string;
|
|
429
429
|
context: number;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { modelMiddlewareMatcher } from "../../middleware/matcher";
|
|
2
|
+
export const xaiReasoningMiddleware = {
|
|
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["xai"] ??= {});
|
|
13
|
+
if (reasoning.enabled === false) {
|
|
14
|
+
target.reasoningEffort = undefined;
|
|
15
|
+
}
|
|
16
|
+
else if (reasoning.effort) {
|
|
17
|
+
switch (reasoning.effort) {
|
|
18
|
+
case "none":
|
|
19
|
+
target.reasoningEffort = undefined;
|
|
20
|
+
break;
|
|
21
|
+
case "minimal":
|
|
22
|
+
case "low":
|
|
23
|
+
target.reasoningEffort = "low";
|
|
24
|
+
break;
|
|
25
|
+
case "medium":
|
|
26
|
+
case "high":
|
|
27
|
+
case "xhigh":
|
|
28
|
+
case "max":
|
|
29
|
+
target.reasoningEffort = "high";
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
delete unknown["reasoning"];
|
|
34
|
+
return params;
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
modelMiddlewareMatcher.useForModel(["xai/grok-4.1-fast-reasoning", "xai/grok-4.2-reasoning", "xai/grok-4.2-multi-agent"], { language: [xaiReasoningMiddleware] });
|