@nextclaw/runtime 0.2.2 → 0.2.3
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/package.json +2 -2
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -449
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/runtime",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "NextClaw runtime assembly for builtin providers and channels.",
|
|
6
6
|
"type": "module",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@nextclaw/core": "0.9.
|
|
18
|
+
"@nextclaw/core": "0.9.3"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/node": "^20.17.6",
|
package/dist/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ProviderSpec, ProviderRegistry, ProviderCatalogPlugin } from '@nextclaw/core';
|
|
2
|
-
export { ProviderCatalogPlugin, ProviderSpec } from '@nextclaw/core';
|
|
3
|
-
|
|
4
|
-
declare const BUILTIN_CHANNEL_PLUGIN_IDS: readonly ["telegram", "whatsapp", "discord", "feishu", "mochat", "dingtalk", "wecom", "email", "slack", "qq"];
|
|
5
|
-
type BuiltinChannelPluginId = (typeof BUILTIN_CHANNEL_PLUGIN_IDS)[number];
|
|
6
|
-
declare function isBuiltinChannelPluginId(value: string): value is BuiltinChannelPluginId;
|
|
7
|
-
|
|
8
|
-
declare function installBuiltinProviderRegistry(): ProviderRegistry;
|
|
9
|
-
declare function listBuiltinProviderPlugins(): ProviderCatalogPlugin[];
|
|
10
|
-
declare function listBuiltinProviders(): ProviderSpec[];
|
|
11
|
-
declare function findBuiltinProviderByName(name: string): ProviderSpec | undefined;
|
|
12
|
-
declare function builtinProviderIds(): string[];
|
|
13
|
-
|
|
14
|
-
export { BUILTIN_CHANNEL_PLUGIN_IDS, type BuiltinChannelPluginId, builtinProviderIds, findBuiltinProviderByName, installBuiltinProviderRegistry, isBuiltinChannelPluginId, listBuiltinProviderPlugins, listBuiltinProviders };
|
package/dist/index.js
DELETED
|
@@ -1,449 +0,0 @@
|
|
|
1
|
-
// src/providers/index.ts
|
|
2
|
-
import {
|
|
3
|
-
ProviderRegistry,
|
|
4
|
-
setProviderRegistry
|
|
5
|
-
} from "@nextclaw/core";
|
|
6
|
-
|
|
7
|
-
// src/providers/plugins/builtin.ts
|
|
8
|
-
var builtinProviderPlugin = {
|
|
9
|
-
id: "builtin-runtime-providers",
|
|
10
|
-
providers: [
|
|
11
|
-
{
|
|
12
|
-
name: "nextclaw",
|
|
13
|
-
keywords: ["nextclaw", "dashscope/", "qwen3.5", "qwen"],
|
|
14
|
-
envKey: "NEXTCLAW_API_KEY",
|
|
15
|
-
displayName: "NextClaw Built-in",
|
|
16
|
-
modelPrefix: "nextclaw",
|
|
17
|
-
litellmPrefix: "nextclaw",
|
|
18
|
-
skipPrefixes: [],
|
|
19
|
-
envExtras: [],
|
|
20
|
-
isGateway: true,
|
|
21
|
-
isLocal: false,
|
|
22
|
-
detectByKeyPrefix: "nc_free_",
|
|
23
|
-
detectByBaseKeyword: "nextclaw.io",
|
|
24
|
-
defaultApiBase: "https://ai-gateway-api.nextclaw.io/v1",
|
|
25
|
-
defaultModels: [
|
|
26
|
-
"dashscope/qwen3.5-plus",
|
|
27
|
-
"dashscope/qwen3.5-flash",
|
|
28
|
-
"dashscope/qwen3.5-122b-a10b",
|
|
29
|
-
"dashscope/qwen3.5-35b-a3b"
|
|
30
|
-
],
|
|
31
|
-
stripModelPrefix: false,
|
|
32
|
-
modelOverrides: []
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: "openrouter",
|
|
36
|
-
keywords: ["openrouter"],
|
|
37
|
-
envKey: "OPENROUTER_API_KEY",
|
|
38
|
-
displayName: "OpenRouter",
|
|
39
|
-
modelPrefix: "openrouter",
|
|
40
|
-
litellmPrefix: "openrouter",
|
|
41
|
-
skipPrefixes: [],
|
|
42
|
-
envExtras: [],
|
|
43
|
-
isGateway: true,
|
|
44
|
-
isLocal: false,
|
|
45
|
-
detectByKeyPrefix: "sk-or-",
|
|
46
|
-
detectByBaseKeyword: "openrouter",
|
|
47
|
-
defaultApiBase: "https://openrouter.ai/api/v1",
|
|
48
|
-
defaultModels: [
|
|
49
|
-
"openrouter/minimax/minimax-m2.5",
|
|
50
|
-
"openrouter/google/gemini-3-flash-preview",
|
|
51
|
-
"openrouter/deepseek/deepseek-v3.2",
|
|
52
|
-
"openrouter/x-ai/grok-4.1-fast",
|
|
53
|
-
"openrouter/z-ai/glm-5",
|
|
54
|
-
"openrouter/anthropic/claude-opus-4.6",
|
|
55
|
-
"openrouter/openai/gpt-5.3-codex"
|
|
56
|
-
],
|
|
57
|
-
stripModelPrefix: false,
|
|
58
|
-
modelOverrides: [],
|
|
59
|
-
logo: "openrouter.svg"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
name: "aihubmix",
|
|
63
|
-
keywords: ["aihubmix"],
|
|
64
|
-
envKey: "OPENAI_API_KEY",
|
|
65
|
-
displayName: "AiHubMix",
|
|
66
|
-
modelPrefix: "aihubmix",
|
|
67
|
-
litellmPrefix: "openai",
|
|
68
|
-
skipPrefixes: [],
|
|
69
|
-
envExtras: [],
|
|
70
|
-
isGateway: true,
|
|
71
|
-
isLocal: false,
|
|
72
|
-
detectByKeyPrefix: "",
|
|
73
|
-
detectByBaseKeyword: "aihubmix",
|
|
74
|
-
defaultApiBase: "https://aihubmix.com/v1",
|
|
75
|
-
defaultModels: ["aihubmix/gpt-5.3-codex", "aihubmix/claude-opus-4.6", "aihubmix/gemini-3.1-pro-preview"],
|
|
76
|
-
stripModelPrefix: true,
|
|
77
|
-
modelOverrides: [],
|
|
78
|
-
logo: "aihubmix.png"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: "anthropic",
|
|
82
|
-
keywords: ["anthropic", "claude"],
|
|
83
|
-
envKey: "ANTHROPIC_API_KEY",
|
|
84
|
-
displayName: "Anthropic",
|
|
85
|
-
modelPrefix: "anthropic",
|
|
86
|
-
litellmPrefix: "anthropic",
|
|
87
|
-
skipPrefixes: ["anthropic/"],
|
|
88
|
-
envExtras: [],
|
|
89
|
-
isGateway: false,
|
|
90
|
-
isLocal: false,
|
|
91
|
-
detectByKeyPrefix: "",
|
|
92
|
-
detectByBaseKeyword: "",
|
|
93
|
-
defaultApiBase: "https://api.anthropic.com",
|
|
94
|
-
defaultModels: ["anthropic/claude-opus-4-6", "anthropic/claude-sonnet-4-6"],
|
|
95
|
-
stripModelPrefix: false,
|
|
96
|
-
modelOverrides: [],
|
|
97
|
-
logo: "anthropic.svg"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
name: "openai",
|
|
101
|
-
keywords: ["openai", "gpt"],
|
|
102
|
-
envKey: "OPENAI_API_KEY",
|
|
103
|
-
displayName: "OpenAI",
|
|
104
|
-
modelPrefix: "openai",
|
|
105
|
-
litellmPrefix: "openai",
|
|
106
|
-
skipPrefixes: ["openai/"],
|
|
107
|
-
envExtras: [],
|
|
108
|
-
isGateway: false,
|
|
109
|
-
isLocal: false,
|
|
110
|
-
detectByKeyPrefix: "",
|
|
111
|
-
detectByBaseKeyword: "",
|
|
112
|
-
defaultApiBase: "https://api.openai.com/v1",
|
|
113
|
-
defaultModels: ["openai/gpt-5.3-codex", "openai/gpt-5-mini", "openai/gpt-5-nano"],
|
|
114
|
-
stripModelPrefix: false,
|
|
115
|
-
modelOverrides: [],
|
|
116
|
-
supportsWireApi: true,
|
|
117
|
-
wireApiOptions: ["auto", "chat", "responses"],
|
|
118
|
-
defaultWireApi: "auto",
|
|
119
|
-
logo: "openai.svg"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
name: "deepseek",
|
|
123
|
-
keywords: ["deepseek"],
|
|
124
|
-
envKey: "DEEPSEEK_API_KEY",
|
|
125
|
-
displayName: "DeepSeek",
|
|
126
|
-
modelPrefix: "deepseek",
|
|
127
|
-
litellmPrefix: "deepseek",
|
|
128
|
-
skipPrefixes: ["deepseek/"],
|
|
129
|
-
envExtras: [],
|
|
130
|
-
isGateway: false,
|
|
131
|
-
isLocal: false,
|
|
132
|
-
detectByKeyPrefix: "",
|
|
133
|
-
detectByBaseKeyword: "",
|
|
134
|
-
defaultApiBase: "https://api.deepseek.com",
|
|
135
|
-
defaultModels: ["deepseek/deepseek-chat", "deepseek/deepseek-reasoner"],
|
|
136
|
-
stripModelPrefix: false,
|
|
137
|
-
modelOverrides: [],
|
|
138
|
-
logo: "deepseek.png"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
name: "gemini",
|
|
142
|
-
keywords: ["gemini"],
|
|
143
|
-
envKey: "GEMINI_API_KEY",
|
|
144
|
-
displayName: "Gemini",
|
|
145
|
-
modelPrefix: "gemini",
|
|
146
|
-
litellmPrefix: "gemini",
|
|
147
|
-
skipPrefixes: ["gemini/"],
|
|
148
|
-
envExtras: [],
|
|
149
|
-
isGateway: false,
|
|
150
|
-
isLocal: false,
|
|
151
|
-
detectByKeyPrefix: "",
|
|
152
|
-
detectByBaseKeyword: "",
|
|
153
|
-
defaultApiBase: "https://generativelanguage.googleapis.com/v1beta/openai",
|
|
154
|
-
defaultModels: ["gemini/gemini-3.1-pro-preview", "gemini/gemini-3-flash-preview"],
|
|
155
|
-
stripModelPrefix: false,
|
|
156
|
-
modelOverrides: [],
|
|
157
|
-
logo: "gemini.svg"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
name: "zhipu",
|
|
161
|
-
keywords: ["zhipu", "glm", "zai"],
|
|
162
|
-
envKey: "ZAI_API_KEY",
|
|
163
|
-
displayName: "Zhipu AI",
|
|
164
|
-
modelPrefix: "zai",
|
|
165
|
-
litellmPrefix: "zai",
|
|
166
|
-
skipPrefixes: ["zhipu/", "zai/", "openrouter/", "hosted_vllm/"],
|
|
167
|
-
envExtras: [["ZHIPUAI_API_KEY", "{api_key}"]],
|
|
168
|
-
isGateway: false,
|
|
169
|
-
isLocal: false,
|
|
170
|
-
detectByKeyPrefix: "",
|
|
171
|
-
detectByBaseKeyword: "",
|
|
172
|
-
defaultApiBase: "https://open.bigmodel.cn/api/paas/v4",
|
|
173
|
-
defaultModels: ["zai/glm-5"],
|
|
174
|
-
stripModelPrefix: false,
|
|
175
|
-
modelOverrides: [],
|
|
176
|
-
logo: "zhipu.svg"
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
name: "dashscope",
|
|
180
|
-
keywords: ["qwen", "dashscope"],
|
|
181
|
-
envKey: "DASHSCOPE_API_KEY",
|
|
182
|
-
displayName: "DashScope",
|
|
183
|
-
modelPrefix: "dashscope",
|
|
184
|
-
litellmPrefix: "dashscope",
|
|
185
|
-
skipPrefixes: ["dashscope/", "openrouter/"],
|
|
186
|
-
envExtras: [],
|
|
187
|
-
isGateway: false,
|
|
188
|
-
isLocal: false,
|
|
189
|
-
detectByKeyPrefix: "",
|
|
190
|
-
detectByBaseKeyword: "",
|
|
191
|
-
defaultApiBase: "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
192
|
-
defaultModels: [
|
|
193
|
-
"dashscope/qwen3.5-plus",
|
|
194
|
-
"dashscope/qwen3.5-flash",
|
|
195
|
-
"dashscope/qwen3.5-397b-a17b",
|
|
196
|
-
"dashscope/qwen3.5-122b-a10b",
|
|
197
|
-
"dashscope/qwen3.5-35b-a3b",
|
|
198
|
-
"dashscope/qwen3.5-27b"
|
|
199
|
-
],
|
|
200
|
-
stripModelPrefix: false,
|
|
201
|
-
modelOverrides: [],
|
|
202
|
-
logo: "dashscope.png"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
name: "qwen-portal",
|
|
206
|
-
keywords: ["qwen-portal", "qwen"],
|
|
207
|
-
envKey: "QWEN_PORTAL_TOKEN",
|
|
208
|
-
displayName: "Qwen Portal",
|
|
209
|
-
modelPrefix: "qwen-portal",
|
|
210
|
-
litellmPrefix: "qwen-portal",
|
|
211
|
-
skipPrefixes: ["qwen-portal/"],
|
|
212
|
-
envExtras: [],
|
|
213
|
-
isGateway: false,
|
|
214
|
-
isLocal: false,
|
|
215
|
-
detectByKeyPrefix: "",
|
|
216
|
-
detectByBaseKeyword: "portal.qwen.ai",
|
|
217
|
-
defaultApiBase: "https://portal.qwen.ai/v1",
|
|
218
|
-
defaultModels: ["qwen-portal/coder-model", "qwen-portal/vision-model"],
|
|
219
|
-
stripModelPrefix: false,
|
|
220
|
-
modelOverrides: [],
|
|
221
|
-
auth: {
|
|
222
|
-
kind: "device_code",
|
|
223
|
-
displayName: "Qwen OAuth",
|
|
224
|
-
baseUrl: "https://chat.qwen.ai",
|
|
225
|
-
deviceCodePath: "/api/v1/oauth2/device/code",
|
|
226
|
-
tokenPath: "/api/v1/oauth2/token",
|
|
227
|
-
clientId: "f0304373b74a44d2b584a3fb70ca9e56",
|
|
228
|
-
scope: "openid profile email model.completion",
|
|
229
|
-
grantType: "urn:ietf:params:oauth:grant-type:device_code",
|
|
230
|
-
usePkce: true,
|
|
231
|
-
cliCredential: {
|
|
232
|
-
path: "~/.qwen/oauth_creds.json",
|
|
233
|
-
accessTokenField: "access_token",
|
|
234
|
-
refreshTokenField: "refresh_token",
|
|
235
|
-
expiresAtField: "expiry_date"
|
|
236
|
-
},
|
|
237
|
-
note: {
|
|
238
|
-
zh: "\u901A\u8FC7\u6D4F\u89C8\u5668\u767B\u5F55 Qwen \u540E\u5373\u53EF\u5728 NextClaw \u4E2D\u4F7F\u7528\u8BE5 Provider\u3002",
|
|
239
|
-
en: "Log in to Qwen in your browser, then use this provider in NextClaw."
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
name: "moonshot",
|
|
245
|
-
keywords: ["moonshot", "kimi"],
|
|
246
|
-
envKey: "MOONSHOT_API_KEY",
|
|
247
|
-
displayName: "Moonshot",
|
|
248
|
-
modelPrefix: "moonshot",
|
|
249
|
-
litellmPrefix: "moonshot",
|
|
250
|
-
skipPrefixes: ["moonshot/", "openrouter/"],
|
|
251
|
-
envExtras: [["MOONSHOT_API_BASE", "{api_base}"]],
|
|
252
|
-
isGateway: false,
|
|
253
|
-
isLocal: false,
|
|
254
|
-
detectByKeyPrefix: "",
|
|
255
|
-
detectByBaseKeyword: "",
|
|
256
|
-
defaultApiBase: "https://api.moonshot.ai/v1",
|
|
257
|
-
defaultModels: ["moonshot/kimi-k2.5"],
|
|
258
|
-
stripModelPrefix: false,
|
|
259
|
-
modelOverrides: [],
|
|
260
|
-
logo: "moonshot.png"
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
name: "minimax",
|
|
264
|
-
keywords: ["minimax"],
|
|
265
|
-
envKey: "MINIMAX_API_KEY",
|
|
266
|
-
displayName: "MiniMax",
|
|
267
|
-
modelPrefix: "minimax",
|
|
268
|
-
litellmPrefix: "minimax",
|
|
269
|
-
skipPrefixes: ["minimax/", "openrouter/"],
|
|
270
|
-
envExtras: [],
|
|
271
|
-
isGateway: false,
|
|
272
|
-
isLocal: false,
|
|
273
|
-
detectByKeyPrefix: "",
|
|
274
|
-
detectByBaseKeyword: "",
|
|
275
|
-
defaultApiBase: "https://api.minimaxi.com/v1",
|
|
276
|
-
defaultModels: ["minimax/MiniMax-M2.7", "minimax/MiniMax-M2.7-highspeed", "minimax/MiniMax-M2.5", "minimax/MiniMax-M2.5-highspeed"],
|
|
277
|
-
stripModelPrefix: false,
|
|
278
|
-
modelOverrides: [],
|
|
279
|
-
supportsWireApi: true,
|
|
280
|
-
wireApiOptions: ["auto", "chat", "responses"],
|
|
281
|
-
defaultWireApi: "chat",
|
|
282
|
-
logo: "minimax.svg",
|
|
283
|
-
apiBaseHelp: {
|
|
284
|
-
zh: "MiniMax \u4E2D\u56FD\u533A\u8BF7\u4F7F\u7528 https://api.minimaxi.com/v1\uFF1B\u6D77\u5916\u8BF7\u4F7F\u7528 https://api.minimax.io/v1\u3002AI Coding Tools \u63A8\u8350\u4F7F\u7528 MiniMax-M2.7\uFF0C\u5E76\u5C06 Wire API \u8BBE\u4E3A Chat\u3002",
|
|
285
|
-
en: "Use https://api.minimaxi.com/v1 for Mainland China accounts, and https://api.minimax.io/v1 for overseas accounts. For AI Coding Tools, prefer MiniMax-M2.7 with Wire API set to Chat."
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
name: "minimax-portal",
|
|
290
|
-
keywords: ["minimax-portal", "minimax"],
|
|
291
|
-
envKey: "MINIMAX_PORTAL_TOKEN",
|
|
292
|
-
displayName: "MiniMax Portal",
|
|
293
|
-
modelPrefix: "minimax-portal",
|
|
294
|
-
litellmPrefix: "minimax-portal",
|
|
295
|
-
skipPrefixes: ["minimax-portal/"],
|
|
296
|
-
envExtras: [],
|
|
297
|
-
isGateway: false,
|
|
298
|
-
isLocal: false,
|
|
299
|
-
detectByKeyPrefix: "",
|
|
300
|
-
detectByBaseKeyword: "",
|
|
301
|
-
defaultApiBase: "https://api.minimax.io/v1",
|
|
302
|
-
defaultModels: ["minimax-portal/MiniMax-M2.5", "minimax-portal/MiniMax-M2.5-highspeed"],
|
|
303
|
-
stripModelPrefix: false,
|
|
304
|
-
modelOverrides: [],
|
|
305
|
-
logo: "minimax.svg",
|
|
306
|
-
apiBaseHelp: {
|
|
307
|
-
zh: "OAuth Global \u9ED8\u8BA4\u4F7F\u7528 https://api.minimax.io/v1\uFF1BOAuth \u4E2D\u56FD\u533A\u9ED8\u8BA4\u4F7F\u7528 https://api.minimaxi.com/v1\u3002",
|
|
308
|
-
en: "OAuth Global uses https://api.minimax.io/v1 by default; OAuth CN uses https://api.minimaxi.com/v1."
|
|
309
|
-
},
|
|
310
|
-
auth: {
|
|
311
|
-
kind: "device_code",
|
|
312
|
-
protocol: "minimax_user_code",
|
|
313
|
-
displayName: "MiniMax OAuth",
|
|
314
|
-
baseUrl: "https://api.minimax.io",
|
|
315
|
-
deviceCodePath: "/oauth/code",
|
|
316
|
-
tokenPath: "/oauth/token",
|
|
317
|
-
clientId: "78257093-7e40-4613-99e0-527b14b39113",
|
|
318
|
-
scope: "group_id profile model.completion",
|
|
319
|
-
grantType: "urn:ietf:params:oauth:grant-type:user_code",
|
|
320
|
-
usePkce: true,
|
|
321
|
-
defaultMethodId: "cn",
|
|
322
|
-
methods: [
|
|
323
|
-
{
|
|
324
|
-
id: "global",
|
|
325
|
-
label: {
|
|
326
|
-
zh: "Global\uFF08\u6D77\u5916\uFF09",
|
|
327
|
-
en: "Global"
|
|
328
|
-
},
|
|
329
|
-
hint: {
|
|
330
|
-
zh: "\u9002\u7528\u4E8E\u6D77\u5916\u7528\u6237\uFF0C\u9ED8\u8BA4 API Base \u4E3A https://api.minimax.io/v1\u3002",
|
|
331
|
-
en: "For international users. Default API base: https://api.minimax.io/v1."
|
|
332
|
-
},
|
|
333
|
-
baseUrl: "https://api.minimax.io",
|
|
334
|
-
defaultApiBase: "https://api.minimax.io/v1"
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
id: "cn",
|
|
338
|
-
label: {
|
|
339
|
-
zh: "\u4E2D\u56FD\u533A\uFF08CN\uFF09",
|
|
340
|
-
en: "China Mainland (CN)"
|
|
341
|
-
},
|
|
342
|
-
hint: {
|
|
343
|
-
zh: "\u9002\u7528\u4E8E\u4E2D\u56FD\u533A\u7528\u6237\uFF0C\u9ED8\u8BA4 API Base \u4E3A https://api.minimaxi.com/v1\u3002",
|
|
344
|
-
en: "For Mainland China users. Default API base: https://api.minimaxi.com/v1."
|
|
345
|
-
},
|
|
346
|
-
baseUrl: "https://api.minimaxi.com",
|
|
347
|
-
defaultApiBase: "https://api.minimaxi.com/v1"
|
|
348
|
-
}
|
|
349
|
-
],
|
|
350
|
-
note: {
|
|
351
|
-
zh: "\u901A\u8FC7\u6D4F\u89C8\u5668\u5B8C\u6210 MiniMax OAuth \u6388\u6743\u540E\u5373\u53EF\u4F7F\u7528\uFF0C\u65E0\u9700\u624B\u52A8\u586B\u5199 API Key\u3002",
|
|
352
|
-
en: "Complete MiniMax OAuth in browser to use this provider without manually entering an API key."
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
name: "vllm",
|
|
358
|
-
keywords: ["vllm"],
|
|
359
|
-
envKey: "HOSTED_VLLM_API_KEY",
|
|
360
|
-
displayName: "vLLM/Local",
|
|
361
|
-
modelPrefix: "hosted_vllm",
|
|
362
|
-
litellmPrefix: "hosted_vllm",
|
|
363
|
-
skipPrefixes: [],
|
|
364
|
-
envExtras: [],
|
|
365
|
-
isGateway: false,
|
|
366
|
-
isLocal: true,
|
|
367
|
-
detectByKeyPrefix: "",
|
|
368
|
-
detectByBaseKeyword: "",
|
|
369
|
-
defaultApiBase: "http://127.0.0.1:8000/v1",
|
|
370
|
-
defaultModels: [
|
|
371
|
-
"hosted_vllm/meta-llama/Llama-3.1-8B-Instruct",
|
|
372
|
-
"hosted_vllm/Qwen/Qwen2.5-7B-Instruct"
|
|
373
|
-
],
|
|
374
|
-
stripModelPrefix: false,
|
|
375
|
-
modelOverrides: [],
|
|
376
|
-
logo: "vllm.svg"
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
name: "groq",
|
|
380
|
-
keywords: ["groq"],
|
|
381
|
-
envKey: "GROQ_API_KEY",
|
|
382
|
-
displayName: "Groq",
|
|
383
|
-
modelPrefix: "groq",
|
|
384
|
-
litellmPrefix: "groq",
|
|
385
|
-
skipPrefixes: ["groq/"],
|
|
386
|
-
envExtras: [],
|
|
387
|
-
isGateway: false,
|
|
388
|
-
isLocal: false,
|
|
389
|
-
detectByKeyPrefix: "",
|
|
390
|
-
detectByBaseKeyword: "",
|
|
391
|
-
defaultApiBase: "https://api.groq.com/openai/v1",
|
|
392
|
-
defaultModels: ["groq/openai/gpt-oss-120b", "groq/llama-3.1-8b-instant"],
|
|
393
|
-
stripModelPrefix: false,
|
|
394
|
-
modelOverrides: [],
|
|
395
|
-
logo: "groq.svg"
|
|
396
|
-
}
|
|
397
|
-
]
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
// src/providers/plugins/index.ts
|
|
401
|
-
var BUILTIN_PROVIDER_PLUGINS = [builtinProviderPlugin];
|
|
402
|
-
|
|
403
|
-
// src/providers/index.ts
|
|
404
|
-
var builtinProviderRegistry = new ProviderRegistry(BUILTIN_PROVIDER_PLUGINS);
|
|
405
|
-
function installBuiltinProviderRegistry() {
|
|
406
|
-
setProviderRegistry(builtinProviderRegistry);
|
|
407
|
-
return builtinProviderRegistry;
|
|
408
|
-
}
|
|
409
|
-
function listBuiltinProviderPlugins() {
|
|
410
|
-
return builtinProviderRegistry.listProviderPlugins();
|
|
411
|
-
}
|
|
412
|
-
function listBuiltinProviders() {
|
|
413
|
-
return builtinProviderRegistry.listProviderSpecs();
|
|
414
|
-
}
|
|
415
|
-
function findBuiltinProviderByName(name) {
|
|
416
|
-
return builtinProviderRegistry.findProviderByName(name);
|
|
417
|
-
}
|
|
418
|
-
function builtinProviderIds() {
|
|
419
|
-
return listBuiltinProviders().map((provider) => provider.name);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
// src/channels/builtin.ts
|
|
423
|
-
var BUILTIN_CHANNEL_PLUGIN_IDS = [
|
|
424
|
-
"telegram",
|
|
425
|
-
"whatsapp",
|
|
426
|
-
"discord",
|
|
427
|
-
"feishu",
|
|
428
|
-
"mochat",
|
|
429
|
-
"dingtalk",
|
|
430
|
-
"wecom",
|
|
431
|
-
"email",
|
|
432
|
-
"slack",
|
|
433
|
-
"qq"
|
|
434
|
-
];
|
|
435
|
-
function isBuiltinChannelPluginId(value) {
|
|
436
|
-
return BUILTIN_CHANNEL_PLUGIN_IDS.includes(value);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
// src/index.ts
|
|
440
|
-
installBuiltinProviderRegistry();
|
|
441
|
-
export {
|
|
442
|
-
BUILTIN_CHANNEL_PLUGIN_IDS,
|
|
443
|
-
builtinProviderIds,
|
|
444
|
-
findBuiltinProviderByName,
|
|
445
|
-
installBuiltinProviderRegistry,
|
|
446
|
-
isBuiltinChannelPluginId,
|
|
447
|
-
listBuiltinProviderPlugins,
|
|
448
|
-
listBuiltinProviders
|
|
449
|
-
};
|