@openclaw/baseten-provider 2026.9.4 → 2026.9.5

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.
@@ -0,0 +1,32 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2
+ <!--
3
+ Adapted from OpenClaw ui/public/provider-icons/ProviderIcon-baseten.svg.
4
+ Source: @lobehub/icons-static-svg@1.94.0, baseten.svg
5
+ https://www.npmjs.com/package/@lobehub/icons-static-svg/v/1.94.0
6
+ https://github.com/lobehub/lobe-icons
7
+
8
+ MIT License
9
+ Copyright (c) 2023 LobeHub
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+
29
+ Names and marks remain the property of their respective owners.
30
+ -->
31
+ <path fill="currentColor" fill-rule="evenodd" stroke="none" d="M2.316 4.8h14.682v4.8H7.31a.302.302 0 00-.308.3v4.2c0 .171.14.3.308.3h9.688v4.8h-4.686a.302.302 0 00-.308.3v4.2c0 .171.141.3.308.3h4.378a.297.297 0 00.308-.3v-4.5h4.694a.302.302 0 00.308-.3v-4.2c0-.171-.14-.3-.308-.3h-4.694V9.6h4.694A.302.302 0 0022 9.3V5.1c0-.171-.14-.3-.308-.3h-4.694V.3c0-.171-.14-.3-.308-.3H2.316A.31.31 0 002 .3v4.2c0 .171.14.3.316.3z" />
32
+ </svg>
Binary file
@@ -33,7 +33,24 @@ var openclaw_plugin_default = {
33
33
  "cacheRead": .145,
34
34
  "cacheWrite": 0
35
35
  },
36
- "compat": { "codeMode": "capable" }
36
+ "compat": {
37
+ "codeMode": "capable",
38
+ "supportsReasoningEffort": true,
39
+ "supportedReasoningEfforts": [
40
+ "none",
41
+ "minimal",
42
+ "low",
43
+ "medium",
44
+ "high",
45
+ "xhigh",
46
+ "max"
47
+ ],
48
+ "reasoningEffortMap": {
49
+ "off": "none",
50
+ "none": "none",
51
+ "adaptive": "max"
52
+ }
53
+ }
37
54
  },
38
55
  {
39
56
  "id": "zai-org/GLM-4.7",
@@ -62,7 +79,24 @@ var openclaw_plugin_default = {
62
79
  "cacheRead": .14,
63
80
  "cacheWrite": 0
64
81
  },
65
- "compat": { "codeMode": "capable" }
82
+ "compat": {
83
+ "codeMode": "capable",
84
+ "supportsReasoningEffort": true,
85
+ "supportedReasoningEfforts": [
86
+ "none",
87
+ "high",
88
+ "max"
89
+ ],
90
+ "reasoningEffortMap": {
91
+ "off": "none",
92
+ "none": "none",
93
+ "minimal": "high",
94
+ "low": "high",
95
+ "medium": "high",
96
+ "xhigh": "high",
97
+ "adaptive": "max"
98
+ }
99
+ }
66
100
  },
67
101
  {
68
102
  "id": "zai-org/GLM-5.2-Fast",
@@ -76,6 +110,23 @@ var openclaw_plugin_default = {
76
110
  "output": 6.6,
77
111
  "cacheRead": .21,
78
112
  "cacheWrite": 0
113
+ },
114
+ "compat": {
115
+ "supportsReasoningEffort": true,
116
+ "supportedReasoningEfforts": [
117
+ "none",
118
+ "high",
119
+ "max"
120
+ ],
121
+ "reasoningEffortMap": {
122
+ "off": "none",
123
+ "none": "none",
124
+ "minimal": "high",
125
+ "low": "high",
126
+ "medium": "high",
127
+ "xhigh": "high",
128
+ "adaptive": "max"
129
+ }
79
130
  }
80
131
  },
81
132
  {
@@ -90,6 +141,23 @@ var openclaw_plugin_default = {
90
141
  "output": 4.05,
91
142
  "cacheRead": .17,
92
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
+ }
93
161
  }
94
162
  },
95
163
  {
@@ -146,6 +214,23 @@ var openclaw_plugin_default = {
146
214
  "output": .5,
147
215
  "cacheRead": 0,
148
216
  "cacheWrite": 0
217
+ },
218
+ "compat": {
219
+ "supportsReasoningEffort": true,
220
+ "supportedReasoningEfforts": [
221
+ "none",
222
+ "minimal",
223
+ "low",
224
+ "medium",
225
+ "high",
226
+ "xhigh",
227
+ "max"
228
+ ],
229
+ "reasoningEffortMap": {
230
+ "off": "none",
231
+ "none": "none",
232
+ "adaptive": "max"
233
+ }
149
234
  }
150
235
  }
151
236
  ]
@@ -182,6 +267,10 @@ var openclaw_plugin_default = {
182
267
  * Baseten model catalog, compat metadata, and live row projection.
183
268
  */
184
269
  const BASETEN_MANIFEST_CATALOG = openclaw_plugin_default.modelCatalog.providers.baseten;
270
+ const BASETEN_MODEL_COMPAT = new Map(buildManifestModelProviderConfig({
271
+ providerId: "baseten",
272
+ catalog: BASETEN_MANIFEST_CATALOG
273
+ }).models.map(({ id, compat }) => [id, compat]));
185
274
  const DEFAULT_CONTEXT_WINDOW = 128e3;
186
275
  const DEFAULT_MAX_TOKENS = 8192;
187
276
  const CHAT_TEMPLATE_THINKING_MODEL_IDS = /* @__PURE__ */ new Set([
@@ -192,16 +281,6 @@ const CHAT_TEMPLATE_THINKING_MODEL_IDS = /* @__PURE__ */ new Set([
192
281
  "moonshotai/kimi-k2.7-code",
193
282
  "nvidia/nvidia-nemotron-3-ultra-550b-a55b"
194
283
  ]);
195
- const FULL_REASONING_EFFORT_MODEL_IDS = /* @__PURE__ */ new Set(["deepseek-ai/DeepSeek-V4-Pro", "openai/gpt-oss-120b"]);
196
- const INKLING_REASONING_EFFORTS = [
197
- "none",
198
- "minimal",
199
- "low",
200
- "medium",
201
- "high",
202
- "xhigh"
203
- ];
204
- const FULL_REASONING_EFFORTS = [...INKLING_REASONING_EFFORTS, "max"];
205
284
  const BASE_COMPAT = {
206
285
  supportsStore: false,
207
286
  supportsDeveloperRole: false,
@@ -222,50 +301,11 @@ const BASETEN_MODEL_CATALOG = BASETEN_MANIFEST_CATALOG.models;
222
301
  function usesBasetenChatTemplateThinking(modelId) {
223
302
  return CHAT_TEMPLATE_THINKING_MODEL_IDS.has(modelId.trim().toLowerCase());
224
303
  }
225
- function buildBasetenReasoningCompat(modelId) {
226
- if (FULL_REASONING_EFFORT_MODEL_IDS.has(modelId)) return {
227
- supportsReasoningEffort: true,
228
- supportedReasoningEfforts: FULL_REASONING_EFFORTS,
229
- reasoningEffortMap: {
230
- off: "none",
231
- none: "none",
232
- adaptive: "max"
233
- }
234
- };
235
- if (modelId === BASETEN_DEFAULT_MODEL_ID) return {
236
- supportsReasoningEffort: true,
237
- supportedReasoningEfforts: INKLING_REASONING_EFFORTS,
238
- reasoningEffortMap: {
239
- off: "none",
240
- none: "none",
241
- adaptive: "xhigh",
242
- max: "xhigh"
243
- }
244
- };
245
- if (modelId === "zai-org/GLM-5.2" || modelId === "zai-org/GLM-5.2-Fast") return {
246
- supportsReasoningEffort: true,
247
- supportedReasoningEfforts: [
248
- "none",
249
- "high",
250
- "max"
251
- ],
252
- reasoningEffortMap: {
253
- off: "none",
254
- none: "none",
255
- minimal: "high",
256
- low: "high",
257
- medium: "high",
258
- xhigh: "high",
259
- adaptive: "max"
260
- }
261
- };
262
- return {};
263
- }
264
304
  /** Complete OpenAI-compatible transport policy for one Baseten model. */
265
305
  function buildBasetenModelCompat(modelId) {
266
306
  return {
267
307
  ...BASE_COMPAT,
268
- ...buildBasetenReasoningCompat(modelId)
308
+ ...structuredClone(BASETEN_MODEL_COMPAT.get(modelId))
269
309
  };
270
310
  }
271
311
  /** Builds the network-free fallback catalog. */
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 "./models-CUyzLrPr.js";
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-CwKDnNIj.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 "./models-CUyzLrPr.js";
1
+ import { c as resolveBasetenDynamicModel, s as projectBasetenLiveModels, u as openclaw_plugin_default } from "./.setup/models-CwKDnNIj.mjs";
2
2
  import { applyBasetenSetupConfig } from "./onboard.js";
3
3
  import { buildStaticBasetenProvider } from "./provider-catalog.js";
4
4
  import { createBasetenThinkingWrapper } from "./stream.js";
@@ -52,7 +52,8 @@ var baseten_default = defineSingleProviderPluginEntry({
52
52
  family: "openai-compatible",
53
53
  dropReasoningFromHistory: false
54
54
  }),
55
- wrapStreamFn: (ctx) => createBasetenThinkingWrapper(ctx),
55
+ wrapStreamFn: createBasetenThinkingWrapper,
56
+ wrapSimpleCompletionStreamFn: createBasetenThinkingWrapper,
56
57
  resolveThinkingProfile: ({ modelId }) => resolveBasetenThinkingProfile(modelId),
57
58
  isModernModelRef: () => true
58
59
  }
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 "./models-CUyzLrPr.js";
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-CwKDnNIj.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,4 +1,4 @@
1
- import { o as buildStaticBasetenModels, r as BASETEN_DEFAULT_MODEL_REF, t as BASETEN_BASE_URL } from "./models-CUyzLrPr.js";
1
+ import { o as buildStaticBasetenModels, r as BASETEN_DEFAULT_MODEL_REF, t as BASETEN_BASE_URL } from "./.setup/models-CwKDnNIj.mjs";
2
2
  import { createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
3
3
  //#region extensions/baseten/onboard.ts
4
4
  /** Baseten onboarding config helpers. */
@@ -1,4 +1,4 @@
1
- import { o as buildStaticBasetenModels, t as BASETEN_BASE_URL } from "./models-CUyzLrPr.js";
1
+ import { o as buildStaticBasetenModels, t as BASETEN_BASE_URL } from "./.setup/models-CwKDnNIj.mjs";
2
2
  //#region extensions/baseten/provider-catalog.ts
3
3
  /** Builds Baseten's network-free fallback provider catalog. */
4
4
  function buildStaticBasetenProvider() {
package/dist/stream.js CHANGED
@@ -1,29 +1,31 @@
1
- import { l as usesBasetenChatTemplateThinking } from "./models-CUyzLrPr.js";
1
+ import { l as usesBasetenChatTemplateThinking } from "./.setup/models-CwKDnNIj.mjs";
2
2
  import { asNonArrayRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
3
- import { createPayloadPatchStreamWrapper, normalizeOpenAICompatibleReasoningReplay } from "openclaw/plugin-sdk/provider-stream-shared";
3
+ import { streamSimple } from "openclaw/plugin-sdk/llm";
4
+ import { normalizeOpenAICompatibleReasoningReplay, streamWithPayloadPatch } from "openclaw/plugin-sdk/provider-stream-shared";
4
5
  //#region extensions/baseten/stream.ts
5
- const BASETEN_DEEPSEEK_V4_MODEL_ID = "deepseek-ai/deepseek-v4-pro";
6
- function isThinkingEnabled(level) {
7
- return level !== void 0 && level !== "off";
8
- }
9
- function isBasetenDeepSeekV4ModelId(modelId) {
10
- return modelId.trim().toLowerCase() === BASETEN_DEEPSEEK_V4_MODEL_ID;
11
- }
6
+ /** Baseten request payload policy for models with opt-in chat-template reasoning. */
12
7
  /** Adds Baseten's `chat_template_args.enable_thinking` without dropping caller args. */
13
8
  function createBasetenThinkingWrapper(ctx) {
14
- return createPayloadPatchStreamWrapper(ctx.streamFn, ({ payload, model }) => {
15
- if (model.provider !== "baseten" || model.api !== "openai-completions") return;
16
- if (isBasetenDeepSeekV4ModelId(model.id)) normalizeOpenAICompatibleReasoningReplay(payload, {
17
- thinkingEnabled: ctx.thinkingLevel !== "off",
18
- stripAssistantMessagesOnly: true,
19
- replaceNullReasoningContent: true
9
+ const underlying = ctx.streamFn ?? streamSimple;
10
+ return (model, context, options) => {
11
+ if (model.provider !== "baseten" || (ctx.sourceApi ?? model.api) !== "openai-completions") return underlying(model, context, options);
12
+ const optIn = usesBasetenChatTemplateThinking(model.id);
13
+ const thinkingLevel = options?.reasoning ?? (ctx.thinkingLevel === "adaptive" ? "max" : ctx.thinkingLevel) ?? (optIn ? "off" : void 0);
14
+ return streamWithPayloadPatch(underlying, model, context, thinkingLevel === void 0 ? options : {
15
+ ...options,
16
+ reasoning: thinkingLevel
17
+ }, (payload) => {
18
+ if (model.id.trim().toLowerCase() === "deepseek-ai/deepseek-v4-pro") normalizeOpenAICompatibleReasoningReplay(payload, {
19
+ thinkingEnabled: thinkingLevel !== "off",
20
+ stripAssistantMessagesOnly: true,
21
+ replaceNullReasoningContent: true
22
+ });
23
+ if (optIn) payload.chat_template_args = {
24
+ ...asNonArrayRecord(payload.chat_template_args),
25
+ enable_thinking: thinkingLevel !== "off"
26
+ };
20
27
  });
21
- if (!usesBasetenChatTemplateThinking(model.id)) return;
22
- payload.chat_template_args = {
23
- ...asNonArrayRecord(payload.chat_template_args),
24
- enable_thinking: isThinkingEnabled(ctx.thinkingLevel)
25
- };
26
- });
28
+ };
27
29
  }
28
30
  //#endregion
29
31
  export { createBasetenThinkingWrapper };
package/dist/thinking.js CHANGED
@@ -1,4 +1,4 @@
1
- import { l as usesBasetenChatTemplateThinking } from "./models-CUyzLrPr.js";
1
+ import { l as usesBasetenChatTemplateThinking } from "./.setup/models-CwKDnNIj.mjs";
2
2
  //#region extensions/baseten/thinking.ts
3
3
  const BASETEN_BINARY_THINKING_PROFILE = {
4
4
  levels: [{ id: "off" }, {
@@ -46,7 +46,10 @@
46
46
  "cacheWrite": 0
47
47
  },
48
48
  "compat": {
49
- "codeMode": "capable"
49
+ "codeMode": "capable",
50
+ "supportsReasoningEffort": true,
51
+ "supportedReasoningEfforts": ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
52
+ "reasoningEffortMap": { "off": "none", "none": "none", "adaptive": "max" }
50
53
  }
51
54
  },
52
55
  {
@@ -81,7 +84,18 @@
81
84
  "cacheWrite": 0
82
85
  },
83
86
  "compat": {
84
- "codeMode": "capable"
87
+ "codeMode": "capable",
88
+ "supportsReasoningEffort": true,
89
+ "supportedReasoningEfforts": ["none", "high", "max"],
90
+ "reasoningEffortMap": {
91
+ "off": "none",
92
+ "none": "none",
93
+ "minimal": "high",
94
+ "low": "high",
95
+ "medium": "high",
96
+ "xhigh": "high",
97
+ "adaptive": "max"
98
+ }
85
99
  }
86
100
  },
87
101
  {
@@ -98,6 +112,19 @@
98
112
  "output": 6.6,
99
113
  "cacheRead": 0.21,
100
114
  "cacheWrite": 0
115
+ },
116
+ "compat": {
117
+ "supportsReasoningEffort": true,
118
+ "supportedReasoningEfforts": ["none", "high", "max"],
119
+ "reasoningEffortMap": {
120
+ "off": "none",
121
+ "none": "none",
122
+ "minimal": "high",
123
+ "low": "high",
124
+ "medium": "high",
125
+ "xhigh": "high",
126
+ "adaptive": "max"
127
+ }
101
128
  }
102
129
  },
103
130
  {
@@ -115,6 +142,11 @@
115
142
  "output": 4.05,
116
143
  "cacheRead": 0.17,
117
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" }
118
150
  }
119
151
  },
120
152
  {
@@ -181,6 +213,11 @@
181
213
  "output": 0.5,
182
214
  "cacheRead": 0,
183
215
  "cacheWrite": 0
216
+ },
217
+ "compat": {
218
+ "supportsReasoningEffort": true,
219
+ "supportedReasoningEfforts": ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
220
+ "reasoningEffortMap": { "off": "none", "none": "none", "adaptive": "max" }
184
221
  }
185
222
  }
186
223
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/baseten-provider",
3
- "version": "2026.9.4",
3
+ "version": "2026.9.5",
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.9.4"
21
+ "pluginApi": ">=2026.9.5"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.9.4",
24
+ "openclawVersion": "2026.9.5",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -35,10 +35,12 @@
35
35
  "files": [
36
36
  "dist/**",
37
37
  "openclaw.plugin.json",
38
- "README.md"
38
+ "README.md",
39
+ "assets/icon.png",
40
+ "assets/activity.svg"
39
41
  ],
40
42
  "peerDependencies": {
41
- "openclaw": ">=2026.9.4"
43
+ "openclaw": ">=2026.9.5"
42
44
  },
43
45
  "peerDependenciesMeta": {
44
46
  "openclaw": {