@openclaw/baseten-provider 2026.9.7 → 2026.10.1-beta.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/README.md +1 -1
- package/dist/.setup/{models-BmvQ5BVG.mjs → models-BOkRtUeP.mjs} +50 -102
- package/dist/api.js +1 -1
- package/dist/index.js +3 -3
- package/dist/models.js +1 -1
- package/dist/onboard.js +3 -4
- package/dist/provider-catalog.js +1 -2
- package/dist/stream.js +10 -6
- package/dist/thinking.js +13 -1
- package/openclaw.plugin.json +63 -86
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenClaw Baseten Provider
|
|
2
2
|
|
|
3
|
-
Official OpenClaw provider plugin for Baseten Model APIs,
|
|
3
|
+
Official OpenClaw provider plugin for Baseten Model APIs, with DeepSeek V4.1 Flash as the starter model.
|
|
4
4
|
|
|
5
5
|
Install from OpenClaw:
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { buildManifestModelProviderConfig, readManifestProviderDefaultModelRef } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
2
|
-
import { asNonArrayRecord, asPositiveSafeInteger, filterStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
+
import { asNonArrayRecord, asOptionalRecord, asPositiveSafeInteger, filterStringEntries, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/baseten/openclaw.plugin.json
|
|
4
4
|
var openclaw_plugin_default = {
|
|
5
5
|
id: "baseten",
|
|
@@ -18,31 +18,27 @@ var openclaw_plugin_default = {
|
|
|
18
18
|
"providers": { "baseten": {
|
|
19
19
|
"baseUrl": "https://inference.baseten.co/v1",
|
|
20
20
|
"api": "openai-completions",
|
|
21
|
-
"defaultModel": "
|
|
21
|
+
"defaultModel": "deepseek-ai/DeepSeek-V4.1-Flash",
|
|
22
22
|
"models": [
|
|
23
23
|
{
|
|
24
|
-
"id": "deepseek-ai/DeepSeek-V4-
|
|
25
|
-
"name": "DeepSeek V4
|
|
24
|
+
"id": "deepseek-ai/DeepSeek-V4.1-Flash",
|
|
25
|
+
"name": "DeepSeek V4.1 Flash",
|
|
26
26
|
"reasoning": true,
|
|
27
|
-
"input": ["text"],
|
|
28
|
-
"contextWindow":
|
|
29
|
-
"maxTokens":
|
|
27
|
+
"input": ["text", "image"],
|
|
28
|
+
"contextWindow": 1048576,
|
|
29
|
+
"maxTokens": 262144,
|
|
30
30
|
"cost": {
|
|
31
|
-
"input":
|
|
32
|
-
"output":
|
|
33
|
-
"cacheRead": .
|
|
31
|
+
"input": .3,
|
|
32
|
+
"output": 1.2,
|
|
33
|
+
"cacheRead": .007,
|
|
34
34
|
"cacheWrite": 0
|
|
35
35
|
},
|
|
36
36
|
"compat": {
|
|
37
|
-
"codeMode": "capable",
|
|
38
37
|
"supportsReasoningEffort": true,
|
|
39
38
|
"supportedReasoningEfforts": [
|
|
40
39
|
"none",
|
|
41
|
-
"minimal",
|
|
42
40
|
"low",
|
|
43
|
-
"medium",
|
|
44
41
|
"high",
|
|
45
|
-
"xhigh",
|
|
46
42
|
"max"
|
|
47
43
|
],
|
|
48
44
|
"reasoningEffortMap": {
|
|
@@ -53,25 +49,39 @@ var openclaw_plugin_default = {
|
|
|
53
49
|
}
|
|
54
50
|
},
|
|
55
51
|
{
|
|
56
|
-
"id": "
|
|
57
|
-
"name": "
|
|
52
|
+
"id": "deepseek-ai/DeepSeek-V4-Pro-0813",
|
|
53
|
+
"name": "DeepSeek V4 Pro 0813",
|
|
58
54
|
"reasoning": true,
|
|
59
55
|
"input": ["text"],
|
|
60
|
-
"contextWindow":
|
|
61
|
-
"maxTokens":
|
|
56
|
+
"contextWindow": 1048576,
|
|
57
|
+
"maxTokens": 262144,
|
|
62
58
|
"cost": {
|
|
63
|
-
"input": .
|
|
64
|
-
"output":
|
|
65
|
-
"cacheRead": .
|
|
59
|
+
"input": 1.32,
|
|
60
|
+
"output": 3.96,
|
|
61
|
+
"cacheRead": .132,
|
|
66
62
|
"cacheWrite": 0
|
|
63
|
+
},
|
|
64
|
+
"compat": {
|
|
65
|
+
"supportsReasoningEffort": true,
|
|
66
|
+
"supportedReasoningEfforts": [
|
|
67
|
+
"none",
|
|
68
|
+
"low",
|
|
69
|
+
"high",
|
|
70
|
+
"max"
|
|
71
|
+
],
|
|
72
|
+
"reasoningEffortMap": {
|
|
73
|
+
"off": "none",
|
|
74
|
+
"none": "none",
|
|
75
|
+
"adaptive": "max"
|
|
76
|
+
}
|
|
67
77
|
}
|
|
68
78
|
},
|
|
69
79
|
{
|
|
70
80
|
"id": "zai-org/GLM-5.2",
|
|
71
81
|
"name": "GLM 5.2",
|
|
72
82
|
"reasoning": true,
|
|
73
|
-
"input": ["text"],
|
|
74
|
-
"contextWindow":
|
|
83
|
+
"input": ["text", "image"],
|
|
84
|
+
"contextWindow": 1048e3,
|
|
75
85
|
"maxTokens": 262e3,
|
|
76
86
|
"cost": {
|
|
77
87
|
"input": 1.4,
|
|
@@ -102,8 +112,8 @@ var openclaw_plugin_default = {
|
|
|
102
112
|
"id": "zai-org/GLM-5.2-Fast",
|
|
103
113
|
"name": "GLM 5.2 Fast",
|
|
104
114
|
"reasoning": true,
|
|
105
|
-
"input": ["text"],
|
|
106
|
-
"contextWindow":
|
|
115
|
+
"input": ["text", "image"],
|
|
116
|
+
"contextWindow": 1048e3,
|
|
107
117
|
"maxTokens": 262e3,
|
|
108
118
|
"cost": {
|
|
109
119
|
"input": 2.1,
|
|
@@ -129,65 +139,6 @@ var openclaw_plugin_default = {
|
|
|
129
139
|
}
|
|
130
140
|
}
|
|
131
141
|
},
|
|
132
|
-
{
|
|
133
|
-
"id": "thinkingmachines/inkling",
|
|
134
|
-
"name": "Inkling",
|
|
135
|
-
"reasoning": true,
|
|
136
|
-
"input": ["text", "image"],
|
|
137
|
-
"contextWindow": 1048e3,
|
|
138
|
-
"maxTokens": 32e3,
|
|
139
|
-
"cost": {
|
|
140
|
-
"input": 1,
|
|
141
|
-
"output": 4.05,
|
|
142
|
-
"cacheRead": .17,
|
|
143
|
-
"cacheWrite": 0
|
|
144
|
-
},
|
|
145
|
-
"compat": {
|
|
146
|
-
"supportsReasoningEffort": true,
|
|
147
|
-
"supportedReasoningEfforts": [
|
|
148
|
-
"none",
|
|
149
|
-
"minimal",
|
|
150
|
-
"low",
|
|
151
|
-
"medium",
|
|
152
|
-
"high",
|
|
153
|
-
"xhigh",
|
|
154
|
-
"max"
|
|
155
|
-
],
|
|
156
|
-
"reasoningEffortMap": {
|
|
157
|
-
"off": "none",
|
|
158
|
-
"none": "none",
|
|
159
|
-
"adaptive": "max"
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"id": "moonshotai/Kimi-K2.6",
|
|
165
|
-
"name": "Kimi K2.6",
|
|
166
|
-
"reasoning": true,
|
|
167
|
-
"input": ["text", "image"],
|
|
168
|
-
"contextWindow": 262e3,
|
|
169
|
-
"maxTokens": 262e3,
|
|
170
|
-
"cost": {
|
|
171
|
-
"input": .95,
|
|
172
|
-
"output": 4,
|
|
173
|
-
"cacheRead": .16,
|
|
174
|
-
"cacheWrite": 0
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
"id": "moonshotai/Kimi-K2.7-Code",
|
|
179
|
-
"name": "Kimi K2.7 Code",
|
|
180
|
-
"reasoning": true,
|
|
181
|
-
"input": ["text", "image"],
|
|
182
|
-
"contextWindow": 262e3,
|
|
183
|
-
"maxTokens": 262e3,
|
|
184
|
-
"cost": {
|
|
185
|
-
"input": .95,
|
|
186
|
-
"output": 4,
|
|
187
|
-
"cacheRead": .16,
|
|
188
|
-
"cacheWrite": 0
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
142
|
{
|
|
192
143
|
"id": "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B",
|
|
193
144
|
"name": "Nemotron Ultra",
|
|
@@ -212,7 +163,7 @@ var openclaw_plugin_default = {
|
|
|
212
163
|
"cost": {
|
|
213
164
|
"input": .1,
|
|
214
165
|
"output": .5,
|
|
215
|
-
"cacheRead":
|
|
166
|
+
"cacheRead": .1,
|
|
216
167
|
"cacheWrite": 0
|
|
217
168
|
},
|
|
218
169
|
"compat": {
|
|
@@ -249,7 +200,7 @@ var openclaw_plugin_default = {
|
|
|
249
200
|
"choiceLabel": "Baseten API key",
|
|
250
201
|
"groupId": "baseten",
|
|
251
202
|
"groupLabel": "Baseten",
|
|
252
|
-
"groupHint": "Hosted Model APIs
|
|
203
|
+
"groupHint": "Hosted Model APIs",
|
|
253
204
|
"optionKey": "basetenApiKey",
|
|
254
205
|
"cliFlag": "--baseten-api-key",
|
|
255
206
|
"cliOption": "--baseten-api-key <key>",
|
|
@@ -263,9 +214,6 @@ var openclaw_plugin_default = {
|
|
|
263
214
|
};
|
|
264
215
|
//#endregion
|
|
265
216
|
//#region extensions/baseten/models.ts
|
|
266
|
-
/**
|
|
267
|
-
* Baseten model catalog, compat metadata, and live row projection.
|
|
268
|
-
*/
|
|
269
217
|
const BASETEN_MANIFEST_CATALOG = openclaw_plugin_default.modelCatalog.providers.baseten;
|
|
270
218
|
const BASETEN_MODEL_COMPAT = new Map(buildManifestModelProviderConfig({
|
|
271
219
|
providerId: "baseten",
|
|
@@ -289,26 +237,19 @@ const BASE_COMPAT = {
|
|
|
289
237
|
supportsTools: true,
|
|
290
238
|
maxTokensField: "max_tokens"
|
|
291
239
|
};
|
|
292
|
-
/** Base URL for Baseten's OpenAI-compatible Model APIs. */
|
|
293
240
|
const BASETEN_BASE_URL = BASETEN_MANIFEST_CATALOG.baseUrl;
|
|
294
|
-
/** Default Baseten model id used for onboarding. */
|
|
295
241
|
const BASETEN_DEFAULT_MODEL_ID = BASETEN_MANIFEST_CATALOG.defaultModel;
|
|
296
|
-
/** Default Baseten model ref used for onboarding. */
|
|
297
242
|
const BASETEN_DEFAULT_MODEL_REF = readManifestProviderDefaultModelRef(openclaw_plugin_default, "baseten");
|
|
298
|
-
/** Bundled fallback rows for all Baseten Model APIs available at release time. */
|
|
299
243
|
const BASETEN_MODEL_CATALOG = BASETEN_MANIFEST_CATALOG.models;
|
|
300
|
-
/** Whether Baseten requires chat-template thinking control for this model. */
|
|
301
244
|
function usesBasetenChatTemplateThinking(modelId) {
|
|
302
245
|
return CHAT_TEMPLATE_THINKING_MODEL_IDS.has(modelId.trim().toLowerCase());
|
|
303
246
|
}
|
|
304
|
-
/** Complete OpenAI-compatible transport policy for one Baseten model. */
|
|
305
247
|
function buildBasetenModelCompat(modelId) {
|
|
306
248
|
return {
|
|
307
249
|
...BASE_COMPAT,
|
|
308
250
|
...structuredClone(BASETEN_MODEL_COMPAT.get(modelId))
|
|
309
251
|
};
|
|
310
252
|
}
|
|
311
|
-
/** Builds the network-free fallback catalog. */
|
|
312
253
|
function buildStaticBasetenModels() {
|
|
313
254
|
return buildManifestModelProviderConfig({
|
|
314
255
|
providerId: "baseten",
|
|
@@ -333,7 +274,7 @@ function applyLiveReasoningEffortCompat(fallbackCompat, supportsReasoningEffort)
|
|
|
333
274
|
}
|
|
334
275
|
function projectLiveModel(row, fallback) {
|
|
335
276
|
if (row.object !== void 0 && row.object !== "model") return;
|
|
336
|
-
const id =
|
|
277
|
+
const id = normalizeOptionalString(row.id);
|
|
337
278
|
if (!id) return;
|
|
338
279
|
const hasLiveFeatures = Array.isArray(row.supported_features);
|
|
339
280
|
const features = new Set(filterStringEntries(row.supported_features));
|
|
@@ -341,14 +282,20 @@ function projectLiveModel(row, fallback) {
|
|
|
341
282
|
const inputPrice = readPerTokenPrice(pricing.prompt);
|
|
342
283
|
const outputPrice = readPerTokenPrice(pricing.completion);
|
|
343
284
|
const cacheReadPrice = readPerTokenPrice(pricing.input_cache_read);
|
|
344
|
-
const
|
|
285
|
+
const hasDocumentedSparseFeatures = ["deepseek-ai/DeepSeek-V4.1-Flash", "deepseek-ai/DeepSeek-V4-Pro-0813"].includes(id) && [
|
|
286
|
+
"tools",
|
|
287
|
+
"reasoning",
|
|
288
|
+
"json_mode",
|
|
289
|
+
"structured_outputs"
|
|
290
|
+
].every((feature) => features.has(feature));
|
|
345
291
|
const fallbackCompat = fallback?.compat ?? buildBasetenModelCompat(id);
|
|
292
|
+
const supportsReasoningEffort = features.has("reasoning_effort") || hasDocumentedSparseFeatures && fallbackCompat.supportsReasoningEffort === true;
|
|
346
293
|
const compat = hasLiveFeatures ? applyLiveReasoningEffortCompat(fallbackCompat, supportsReasoningEffort) : fallbackCompat;
|
|
347
294
|
return {
|
|
348
295
|
id,
|
|
349
|
-
name:
|
|
296
|
+
name: normalizeOptionalString(row.name) ?? fallback?.name ?? id,
|
|
350
297
|
reasoning: hasLiveFeatures ? features.has("reasoning") || supportsReasoningEffort : fallback?.reasoning ?? false,
|
|
351
|
-
input: hasLiveFeatures ? features.has("vision") ? ["text", "image"] : ["text"] : fallback?.input ?? ["text"],
|
|
298
|
+
input: hasLiveFeatures ? features.has("vision") || hasDocumentedSparseFeatures && fallback?.input.includes("image") ? ["text", "image"] : ["text"] : fallback?.input ?? ["text"],
|
|
352
299
|
cost: {
|
|
353
300
|
input: inputPrice ?? fallback?.cost.input ?? 0,
|
|
354
301
|
output: outputPrice ?? fallback?.cost.output ?? 0,
|
|
@@ -365,8 +312,9 @@ function projectBasetenLiveModels(rows) {
|
|
|
365
312
|
const fallbacks = new Map(buildStaticBasetenModels().map((model) => [model.id, model]));
|
|
366
313
|
const seen = /* @__PURE__ */ new Set();
|
|
367
314
|
const models = [];
|
|
368
|
-
for (const
|
|
369
|
-
|
|
315
|
+
for (const value of rows) {
|
|
316
|
+
const row = asOptionalRecord(value);
|
|
317
|
+
if (!row) continue;
|
|
370
318
|
const model = projectLiveModel(row, fallbacks.get(String(row.id)));
|
|
371
319
|
if (!model || seen.has(model.id)) continue;
|
|
372
320
|
seen.add(model.id);
|
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as buildBasetenModelCompat, c as resolveBasetenDynamicModel, i as BASETEN_MODEL_CATALOG, l as usesBasetenChatTemplateThinking, n as BASETEN_DEFAULT_MODEL_ID, o as buildStaticBasetenModels, r as BASETEN_DEFAULT_MODEL_REF, t as BASETEN_BASE_URL } from "./.setup/models-
|
|
1
|
+
import { a as buildBasetenModelCompat, c as resolveBasetenDynamicModel, i as BASETEN_MODEL_CATALOG, l as usesBasetenChatTemplateThinking, n as BASETEN_DEFAULT_MODEL_ID, o as buildStaticBasetenModels, r as BASETEN_DEFAULT_MODEL_REF, t as BASETEN_BASE_URL } from "./.setup/models-BOkRtUeP.mjs";
|
|
2
2
|
import { applyBasetenConfig } from "./onboard.js";
|
|
3
3
|
import { buildStaticBasetenProvider } from "./provider-catalog.js";
|
|
4
4
|
export { BASETEN_BASE_URL, BASETEN_DEFAULT_MODEL_ID, BASETEN_DEFAULT_MODEL_REF, BASETEN_MODEL_CATALOG, applyBasetenConfig, buildBasetenModelCompat, buildStaticBasetenModels, buildStaticBasetenProvider, resolveBasetenDynamicModel, usesBasetenChatTemplateThinking };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as resolveBasetenDynamicModel, s as projectBasetenLiveModels, u as openclaw_plugin_default } from "./.setup/models-
|
|
1
|
+
import { c as resolveBasetenDynamicModel, s as projectBasetenLiveModels, u as openclaw_plugin_default } from "./.setup/models-BOkRtUeP.mjs";
|
|
2
2
|
import { applyBasetenSetupConfig } from "./onboard.js";
|
|
3
3
|
import { buildStaticBasetenProvider } from "./provider-catalog.js";
|
|
4
4
|
import { createBasetenThinkingWrapper } from "./stream.js";
|
|
@@ -7,7 +7,6 @@ import { buildOpenAICompatibleLiveProviderCatalog } from "openclaw/plugin-sdk/pr
|
|
|
7
7
|
import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
|
|
8
8
|
import { buildProviderReplayFamilyHooks } from "openclaw/plugin-sdk/provider-model-shared";
|
|
9
9
|
//#region extensions/baseten/index.ts
|
|
10
|
-
/** Baseten provider plugin entrypoint. */
|
|
11
10
|
const PROVIDER_ID = "baseten";
|
|
12
11
|
var baseten_default = defineSingleProviderPluginEntry({
|
|
13
12
|
id: PROVIDER_ID,
|
|
@@ -19,8 +18,9 @@ var baseten_default = defineSingleProviderPluginEntry({
|
|
|
19
18
|
docsPath: "/providers/baseten",
|
|
20
19
|
manifestAuth: {
|
|
21
20
|
applyConfig: applyBasetenSetupConfig,
|
|
21
|
+
preserveExistingPrimary: true,
|
|
22
22
|
noteTitle: "Baseten",
|
|
23
|
-
noteMessage: ["Baseten hosts
|
|
23
|
+
noteMessage: ["Baseten hosts DeepSeek V4.1 Flash and other models behind one OpenAI-compatible API.", "Get your API key at: https://app.baseten.co/settings/api_keys"].join("\n")
|
|
24
24
|
},
|
|
25
25
|
catalog: {
|
|
26
26
|
order: "simple",
|
package/dist/models.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as buildBasetenModelCompat, c as resolveBasetenDynamicModel, i as BASETEN_MODEL_CATALOG, l as usesBasetenChatTemplateThinking, n as BASETEN_DEFAULT_MODEL_ID, o as buildStaticBasetenModels, r as BASETEN_DEFAULT_MODEL_REF, s as projectBasetenLiveModels, t as BASETEN_BASE_URL } from "./.setup/models-
|
|
1
|
+
import { a as buildBasetenModelCompat, c as resolveBasetenDynamicModel, i as BASETEN_MODEL_CATALOG, l as usesBasetenChatTemplateThinking, n as BASETEN_DEFAULT_MODEL_ID, o as buildStaticBasetenModels, r as BASETEN_DEFAULT_MODEL_REF, s as projectBasetenLiveModels, t as BASETEN_BASE_URL } from "./.setup/models-BOkRtUeP.mjs";
|
|
2
2
|
export { BASETEN_BASE_URL, BASETEN_DEFAULT_MODEL_ID, BASETEN_DEFAULT_MODEL_REF, BASETEN_MODEL_CATALOG, buildBasetenModelCompat, buildStaticBasetenModels, projectBasetenLiveModels, resolveBasetenDynamicModel, usesBasetenChatTemplateThinking };
|
package/dist/onboard.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { o as buildStaticBasetenModels, r as BASETEN_DEFAULT_MODEL_REF, t as BASETEN_BASE_URL } from "./.setup/models-
|
|
1
|
+
import { o as buildStaticBasetenModels, r as BASETEN_DEFAULT_MODEL_REF, t as BASETEN_BASE_URL } from "./.setup/models-BOkRtUeP.mjs";
|
|
2
2
|
import { createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
|
|
3
3
|
//#region extensions/baseten/onboard.ts
|
|
4
|
-
/** Baseten onboarding config helpers. */
|
|
5
4
|
const { applyConfig } = createModelCatalogPresetAppliers({
|
|
6
5
|
primaryModelRef: BASETEN_DEFAULT_MODEL_REF,
|
|
7
6
|
resolveParams: (_cfg, catalogModels) => ({
|
|
@@ -11,11 +10,11 @@ const { applyConfig } = createModelCatalogPresetAppliers({
|
|
|
11
10
|
catalogModels,
|
|
12
11
|
aliases: [{
|
|
13
12
|
modelRef: BASETEN_DEFAULT_MODEL_REF,
|
|
14
|
-
alias: "
|
|
13
|
+
alias: "DeepSeek V4.1 Flash"
|
|
15
14
|
}]
|
|
16
15
|
})
|
|
17
16
|
});
|
|
18
|
-
/** Applies Baseten's provider catalog
|
|
17
|
+
/** Applies Baseten's provider catalog and starter model without replacing an explicit primary. */
|
|
19
18
|
const applyBasetenConfig = (cfg) => applyConfig(cfg, buildStaticBasetenModels());
|
|
20
19
|
const applyBasetenSetupConfig = (cfg) => applyConfig(cfg, cfg.models?.mode === "replace" ? buildStaticBasetenModels() : []);
|
|
21
20
|
//#endregion
|
package/dist/provider-catalog.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { o as buildStaticBasetenModels, t as BASETEN_BASE_URL } from "./.setup/models-
|
|
1
|
+
import { o as buildStaticBasetenModels, t as BASETEN_BASE_URL } from "./.setup/models-BOkRtUeP.mjs";
|
|
2
2
|
//#region extensions/baseten/provider-catalog.ts
|
|
3
|
-
/** Builds Baseten's network-free fallback provider catalog. */
|
|
4
3
|
function buildStaticBasetenProvider() {
|
|
5
4
|
return {
|
|
6
5
|
baseUrl: BASETEN_BASE_URL,
|
package/dist/stream.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as usesBasetenChatTemplateThinking } from "./.setup/models-
|
|
1
|
+
import { l as usesBasetenChatTemplateThinking } from "./.setup/models-BOkRtUeP.mjs";
|
|
2
2
|
import { asNonArrayRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { streamSimple } from "openclaw/plugin-sdk/llm";
|
|
4
4
|
import { normalizeOpenAICompatibleReasoningReplay, streamWithPayloadPatch } from "openclaw/plugin-sdk/provider-stream-shared";
|
|
@@ -15,11 +15,15 @@ function createBasetenThinkingWrapper(ctx) {
|
|
|
15
15
|
...options,
|
|
16
16
|
reasoning: thinkingLevel
|
|
17
17
|
}, (payload) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
const normalizedModelId = model.id.trim().toLowerCase();
|
|
19
|
+
if (normalizedModelId === "deepseek-ai/deepseek-v4-pro" || normalizedModelId === "deepseek-ai/deepseek-v4-pro-0813") {
|
|
20
|
+
normalizeOpenAICompatibleReasoningReplay(payload, {
|
|
21
|
+
thinkingEnabled: thinkingLevel !== "off",
|
|
22
|
+
stripAssistantMessagesOnly: true,
|
|
23
|
+
replaceNullReasoningContent: true
|
|
24
|
+
});
|
|
25
|
+
if (normalizedModelId === "deepseek-ai/deepseek-v4-pro-0813" && payload.reasoning_effort !== void 0) payload.thinking = { type: "enabled" };
|
|
26
|
+
}
|
|
23
27
|
if (optIn) payload.chat_template_args = {
|
|
24
28
|
...asNonArrayRecord(payload.chat_template_args),
|
|
25
29
|
enable_thinking: thinkingLevel !== "off"
|
package/dist/thinking.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as usesBasetenChatTemplateThinking } from "./.setup/models-
|
|
1
|
+
import { l as usesBasetenChatTemplateThinking } from "./.setup/models-BOkRtUeP.mjs";
|
|
2
2
|
//#region extensions/baseten/thinking.ts
|
|
3
3
|
const BASETEN_BINARY_THINKING_PROFILE = {
|
|
4
4
|
levels: [{ id: "off" }, {
|
|
@@ -15,9 +15,21 @@ const BASETEN_GLM_52_THINKING_PROFILE = {
|
|
|
15
15
|
],
|
|
16
16
|
defaultLevel: "off"
|
|
17
17
|
};
|
|
18
|
+
const BASETEN_DEEPSEEK_THINKING_PROFILE = { levels: [
|
|
19
|
+
{ id: "off" },
|
|
20
|
+
{ id: "low" },
|
|
21
|
+
{ id: "high" },
|
|
22
|
+
{ id: "max" }
|
|
23
|
+
] };
|
|
24
|
+
const BASETEN_DEEPSEEK_V41_THINKING_PROFILE = {
|
|
25
|
+
...BASETEN_DEEPSEEK_THINKING_PROFILE,
|
|
26
|
+
defaultLevel: "high"
|
|
27
|
+
};
|
|
18
28
|
/** Exposes only the thinking levels that Baseten actually accepts for opt-in models. */
|
|
19
29
|
function resolveBasetenThinkingProfile(modelId) {
|
|
20
30
|
const normalized = modelId.trim().toLowerCase();
|
|
31
|
+
if (normalized === "deepseek-ai/deepseek-v4.1-flash") return BASETEN_DEEPSEEK_V41_THINKING_PROFILE;
|
|
32
|
+
if (normalized === "deepseek-ai/deepseek-v4-pro-0813") return BASETEN_DEEPSEEK_THINKING_PROFILE;
|
|
21
33
|
if (normalized === "zai-org/glm-5.2" || normalized === "zai-org/glm-5.2-fast") return BASETEN_GLM_52_THINKING_PROFILE;
|
|
22
34
|
return usesBasetenChatTemplateThinking(normalized) ? BASETEN_BINARY_THINKING_PROFILE : void 0;
|
|
23
35
|
}
|
package/openclaw.plugin.json
CHANGED
|
@@ -28,44 +28,55 @@
|
|
|
28
28
|
"baseten": {
|
|
29
29
|
"baseUrl": "https://inference.baseten.co/v1",
|
|
30
30
|
"api": "openai-completions",
|
|
31
|
-
"defaultModel": "
|
|
31
|
+
"defaultModel": "deepseek-ai/DeepSeek-V4.1-Flash",
|
|
32
32
|
"models": [
|
|
33
33
|
{
|
|
34
|
-
"id": "deepseek-ai/DeepSeek-V4-
|
|
35
|
-
"name": "DeepSeek V4
|
|
34
|
+
"id": "deepseek-ai/DeepSeek-V4.1-Flash",
|
|
35
|
+
"name": "DeepSeek V4.1 Flash",
|
|
36
36
|
"reasoning": true,
|
|
37
|
-
"input": [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"contextWindow": 262000,
|
|
41
|
-
"maxTokens": 262000,
|
|
37
|
+
"input": ["text", "image"],
|
|
38
|
+
"contextWindow": 1048576,
|
|
39
|
+
"maxTokens": 262144,
|
|
42
40
|
"cost": {
|
|
43
|
-
"input":
|
|
44
|
-
"output":
|
|
45
|
-
"cacheRead": 0.
|
|
41
|
+
"input": 0.3,
|
|
42
|
+
"output": 1.2,
|
|
43
|
+
"cacheRead": 0.007,
|
|
46
44
|
"cacheWrite": 0
|
|
47
45
|
},
|
|
48
46
|
"compat": {
|
|
49
|
-
"codeMode": "capable",
|
|
50
47
|
"supportsReasoningEffort": true,
|
|
51
|
-
"supportedReasoningEfforts": ["none", "
|
|
48
|
+
"supportedReasoningEfforts": ["none", "low", "high", "max"],
|
|
52
49
|
"reasoningEffortMap": { "off": "none", "none": "none", "adaptive": "max" }
|
|
53
50
|
}
|
|
54
51
|
},
|
|
55
52
|
{
|
|
56
|
-
"id": "
|
|
57
|
-
"name": "
|
|
53
|
+
"id": "deepseek-ai/DeepSeek-V4-Pro-0813",
|
|
54
|
+
"name": "DeepSeek V4 Pro 0813",
|
|
58
55
|
"reasoning": true,
|
|
59
56
|
"input": [
|
|
60
57
|
"text"
|
|
61
58
|
],
|
|
62
|
-
"contextWindow":
|
|
63
|
-
"maxTokens":
|
|
59
|
+
"contextWindow": 1048576,
|
|
60
|
+
"maxTokens": 262144,
|
|
64
61
|
"cost": {
|
|
65
|
-
"input":
|
|
66
|
-
"output":
|
|
67
|
-
"cacheRead": 0.
|
|
62
|
+
"input": 1.32,
|
|
63
|
+
"output": 3.96,
|
|
64
|
+
"cacheRead": 0.132,
|
|
68
65
|
"cacheWrite": 0
|
|
66
|
+
},
|
|
67
|
+
"compat": {
|
|
68
|
+
"supportsReasoningEffort": true,
|
|
69
|
+
"supportedReasoningEfforts": [
|
|
70
|
+
"none",
|
|
71
|
+
"low",
|
|
72
|
+
"high",
|
|
73
|
+
"max"
|
|
74
|
+
],
|
|
75
|
+
"reasoningEffortMap": {
|
|
76
|
+
"off": "none",
|
|
77
|
+
"none": "none",
|
|
78
|
+
"adaptive": "max"
|
|
79
|
+
}
|
|
69
80
|
}
|
|
70
81
|
},
|
|
71
82
|
{
|
|
@@ -73,9 +84,10 @@
|
|
|
73
84
|
"name": "GLM 5.2",
|
|
74
85
|
"reasoning": true,
|
|
75
86
|
"input": [
|
|
76
|
-
"text"
|
|
87
|
+
"text",
|
|
88
|
+
"image"
|
|
77
89
|
],
|
|
78
|
-
"contextWindow":
|
|
90
|
+
"contextWindow": 1048000,
|
|
79
91
|
"maxTokens": 262000,
|
|
80
92
|
"cost": {
|
|
81
93
|
"input": 1.4,
|
|
@@ -86,7 +98,11 @@
|
|
|
86
98
|
"compat": {
|
|
87
99
|
"codeMode": "capable",
|
|
88
100
|
"supportsReasoningEffort": true,
|
|
89
|
-
"supportedReasoningEfforts": [
|
|
101
|
+
"supportedReasoningEfforts": [
|
|
102
|
+
"none",
|
|
103
|
+
"high",
|
|
104
|
+
"max"
|
|
105
|
+
],
|
|
90
106
|
"reasoningEffortMap": {
|
|
91
107
|
"off": "none",
|
|
92
108
|
"none": "none",
|
|
@@ -103,9 +119,10 @@
|
|
|
103
119
|
"name": "GLM 5.2 Fast",
|
|
104
120
|
"reasoning": true,
|
|
105
121
|
"input": [
|
|
106
|
-
"text"
|
|
122
|
+
"text",
|
|
123
|
+
"image"
|
|
107
124
|
],
|
|
108
|
-
"contextWindow":
|
|
125
|
+
"contextWindow": 1048000,
|
|
109
126
|
"maxTokens": 262000,
|
|
110
127
|
"cost": {
|
|
111
128
|
"input": 2.1,
|
|
@@ -115,7 +132,11 @@
|
|
|
115
132
|
},
|
|
116
133
|
"compat": {
|
|
117
134
|
"supportsReasoningEffort": true,
|
|
118
|
-
"supportedReasoningEfforts": [
|
|
135
|
+
"supportedReasoningEfforts": [
|
|
136
|
+
"none",
|
|
137
|
+
"high",
|
|
138
|
+
"max"
|
|
139
|
+
],
|
|
119
140
|
"reasoningEffortMap": {
|
|
120
141
|
"off": "none",
|
|
121
142
|
"none": "none",
|
|
@@ -127,62 +148,6 @@
|
|
|
127
148
|
}
|
|
128
149
|
}
|
|
129
150
|
},
|
|
130
|
-
{
|
|
131
|
-
"id": "thinkingmachines/inkling",
|
|
132
|
-
"name": "Inkling",
|
|
133
|
-
"reasoning": true,
|
|
134
|
-
"input": [
|
|
135
|
-
"text",
|
|
136
|
-
"image"
|
|
137
|
-
],
|
|
138
|
-
"contextWindow": 1048000,
|
|
139
|
-
"maxTokens": 32000,
|
|
140
|
-
"cost": {
|
|
141
|
-
"input": 1,
|
|
142
|
-
"output": 4.05,
|
|
143
|
-
"cacheRead": 0.17,
|
|
144
|
-
"cacheWrite": 0
|
|
145
|
-
},
|
|
146
|
-
"compat": {
|
|
147
|
-
"supportsReasoningEffort": true,
|
|
148
|
-
"supportedReasoningEfforts": ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
|
|
149
|
-
"reasoningEffortMap": { "off": "none", "none": "none", "adaptive": "max" }
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"id": "moonshotai/Kimi-K2.6",
|
|
154
|
-
"name": "Kimi K2.6",
|
|
155
|
-
"reasoning": true,
|
|
156
|
-
"input": [
|
|
157
|
-
"text",
|
|
158
|
-
"image"
|
|
159
|
-
],
|
|
160
|
-
"contextWindow": 262000,
|
|
161
|
-
"maxTokens": 262000,
|
|
162
|
-
"cost": {
|
|
163
|
-
"input": 0.95,
|
|
164
|
-
"output": 4,
|
|
165
|
-
"cacheRead": 0.16,
|
|
166
|
-
"cacheWrite": 0
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
"id": "moonshotai/Kimi-K2.7-Code",
|
|
171
|
-
"name": "Kimi K2.7 Code",
|
|
172
|
-
"reasoning": true,
|
|
173
|
-
"input": [
|
|
174
|
-
"text",
|
|
175
|
-
"image"
|
|
176
|
-
],
|
|
177
|
-
"contextWindow": 262000,
|
|
178
|
-
"maxTokens": 262000,
|
|
179
|
-
"cost": {
|
|
180
|
-
"input": 0.95,
|
|
181
|
-
"output": 4,
|
|
182
|
-
"cacheRead": 0.16,
|
|
183
|
-
"cacheWrite": 0
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
151
|
{
|
|
187
152
|
"id": "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B",
|
|
188
153
|
"name": "Nemotron Ultra",
|
|
@@ -211,13 +176,25 @@
|
|
|
211
176
|
"cost": {
|
|
212
177
|
"input": 0.1,
|
|
213
178
|
"output": 0.5,
|
|
214
|
-
"cacheRead": 0,
|
|
179
|
+
"cacheRead": 0.1,
|
|
215
180
|
"cacheWrite": 0
|
|
216
181
|
},
|
|
217
182
|
"compat": {
|
|
218
183
|
"supportsReasoningEffort": true,
|
|
219
|
-
"supportedReasoningEfforts": [
|
|
220
|
-
|
|
184
|
+
"supportedReasoningEfforts": [
|
|
185
|
+
"none",
|
|
186
|
+
"minimal",
|
|
187
|
+
"low",
|
|
188
|
+
"medium",
|
|
189
|
+
"high",
|
|
190
|
+
"xhigh",
|
|
191
|
+
"max"
|
|
192
|
+
],
|
|
193
|
+
"reasoningEffortMap": {
|
|
194
|
+
"off": "none",
|
|
195
|
+
"none": "none",
|
|
196
|
+
"adaptive": "max"
|
|
197
|
+
}
|
|
221
198
|
}
|
|
222
199
|
}
|
|
223
200
|
]
|
|
@@ -246,7 +223,7 @@
|
|
|
246
223
|
"choiceLabel": "Baseten API key",
|
|
247
224
|
"groupId": "baseten",
|
|
248
225
|
"groupLabel": "Baseten",
|
|
249
|
-
"groupHint": "Hosted Model APIs
|
|
226
|
+
"groupHint": "Hosted Model APIs",
|
|
250
227
|
"optionKey": "basetenApiKey",
|
|
251
228
|
"cliFlag": "--baseten-api-key",
|
|
252
229
|
"cliOption": "--baseten-api-key <key>",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/baseten-provider",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.10.1-beta.1",
|
|
4
4
|
"description": "OpenClaw Baseten provider plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"minHostVersion": ">=2026.7.2"
|
|
19
19
|
},
|
|
20
20
|
"compat": {
|
|
21
|
-
"pluginApi": ">=2026.
|
|
21
|
+
"pluginApi": ">=2026.10.1-beta.1"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.
|
|
24
|
+
"openclawVersion": "2026.10.1-beta.1",
|
|
25
25
|
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"assets/activity.svg"
|
|
41
41
|
],
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"openclaw": ">=2026.
|
|
43
|
+
"openclaw": ">=2026.10.1-beta.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
46
46
|
"openclaw": {
|