@hebo-ai/gateway 0.11.4 → 0.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/dist/endpoints/chat-completions/converters.js +14 -8
- package/dist/endpoints/chat-completions/schema.d.ts +301 -281
- package/dist/endpoints/chat-completions/schema.js +40 -25
- package/dist/endpoints/conversations/handler.js +9 -2
- package/dist/endpoints/conversations/schema.d.ts +453 -453
- package/dist/endpoints/messages/converters.d.ts +2 -2
- package/dist/endpoints/messages/converters.js +12 -6
- package/dist/endpoints/messages/schema.d.ts +88 -70
- package/dist/endpoints/messages/schema.js +26 -13
- package/dist/endpoints/responses/converters.js +25 -19
- package/dist/endpoints/responses/otel.js +3 -1
- package/dist/endpoints/responses/schema.d.ts +543 -525
- package/dist/endpoints/responses/schema.js +49 -34
- package/dist/endpoints/shared/converters.d.ts +1 -1
- package/dist/endpoints/shared/converters.js +1 -1
- package/dist/endpoints/shared/schema.d.ts +2 -2
- package/dist/endpoints/shared/schema.js +1 -1
- package/dist/lifecycle.js +2 -0
- package/dist/models/alibaba/presets.d.ts +96 -27
- package/dist/models/alibaba/presets.js +27 -2
- package/dist/models/anthropic/middleware.js +11 -4
- package/dist/models/anthropic/presets.d.ts +96 -15
- package/dist/models/anthropic/presets.js +23 -2
- package/dist/models/deepseek/presets.d.ts +106 -3
- package/dist/models/deepseek/presets.js +19 -2
- package/dist/models/google/presets.d.ts +47 -23
- package/dist/models/google/presets.js +9 -2
- package/dist/models/minimax/presets.d.ts +49 -6
- package/dist/models/minimax/presets.js +24 -1
- package/dist/models/moonshot/presets.d.ts +49 -2
- package/dist/models/moonshot/presets.js +14 -2
- package/dist/models/types.d.ts +1 -1
- package/dist/models/types.js +12 -0
- package/dist/models/xai/presets.d.ts +81 -1
- package/dist/models/xai/presets.js +14 -1
- package/dist/models/zai/presets.d.ts +44 -2
- package/dist/models/zai/presets.js +10 -2
- package/dist/providers/bedrock/canonical.js +2 -0
- package/dist/providers/bedrock/middleware.js +7 -11
- package/dist/providers/xai/canonical.js +2 -0
- package/dist/providers/zai/canonical.js +1 -0
- package/package.json +57 -65
|
@@ -22,11 +22,24 @@ export declare const kimiK26: import("../../utils").Preset<"moonshot/kimi-k2.6",
|
|
|
22
22
|
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
23
23
|
context: number;
|
|
24
24
|
}>;
|
|
25
|
+
export declare const kimiK27Code: import("../../utils").Preset<"moonshot/kimi-k2.7-code", CatalogModel, {
|
|
26
|
+
name: string;
|
|
27
|
+
created: string;
|
|
28
|
+
knowledge: string;
|
|
29
|
+
providers: readonly ["moonshot", "deepinfra", "togetherai"];
|
|
30
|
+
modalities: {
|
|
31
|
+
input: readonly ["text", "image"];
|
|
32
|
+
output: readonly ["text"];
|
|
33
|
+
};
|
|
34
|
+
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
35
|
+
context: number;
|
|
36
|
+
}>;
|
|
25
37
|
export declare const kimi: {
|
|
26
|
-
readonly latest: readonly [import("../../utils").Preset<"moonshot/kimi-k2.
|
|
38
|
+
readonly latest: readonly [import("../../utils").Preset<"moonshot/kimi-k2.7-code", CatalogModel, {
|
|
27
39
|
name: string;
|
|
28
40
|
created: string;
|
|
29
|
-
|
|
41
|
+
knowledge: string;
|
|
42
|
+
providers: readonly ["moonshot", "deepinfra", "togetherai"];
|
|
30
43
|
modalities: {
|
|
31
44
|
input: readonly ["text", "image"];
|
|
32
45
|
output: readonly ["text"];
|
|
@@ -55,6 +68,17 @@ export declare const kimi: {
|
|
|
55
68
|
};
|
|
56
69
|
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
57
70
|
context: number;
|
|
71
|
+
}> | import("../../utils").Preset<"moonshot/kimi-k2.7-code", CatalogModel, {
|
|
72
|
+
name: string;
|
|
73
|
+
created: string;
|
|
74
|
+
knowledge: string;
|
|
75
|
+
providers: readonly ["moonshot", "deepinfra", "togetherai"];
|
|
76
|
+
modalities: {
|
|
77
|
+
input: readonly ["text", "image"];
|
|
78
|
+
output: readonly ["text"];
|
|
79
|
+
};
|
|
80
|
+
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
81
|
+
context: number;
|
|
58
82
|
}>)[];
|
|
59
83
|
readonly "k2.x": readonly [import("../../utils").Preset<"moonshot/kimi-k2.5", CatalogModel, {
|
|
60
84
|
name: string;
|
|
@@ -77,6 +101,17 @@ export declare const kimi: {
|
|
|
77
101
|
};
|
|
78
102
|
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
79
103
|
context: number;
|
|
104
|
+
}>, import("../../utils").Preset<"moonshot/kimi-k2.7-code", CatalogModel, {
|
|
105
|
+
name: string;
|
|
106
|
+
created: string;
|
|
107
|
+
knowledge: string;
|
|
108
|
+
providers: readonly ["moonshot", "deepinfra", "togetherai"];
|
|
109
|
+
modalities: {
|
|
110
|
+
input: readonly ["text", "image"];
|
|
111
|
+
output: readonly ["text"];
|
|
112
|
+
};
|
|
113
|
+
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
114
|
+
context: number;
|
|
80
115
|
}>];
|
|
81
116
|
readonly "k2.5": readonly [import("../../utils").Preset<"moonshot/kimi-k2.5", CatalogModel, {
|
|
82
117
|
name: string;
|
|
@@ -101,4 +136,16 @@ export declare const kimi: {
|
|
|
101
136
|
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
102
137
|
context: number;
|
|
103
138
|
}>];
|
|
139
|
+
readonly "k2.7": readonly [import("../../utils").Preset<"moonshot/kimi-k2.7-code", CatalogModel, {
|
|
140
|
+
name: string;
|
|
141
|
+
created: string;
|
|
142
|
+
knowledge: string;
|
|
143
|
+
providers: readonly ["moonshot", "deepinfra", "togetherai"];
|
|
144
|
+
modalities: {
|
|
145
|
+
input: readonly ["text", "image"];
|
|
146
|
+
output: readonly ["text"];
|
|
147
|
+
};
|
|
148
|
+
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
149
|
+
context: number;
|
|
150
|
+
}>];
|
|
104
151
|
};
|
|
@@ -21,16 +21,28 @@ export const kimiK26 = presetFor()("moonshot/kimi-k2.6", {
|
|
|
21
21
|
created: "2026-04-20",
|
|
22
22
|
providers: ["moonshot", "fireworks"],
|
|
23
23
|
});
|
|
24
|
+
export const kimiK27Code = presetFor()("moonshot/kimi-k2.7-code", {
|
|
25
|
+
...KIMI_BASE,
|
|
26
|
+
name: "Kimi K2.7 Code",
|
|
27
|
+
created: "2026-06-12",
|
|
28
|
+
knowledge: "2025-01",
|
|
29
|
+
providers: [
|
|
30
|
+
"moonshot",
|
|
31
|
+
"deepinfra",
|
|
32
|
+
"togetherai",
|
|
33
|
+
],
|
|
34
|
+
});
|
|
24
35
|
const kimiAtomic = {
|
|
25
36
|
"k2.5": [kimiK25],
|
|
26
37
|
"k2.6": [kimiK26],
|
|
38
|
+
"k2.7": [kimiK27Code],
|
|
27
39
|
};
|
|
28
40
|
const kimiGroups = {
|
|
29
|
-
"k2.x": [...kimiAtomic["k2.5"], ...kimiAtomic["k2.6"]],
|
|
41
|
+
"k2.x": [...kimiAtomic["k2.5"], ...kimiAtomic["k2.6"], ...kimiAtomic["k2.7"]],
|
|
30
42
|
};
|
|
31
43
|
export const kimi = {
|
|
32
44
|
...kimiAtomic,
|
|
33
45
|
...kimiGroups,
|
|
34
|
-
latest: [...kimiAtomic["k2.
|
|
46
|
+
latest: [...kimiAtomic["k2.7"]],
|
|
35
47
|
all: Object.values(kimiAtomic).flat(),
|
|
36
48
|
};
|
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.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", "xai/grok-4.3", "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"];
|
|
2
|
+
export declare const CANONICAL_MODEL_IDS: readonly ["anthropic/claude-fable-5", "anthropic/claude-opus-4.8", "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-3.5-flash", "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", "minimax/m3", "moonshot/kimi-k2.5", "moonshot/kimi-k2.6", "moonshot/kimi-k2.7-code", "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", "xai/grok-4.3", "xai/grok-4.20", "xai/grok-4.20-multi-agent", "deepseek/deepseek-v3.2", "deepseek/deepseek-v4-flash", "deepseek/deepseek-v4-pro", "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.7-plus", "alibaba/qwen3.7-max", "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", "zhipu/glm-5.2"];
|
|
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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export const CANONICAL_MODEL_IDS = [
|
|
2
2
|
// Anthropic
|
|
3
|
+
"anthropic/claude-fable-5",
|
|
4
|
+
"anthropic/claude-opus-4.8",
|
|
3
5
|
"anthropic/claude-opus-4.7",
|
|
4
6
|
"anthropic/claude-opus-4.6",
|
|
5
7
|
"anthropic/claude-sonnet-4.6",
|
|
@@ -55,6 +57,7 @@ export const CANONICAL_MODEL_IDS = [
|
|
|
55
57
|
"google/gemini-3-flash-preview",
|
|
56
58
|
"google/gemini-3.1-flash-lite-preview",
|
|
57
59
|
"google/gemini-3.1-pro-preview",
|
|
60
|
+
"google/gemini-3.5-flash",
|
|
58
61
|
"google/gemini-embedding-2",
|
|
59
62
|
"google/embedding-001",
|
|
60
63
|
"google/gemma-3-1b",
|
|
@@ -92,9 +95,11 @@ export const CANONICAL_MODEL_IDS = [
|
|
|
92
95
|
// MiniMax
|
|
93
96
|
"minimax/m2.5",
|
|
94
97
|
"minimax/m2.7",
|
|
98
|
+
"minimax/m3",
|
|
95
99
|
// Moonshot
|
|
96
100
|
"moonshot/kimi-k2.5",
|
|
97
101
|
"moonshot/kimi-k2.6",
|
|
102
|
+
"moonshot/kimi-k2.7-code",
|
|
98
103
|
// xAI
|
|
99
104
|
"xai/grok-4.1-fast",
|
|
100
105
|
"xai/grok-4.1-fast-reasoning",
|
|
@@ -102,8 +107,12 @@ export const CANONICAL_MODEL_IDS = [
|
|
|
102
107
|
"xai/grok-4.2-reasoning",
|
|
103
108
|
"xai/grok-4.2-multi-agent",
|
|
104
109
|
"xai/grok-4.3",
|
|
110
|
+
"xai/grok-4.20",
|
|
111
|
+
"xai/grok-4.20-multi-agent",
|
|
105
112
|
// DeepSeek
|
|
106
113
|
"deepseek/deepseek-v3.2",
|
|
114
|
+
"deepseek/deepseek-v4-flash",
|
|
115
|
+
"deepseek/deepseek-v4-pro",
|
|
107
116
|
// Voyage
|
|
108
117
|
"voyage/voyage-2-code",
|
|
109
118
|
"voyage/voyage-2-law",
|
|
@@ -132,6 +141,8 @@ export const CANONICAL_MODEL_IDS = [
|
|
|
132
141
|
"alibaba/qwen3.6-flash",
|
|
133
142
|
"alibaba/qwen3.6-27b",
|
|
134
143
|
"alibaba/qwen3.6-max-preview",
|
|
144
|
+
"alibaba/qwen3.7-plus",
|
|
145
|
+
"alibaba/qwen3.7-max",
|
|
135
146
|
"alibaba/qwen3-coder-next",
|
|
136
147
|
"alibaba/qwen3-vl-235b",
|
|
137
148
|
"alibaba/qwen3-embedding-0.6b",
|
|
@@ -141,4 +152,5 @@ export const CANONICAL_MODEL_IDS = [
|
|
|
141
152
|
"zhipu/glm-5",
|
|
142
153
|
"zhipu/glm-5-turbo",
|
|
143
154
|
"zhipu/glm-5.1",
|
|
155
|
+
"zhipu/glm-5.2",
|
|
144
156
|
];
|
|
@@ -71,18 +71,53 @@ export declare const grok43: import("../../utils").Preset<"xai/grok-4.3", Catalo
|
|
|
71
71
|
};
|
|
72
72
|
providers: readonly ["xai"];
|
|
73
73
|
}>;
|
|
74
|
+
export declare const grok420: import("../../utils").Preset<"xai/grok-4.20", CatalogModel, {
|
|
75
|
+
name: string;
|
|
76
|
+
created: string;
|
|
77
|
+
knowledge: string;
|
|
78
|
+
capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
|
|
79
|
+
modalities: {
|
|
80
|
+
input: readonly ["text", "image"];
|
|
81
|
+
output: readonly ["text"];
|
|
82
|
+
};
|
|
83
|
+
providers: readonly ["xai"];
|
|
84
|
+
context: number;
|
|
85
|
+
}>;
|
|
86
|
+
export declare const grok420MultiAgent: import("../../utils").Preset<"xai/grok-4.20-multi-agent", CatalogModel, {
|
|
87
|
+
name: string;
|
|
88
|
+
created: string;
|
|
89
|
+
knowledge: string;
|
|
90
|
+
capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
|
|
91
|
+
modalities: {
|
|
92
|
+
input: readonly ["text", "image"];
|
|
93
|
+
output: readonly ["text"];
|
|
94
|
+
};
|
|
95
|
+
providers: readonly ["xai"];
|
|
96
|
+
context: number;
|
|
97
|
+
}>;
|
|
74
98
|
export declare const grok: {
|
|
75
|
-
readonly latest: readonly [import("../../utils").Preset<"xai/grok-4.
|
|
99
|
+
readonly latest: readonly [import("../../utils").Preset<"xai/grok-4.20", CatalogModel, {
|
|
76
100
|
name: string;
|
|
77
101
|
created: string;
|
|
78
102
|
knowledge: string;
|
|
103
|
+
capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
|
|
104
|
+
modalities: {
|
|
105
|
+
input: readonly ["text", "image"];
|
|
106
|
+
output: readonly ["text"];
|
|
107
|
+
};
|
|
108
|
+
providers: readonly ["xai"];
|
|
79
109
|
context: number;
|
|
110
|
+
}>, import("../../utils").Preset<"xai/grok-4.20-multi-agent", CatalogModel, {
|
|
111
|
+
name: string;
|
|
112
|
+
created: string;
|
|
113
|
+
knowledge: string;
|
|
80
114
|
capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
|
|
81
115
|
modalities: {
|
|
82
116
|
input: readonly ["text", "image"];
|
|
83
117
|
output: readonly ["text"];
|
|
84
118
|
};
|
|
85
119
|
providers: readonly ["xai"];
|
|
120
|
+
context: number;
|
|
86
121
|
}>];
|
|
87
122
|
readonly all: (import("../../utils").Preset<"xai/grok-4.1-fast", CatalogModel, {
|
|
88
123
|
name: string;
|
|
@@ -150,6 +185,28 @@ export declare const grok: {
|
|
|
150
185
|
output: readonly ["text"];
|
|
151
186
|
};
|
|
152
187
|
providers: readonly ["xai"];
|
|
188
|
+
}> | import("../../utils").Preset<"xai/grok-4.20", CatalogModel, {
|
|
189
|
+
name: string;
|
|
190
|
+
created: string;
|
|
191
|
+
knowledge: string;
|
|
192
|
+
capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
|
|
193
|
+
modalities: {
|
|
194
|
+
input: readonly ["text", "image"];
|
|
195
|
+
output: readonly ["text"];
|
|
196
|
+
};
|
|
197
|
+
providers: readonly ["xai"];
|
|
198
|
+
context: number;
|
|
199
|
+
}> | import("../../utils").Preset<"xai/grok-4.20-multi-agent", CatalogModel, {
|
|
200
|
+
name: string;
|
|
201
|
+
created: string;
|
|
202
|
+
knowledge: string;
|
|
203
|
+
capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
|
|
204
|
+
modalities: {
|
|
205
|
+
input: readonly ["text", "image"];
|
|
206
|
+
output: readonly ["text"];
|
|
207
|
+
};
|
|
208
|
+
providers: readonly ["xai"];
|
|
209
|
+
context: number;
|
|
153
210
|
}>)[];
|
|
154
211
|
readonly "v4.1": readonly [import("../../utils").Preset<"xai/grok-4.1-fast", CatalogModel, {
|
|
155
212
|
name: string;
|
|
@@ -220,4 +277,27 @@ export declare const grok: {
|
|
|
220
277
|
};
|
|
221
278
|
providers: readonly ["xai"];
|
|
222
279
|
}>];
|
|
280
|
+
readonly "v4.20": readonly [import("../../utils").Preset<"xai/grok-4.20", CatalogModel, {
|
|
281
|
+
name: string;
|
|
282
|
+
created: string;
|
|
283
|
+
knowledge: string;
|
|
284
|
+
capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
|
|
285
|
+
modalities: {
|
|
286
|
+
input: readonly ["text", "image"];
|
|
287
|
+
output: readonly ["text"];
|
|
288
|
+
};
|
|
289
|
+
providers: readonly ["xai"];
|
|
290
|
+
context: number;
|
|
291
|
+
}>, import("../../utils").Preset<"xai/grok-4.20-multi-agent", CatalogModel, {
|
|
292
|
+
name: string;
|
|
293
|
+
created: string;
|
|
294
|
+
knowledge: string;
|
|
295
|
+
capabilities: readonly ["tool_call", "structured_output", "reasoning", "temperature"];
|
|
296
|
+
modalities: {
|
|
297
|
+
input: readonly ["text", "image"];
|
|
298
|
+
output: readonly ["text"];
|
|
299
|
+
};
|
|
300
|
+
providers: readonly ["xai"];
|
|
301
|
+
context: number;
|
|
302
|
+
}>];
|
|
223
303
|
};
|
|
@@ -49,15 +49,28 @@ export const grok43 = presetFor()("xai/grok-4.3", {
|
|
|
49
49
|
knowledge: "2024-11",
|
|
50
50
|
context: 1000000,
|
|
51
51
|
});
|
|
52
|
+
export const grok420 = presetFor()("xai/grok-4.20", {
|
|
53
|
+
...GROK_REASONING_BASE,
|
|
54
|
+
name: "Grok 4.20",
|
|
55
|
+
created: "2026-03-09",
|
|
56
|
+
knowledge: "2024-11",
|
|
57
|
+
});
|
|
58
|
+
export const grok420MultiAgent = presetFor()("xai/grok-4.20-multi-agent", {
|
|
59
|
+
...GROK_REASONING_BASE,
|
|
60
|
+
name: "Grok 4.20 Multi-Agent",
|
|
61
|
+
created: "2026-03-09",
|
|
62
|
+
knowledge: "2024-11",
|
|
63
|
+
});
|
|
52
64
|
const grokAtomic = {
|
|
53
65
|
"v4.1": [grok41Fast, grok41FastReasoning],
|
|
54
66
|
"v4.2": [grok42, grok42Reasoning, grok42MultiAgent],
|
|
55
67
|
"v4.3": [grok43],
|
|
68
|
+
"v4.20": [grok420, grok420MultiAgent],
|
|
56
69
|
};
|
|
57
70
|
const grokGroups = {};
|
|
58
71
|
export const grok = {
|
|
59
72
|
...grokAtomic,
|
|
60
73
|
...grokGroups,
|
|
61
|
-
latest: [
|
|
74
|
+
latest: [...grokAtomic["v4.20"]],
|
|
62
75
|
all: Object.values(grokAtomic).flat(),
|
|
63
76
|
};
|
|
@@ -32,9 +32,21 @@ export declare const glm51: import("../../utils").Preset<"zhipu/glm-5.1", Catalo
|
|
|
32
32
|
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
33
33
|
context: number;
|
|
34
34
|
}>;
|
|
35
|
+
export declare const glm52: import("../../utils").Preset<"zhipu/glm-5.2", CatalogModel, {
|
|
36
|
+
name: string;
|
|
37
|
+
context: number;
|
|
38
|
+
created: string;
|
|
39
|
+
providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
|
|
40
|
+
modalities: {
|
|
41
|
+
input: readonly ["text"];
|
|
42
|
+
output: readonly ["text"];
|
|
43
|
+
};
|
|
44
|
+
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
45
|
+
}>;
|
|
35
46
|
export declare const glm: {
|
|
36
|
-
readonly latest: readonly [import("../../utils").Preset<"zhipu/glm-5.
|
|
47
|
+
readonly latest: readonly [import("../../utils").Preset<"zhipu/glm-5.2", CatalogModel, {
|
|
37
48
|
name: string;
|
|
49
|
+
context: number;
|
|
38
50
|
created: string;
|
|
39
51
|
providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
|
|
40
52
|
modalities: {
|
|
@@ -42,7 +54,6 @@ export declare const glm: {
|
|
|
42
54
|
output: readonly ["text"];
|
|
43
55
|
};
|
|
44
56
|
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
45
|
-
context: number;
|
|
46
57
|
}>];
|
|
47
58
|
readonly all: (import("../../utils").Preset<"zhipu/glm-5", CatalogModel, {
|
|
48
59
|
name: string;
|
|
@@ -74,6 +85,16 @@ export declare const glm: {
|
|
|
74
85
|
};
|
|
75
86
|
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
76
87
|
context: number;
|
|
88
|
+
}> | import("../../utils").Preset<"zhipu/glm-5.2", CatalogModel, {
|
|
89
|
+
name: string;
|
|
90
|
+
context: number;
|
|
91
|
+
created: string;
|
|
92
|
+
providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
|
|
93
|
+
modalities: {
|
|
94
|
+
input: readonly ["text"];
|
|
95
|
+
output: readonly ["text"];
|
|
96
|
+
};
|
|
97
|
+
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
77
98
|
}>)[];
|
|
78
99
|
readonly "v5.x": readonly [import("../../utils").Preset<"zhipu/glm-5", CatalogModel, {
|
|
79
100
|
name: string;
|
|
@@ -105,6 +126,16 @@ export declare const glm: {
|
|
|
105
126
|
};
|
|
106
127
|
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
107
128
|
context: number;
|
|
129
|
+
}>, import("../../utils").Preset<"zhipu/glm-5.2", CatalogModel, {
|
|
130
|
+
name: string;
|
|
131
|
+
context: number;
|
|
132
|
+
created: string;
|
|
133
|
+
providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
|
|
134
|
+
modalities: {
|
|
135
|
+
input: readonly ["text"];
|
|
136
|
+
output: readonly ["text"];
|
|
137
|
+
};
|
|
138
|
+
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
108
139
|
}>];
|
|
109
140
|
readonly v5: readonly [import("../../utils").Preset<"zhipu/glm-5", CatalogModel, {
|
|
110
141
|
name: string;
|
|
@@ -138,4 +169,15 @@ export declare const glm: {
|
|
|
138
169
|
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
139
170
|
context: number;
|
|
140
171
|
}>];
|
|
172
|
+
readonly "v5.2": readonly [import("../../utils").Preset<"zhipu/glm-5.2", CatalogModel, {
|
|
173
|
+
name: string;
|
|
174
|
+
context: number;
|
|
175
|
+
created: string;
|
|
176
|
+
providers: readonly ["zai", "deepinfra", "chutes", "togetherai", "fireworks"];
|
|
177
|
+
modalities: {
|
|
178
|
+
input: readonly ["text"];
|
|
179
|
+
output: readonly ["text"];
|
|
180
|
+
};
|
|
181
|
+
capabilities: readonly ["reasoning", "tool_call", "structured_output", "temperature"];
|
|
182
|
+
}>];
|
|
141
183
|
};
|
|
@@ -26,16 +26,24 @@ export const glm51 = presetFor()("zhipu/glm-5.1", {
|
|
|
26
26
|
created: "2026-03-27",
|
|
27
27
|
providers: ["zai", "deepinfra", "chutes", "togetherai", "fireworks"],
|
|
28
28
|
});
|
|
29
|
+
export const glm52 = presetFor()("zhipu/glm-5.2", {
|
|
30
|
+
...GLM_5_BASE,
|
|
31
|
+
name: "GLM 5.2",
|
|
32
|
+
context: 1_000_000,
|
|
33
|
+
created: "2026-06-13",
|
|
34
|
+
providers: ["zai", "deepinfra", "chutes", "togetherai", "fireworks"],
|
|
35
|
+
});
|
|
29
36
|
const glmAtomic = {
|
|
30
37
|
v5: [glm5, glm5Turbo],
|
|
31
38
|
"v5.1": [glm51],
|
|
39
|
+
"v5.2": [glm52],
|
|
32
40
|
};
|
|
33
41
|
const glmGroups = {
|
|
34
|
-
"v5.x": [...glmAtomic["v5"], ...glmAtomic["v5.1"]],
|
|
42
|
+
"v5.x": [...glmAtomic["v5"], ...glmAtomic["v5.1"], ...glmAtomic["v5.2"]],
|
|
35
43
|
};
|
|
36
44
|
export const glm = {
|
|
37
45
|
...glmAtomic,
|
|
38
46
|
...glmGroups,
|
|
39
|
-
latest: [...glmAtomic["v5.
|
|
47
|
+
latest: [...glmAtomic["v5.2"]],
|
|
40
48
|
all: Object.values(glmAtomic).flat(),
|
|
41
49
|
};
|
|
@@ -9,6 +9,8 @@ import { withCanonicalIds } from "../registry";
|
|
|
9
9
|
const MAPPING = {
|
|
10
10
|
// Require Inference Profiles and can't be resolved from standard name mapping
|
|
11
11
|
"anthropic/claude-haiku-4.5": "{ip}anthropic.claude-haiku-4-5-20251001-v1:0",
|
|
12
|
+
"anthropic/claude-fable-5": "{ip}anthropic.claude-fable-5",
|
|
13
|
+
"anthropic/claude-opus-4.8": "{ip}anthropic.claude-opus-4-8",
|
|
12
14
|
"anthropic/claude-opus-4.7": "{ip}anthropic.claude-opus-4-7",
|
|
13
15
|
"anthropic/claude-sonnet-4.6": "{ip}anthropic.claude-sonnet-4-6",
|
|
14
16
|
"anthropic/claude-sonnet-4.5": "{ip}anthropic.claude-sonnet-4-5-20250929-v1:0",
|
|
@@ -64,21 +64,17 @@ export const bedrockClaudeReasoningMiddleware = {
|
|
|
64
64
|
return params;
|
|
65
65
|
const target = (bedrock.reasoningConfig ??= {});
|
|
66
66
|
if (thinking && typeof thinking === "object") {
|
|
67
|
-
// Bedrock
|
|
68
|
-
//
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
// SDK tracking issue: https://github.com/vercel/ai/issues/8513
|
|
73
|
-
target.type = thinking.type === "adaptive" ? "enabled" : thinking.type;
|
|
67
|
+
// Bedrock Converse API supports "adaptive" natively for Claude Opus 4.6/4.7
|
|
68
|
+
// and Sonnet 4.6 via additionalModelRequestFields. Opus 4.7 *only* supports
|
|
69
|
+
// adaptive — "enabled" returns a 400.
|
|
70
|
+
// https://docs.aws.amazon.com/bedrock/latest/userguide/claude-messages-adaptive-thinking.html
|
|
71
|
+
target.type = thinking.type;
|
|
74
72
|
if ("budgetTokens" in thinking && thinking.budgetTokens !== undefined) {
|
|
75
73
|
target.budgetTokens = thinking.budgetTokens;
|
|
76
74
|
}
|
|
77
75
|
else if (target.type === "enabled") {
|
|
78
|
-
// Bedrock requires budgetTokens when type is "enabled"
|
|
79
|
-
//
|
|
80
|
-
// the same effort-based logic as other model cases, defaulting to "medium".
|
|
81
|
-
// Note: Bedrock Converse API doesn't support "adaptive" natively — see vercel/ai#8513
|
|
76
|
+
// Bedrock requires budgetTokens when type is "enabled" — compute a fallback
|
|
77
|
+
// from effort, defaulting to "medium".
|
|
82
78
|
const mappedEffort = effort === "max" ? "xhigh" : (effort ?? "medium");
|
|
83
79
|
target.budgetTokens = calculateReasoningBudgetFromEffort(mappedEffort, params.maxOutputTokens ?? 65536, 1024);
|
|
84
80
|
}
|
|
@@ -6,6 +6,8 @@ const MAPPING = {
|
|
|
6
6
|
"xai/grok-4.2-reasoning": "grok-4.20-0309-reasoning",
|
|
7
7
|
"xai/grok-4.2-multi-agent": "grok-4.20-multi-agent-0309",
|
|
8
8
|
"xai/grok-4.3": "grok-4.3",
|
|
9
|
+
"xai/grok-4.20": "grok-4.20-0309-reasoning",
|
|
10
|
+
"xai/grok-4.20-multi-agent": "grok-4.20-multi-agent-0309",
|
|
9
11
|
};
|
|
10
12
|
export const withCanonicalIdsForXai = (provider, extraMapping) => withCanonicalIds(provider, {
|
|
11
13
|
mapping: { ...MAPPING, ...extraMapping },
|
|
@@ -3,6 +3,7 @@ const MAPPING = {
|
|
|
3
3
|
"zhipu/glm-5": "glm-5-20260211",
|
|
4
4
|
"zhipu/glm-5-turbo": "glm-5-turbo-20260315",
|
|
5
5
|
"zhipu/glm-5.1": "glm-5.1-20260406",
|
|
6
|
+
"zhipu/glm-5.2": "glm-5.2-20260616",
|
|
6
7
|
};
|
|
7
8
|
export const withCanonicalIdsForZai = (provider, extraMapping) => withCanonicalIds(provider, {
|
|
8
9
|
mapping: { ...MAPPING, ...extraMapping },
|