@openclaw/baseten-provider 2026.7.2-beta.2
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 +12 -0
- package/dist/api.js +4 -0
- package/dist/index.js +57 -0
- package/dist/models-Dg5jGc7M.js +414 -0
- package/dist/models.js +2 -0
- package/dist/onboard.js +23 -0
- package/dist/provider-catalog.js +20 -0
- package/dist/stream.js +34 -0
- package/dist/thinking.js +25 -0
- package/npm-shrinkwrap.json +12 -0
- package/openclaw.plugin.json +230 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# OpenClaw Baseten Provider
|
|
2
|
+
|
|
3
|
+
Official OpenClaw provider plugin for Baseten Model APIs, including Thinking Machines Lab's Inkling.
|
|
4
|
+
|
|
5
|
+
Install from OpenClaw:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
openclaw plugins install @openclaw/baseten-provider
|
|
9
|
+
openclaw gateway restart
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
See <https://docs.openclaw.ai/providers/baseten> for setup and configuration.
|
package/dist/api.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { a as buildBasetenModelCompat, c as discoverBasetenModels, d as usesBasetenChatTemplateThinking, i as BASETEN_MODEL_CATALOG, l as projectBasetenLiveModels, n as BASETEN_DEFAULT_MODEL_ID, o as buildBasetenModelDefinition, r as BASETEN_DEFAULT_MODEL_REF, s as buildStaticBasetenModels, t as BASETEN_BASE_URL, u as resolveBasetenDynamicModel } from "./models-Dg5jGc7M.js";
|
|
2
|
+
import { applyBasetenConfig } from "./onboard.js";
|
|
3
|
+
import { buildBasetenProvider, buildStaticBasetenProvider } from "./provider-catalog.js";
|
|
4
|
+
export { BASETEN_BASE_URL, BASETEN_DEFAULT_MODEL_ID, BASETEN_DEFAULT_MODEL_REF, BASETEN_MODEL_CATALOG, applyBasetenConfig, buildBasetenModelCompat, buildBasetenModelDefinition, buildBasetenProvider, buildStaticBasetenModels, buildStaticBasetenProvider, discoverBasetenModels, projectBasetenLiveModels, resolveBasetenDynamicModel, usesBasetenChatTemplateThinking };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { r as BASETEN_DEFAULT_MODEL_REF, u as resolveBasetenDynamicModel } from "./models-Dg5jGc7M.js";
|
|
2
|
+
import { applyBasetenConfig } from "./onboard.js";
|
|
3
|
+
import { buildBasetenProvider, buildStaticBasetenProvider } from "./provider-catalog.js";
|
|
4
|
+
import { createBasetenThinkingWrapper } from "./stream.js";
|
|
5
|
+
import { resolveBasetenThinkingProfile } from "./thinking.js";
|
|
6
|
+
import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
|
|
7
|
+
import { buildProviderReplayFamilyHooks } from "openclaw/plugin-sdk/provider-model-shared";
|
|
8
|
+
//#region extensions/baseten/index.ts
|
|
9
|
+
const PROVIDER_ID = "baseten";
|
|
10
|
+
var baseten_default = defineSingleProviderPluginEntry({
|
|
11
|
+
id: PROVIDER_ID,
|
|
12
|
+
name: "Baseten Provider",
|
|
13
|
+
description: "Official Baseten Model APIs provider plugin",
|
|
14
|
+
provider: {
|
|
15
|
+
label: "Baseten",
|
|
16
|
+
docsPath: "/providers/baseten",
|
|
17
|
+
auth: [{
|
|
18
|
+
methodId: "api-key",
|
|
19
|
+
label: "Baseten API key",
|
|
20
|
+
hint: "Hosted Model APIs, including Inkling",
|
|
21
|
+
optionKey: "basetenApiKey",
|
|
22
|
+
flagName: "--baseten-api-key",
|
|
23
|
+
envVar: "BASETEN_API_KEY",
|
|
24
|
+
promptMessage: "Enter Baseten API key",
|
|
25
|
+
defaultModel: BASETEN_DEFAULT_MODEL_REF,
|
|
26
|
+
applyConfig: (cfg) => applyBasetenConfig(cfg),
|
|
27
|
+
noteTitle: "Baseten",
|
|
28
|
+
noteMessage: ["Baseten hosts Thinking Machines Lab's Inkling and other frontier models behind one OpenAI-compatible API.", "Get your API key at: https://app.baseten.co/settings/api_keys"].join("\n"),
|
|
29
|
+
wizard: {
|
|
30
|
+
groupLabel: "Baseten",
|
|
31
|
+
groupHint: "Hosted Model APIs, including Inkling"
|
|
32
|
+
}
|
|
33
|
+
}],
|
|
34
|
+
catalog: {
|
|
35
|
+
order: "simple",
|
|
36
|
+
run: async (ctx) => {
|
|
37
|
+
const { apiKey, discoveryApiKey } = ctx.resolveProviderAuth(PROVIDER_ID);
|
|
38
|
+
if (!apiKey) return null;
|
|
39
|
+
return { provider: {
|
|
40
|
+
...await buildBasetenProvider(discoveryApiKey),
|
|
41
|
+
apiKey
|
|
42
|
+
} };
|
|
43
|
+
},
|
|
44
|
+
staticRun: async () => ({ provider: buildStaticBasetenProvider() })
|
|
45
|
+
},
|
|
46
|
+
resolveDynamicModel: ({ modelId }) => resolveBasetenDynamicModel(modelId),
|
|
47
|
+
...buildProviderReplayFamilyHooks({
|
|
48
|
+
family: "openai-compatible",
|
|
49
|
+
dropReasoningFromHistory: false
|
|
50
|
+
}),
|
|
51
|
+
wrapStreamFn: (ctx) => createBasetenThinkingWrapper(ctx),
|
|
52
|
+
resolveThinkingProfile: ({ modelId }) => resolveBasetenThinkingProfile(modelId),
|
|
53
|
+
isModernModelRef: () => true
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
//#endregion
|
|
57
|
+
export { baseten_default as default };
|
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import { getCachedLiveProviderModelRows } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
|
|
2
|
+
import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
3
|
+
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
4
|
+
import { ssrfPolicyFromHttpBaseUrlAllowedHostname } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
5
|
+
//#region extensions/baseten/openclaw.plugin.json
|
|
6
|
+
var modelCatalog = {
|
|
7
|
+
"providers": { "baseten": {
|
|
8
|
+
"baseUrl": "https://inference.baseten.co/v1",
|
|
9
|
+
"api": "openai-completions",
|
|
10
|
+
"models": [
|
|
11
|
+
{
|
|
12
|
+
"id": "deepseek-ai/DeepSeek-V4-Pro",
|
|
13
|
+
"name": "DeepSeek V4 Pro",
|
|
14
|
+
"reasoning": true,
|
|
15
|
+
"input": ["text"],
|
|
16
|
+
"contextWindow": 262e3,
|
|
17
|
+
"maxTokens": 262e3,
|
|
18
|
+
"cost": {
|
|
19
|
+
"input": 1.74,
|
|
20
|
+
"output": 3.48,
|
|
21
|
+
"cacheRead": .145,
|
|
22
|
+
"cacheWrite": 0
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "zai-org/GLM-4.7",
|
|
27
|
+
"name": "GLM 4.7",
|
|
28
|
+
"reasoning": true,
|
|
29
|
+
"input": ["text"],
|
|
30
|
+
"contextWindow": 2e5,
|
|
31
|
+
"maxTokens": 2e5,
|
|
32
|
+
"cost": {
|
|
33
|
+
"input": .6,
|
|
34
|
+
"output": 2.2,
|
|
35
|
+
"cacheRead": .12,
|
|
36
|
+
"cacheWrite": 0
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "zai-org/GLM-5",
|
|
41
|
+
"name": "GLM 5",
|
|
42
|
+
"reasoning": true,
|
|
43
|
+
"input": ["text"],
|
|
44
|
+
"contextWindow": 202e3,
|
|
45
|
+
"maxTokens": 202e3,
|
|
46
|
+
"cost": {
|
|
47
|
+
"input": .95,
|
|
48
|
+
"output": 3.15,
|
|
49
|
+
"cacheRead": .2,
|
|
50
|
+
"cacheWrite": 0
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "zai-org/GLM-5.1",
|
|
55
|
+
"name": "GLM 5.1",
|
|
56
|
+
"reasoning": true,
|
|
57
|
+
"input": ["text"],
|
|
58
|
+
"contextWindow": 202e3,
|
|
59
|
+
"maxTokens": 202e3,
|
|
60
|
+
"cost": {
|
|
61
|
+
"input": 1.3,
|
|
62
|
+
"output": 4.3,
|
|
63
|
+
"cacheRead": .26,
|
|
64
|
+
"cacheWrite": 0
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "zai-org/GLM-5.2",
|
|
69
|
+
"name": "GLM 5.2",
|
|
70
|
+
"reasoning": true,
|
|
71
|
+
"input": ["text"],
|
|
72
|
+
"contextWindow": 202e3,
|
|
73
|
+
"maxTokens": 202e3,
|
|
74
|
+
"cost": {
|
|
75
|
+
"input": 1.4,
|
|
76
|
+
"output": 4.4,
|
|
77
|
+
"cacheRead": .26,
|
|
78
|
+
"cacheWrite": 0
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "thinkingmachines/inkling",
|
|
83
|
+
"name": "Inkling",
|
|
84
|
+
"reasoning": true,
|
|
85
|
+
"input": ["text", "image"],
|
|
86
|
+
"contextWindow": 1048e3,
|
|
87
|
+
"maxTokens": 32e3,
|
|
88
|
+
"cost": {
|
|
89
|
+
"input": 1,
|
|
90
|
+
"output": 4.05,
|
|
91
|
+
"cacheRead": .17,
|
|
92
|
+
"cacheWrite": 0
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "moonshotai/Kimi-K2.5",
|
|
97
|
+
"name": "Kimi K2.5",
|
|
98
|
+
"reasoning": true,
|
|
99
|
+
"input": ["text", "image"],
|
|
100
|
+
"contextWindow": 262e3,
|
|
101
|
+
"maxTokens": 262e3,
|
|
102
|
+
"cost": {
|
|
103
|
+
"input": .6,
|
|
104
|
+
"output": 3,
|
|
105
|
+
"cacheRead": .12,
|
|
106
|
+
"cacheWrite": 0
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "moonshotai/Kimi-K2.6",
|
|
111
|
+
"name": "Kimi K2.6",
|
|
112
|
+
"reasoning": true,
|
|
113
|
+
"input": ["text", "image"],
|
|
114
|
+
"contextWindow": 262e3,
|
|
115
|
+
"maxTokens": 262e3,
|
|
116
|
+
"cost": {
|
|
117
|
+
"input": .95,
|
|
118
|
+
"output": 4,
|
|
119
|
+
"cacheRead": .16,
|
|
120
|
+
"cacheWrite": 0
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "moonshotai/Kimi-K2.7-Code",
|
|
125
|
+
"name": "Kimi K2.7 Code",
|
|
126
|
+
"reasoning": true,
|
|
127
|
+
"input": ["text", "image"],
|
|
128
|
+
"contextWindow": 262e3,
|
|
129
|
+
"maxTokens": 262e3,
|
|
130
|
+
"cost": {
|
|
131
|
+
"input": .95,
|
|
132
|
+
"output": 4,
|
|
133
|
+
"cacheRead": .16,
|
|
134
|
+
"cacheWrite": 0
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"id": "nvidia/Nemotron-120B-A12B",
|
|
139
|
+
"name": "Nemotron Super",
|
|
140
|
+
"reasoning": true,
|
|
141
|
+
"input": ["text"],
|
|
142
|
+
"contextWindow": 202e3,
|
|
143
|
+
"maxTokens": 202e3,
|
|
144
|
+
"cost": {
|
|
145
|
+
"input": .3,
|
|
146
|
+
"output": .75,
|
|
147
|
+
"cacheRead": .06,
|
|
148
|
+
"cacheWrite": 0
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"id": "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B",
|
|
153
|
+
"name": "Nemotron Ultra",
|
|
154
|
+
"reasoning": true,
|
|
155
|
+
"input": ["text"],
|
|
156
|
+
"contextWindow": 202e3,
|
|
157
|
+
"maxTokens": 202e3,
|
|
158
|
+
"cost": {
|
|
159
|
+
"input": .6,
|
|
160
|
+
"output": 2.4,
|
|
161
|
+
"cacheRead": .12,
|
|
162
|
+
"cacheWrite": 0
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"id": "openai/gpt-oss-120b",
|
|
167
|
+
"name": "GPT OSS 120B",
|
|
168
|
+
"reasoning": true,
|
|
169
|
+
"input": ["text"],
|
|
170
|
+
"contextWindow": 128e3,
|
|
171
|
+
"maxTokens": 128e3,
|
|
172
|
+
"cost": {
|
|
173
|
+
"input": .1,
|
|
174
|
+
"output": .5,
|
|
175
|
+
"cacheRead": 0,
|
|
176
|
+
"cacheWrite": 0
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
} },
|
|
181
|
+
"discovery": { "baseten": "refreshable" }
|
|
182
|
+
};
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region extensions/baseten/models.ts
|
|
185
|
+
/**
|
|
186
|
+
* Baseten model catalog, compat metadata, and authenticated live discovery.
|
|
187
|
+
*/
|
|
188
|
+
const log = createSubsystemLogger("baseten-models");
|
|
189
|
+
const BASETEN_MANIFEST_CATALOG = modelCatalog.providers.baseten;
|
|
190
|
+
const CACHE_TTL_MS = 300 * 1e3;
|
|
191
|
+
const DEFAULT_CONTEXT_WINDOW = 128e3;
|
|
192
|
+
const DEFAULT_MAX_TOKENS = 8192;
|
|
193
|
+
const CHAT_TEMPLATE_THINKING_MODEL_IDS = /* @__PURE__ */ new Set([
|
|
194
|
+
"zai-org/glm-4.7",
|
|
195
|
+
"zai-org/glm-5",
|
|
196
|
+
"zai-org/glm-5.1",
|
|
197
|
+
"zai-org/glm-5.2",
|
|
198
|
+
"moonshotai/kimi-k2.5",
|
|
199
|
+
"moonshotai/kimi-k2.6",
|
|
200
|
+
"moonshotai/kimi-k2.7-code",
|
|
201
|
+
"nvidia/nemotron-120b-a12b",
|
|
202
|
+
"nvidia/nvidia-nemotron-3-ultra-550b-a55b"
|
|
203
|
+
]);
|
|
204
|
+
const FULL_REASONING_EFFORT_MODEL_IDS = /* @__PURE__ */ new Set(["deepseek-ai/DeepSeek-V4-Pro", "openai/gpt-oss-120b"]);
|
|
205
|
+
const INKLING_REASONING_EFFORTS = [
|
|
206
|
+
"none",
|
|
207
|
+
"minimal",
|
|
208
|
+
"low",
|
|
209
|
+
"medium",
|
|
210
|
+
"high",
|
|
211
|
+
"xhigh"
|
|
212
|
+
];
|
|
213
|
+
const FULL_REASONING_EFFORTS = [...INKLING_REASONING_EFFORTS, "max"];
|
|
214
|
+
const BASE_COMPAT = {
|
|
215
|
+
supportsStore: false,
|
|
216
|
+
supportsDeveloperRole: false,
|
|
217
|
+
supportsUsageInStreaming: true,
|
|
218
|
+
supportsStrictMode: true,
|
|
219
|
+
supportsTools: true,
|
|
220
|
+
maxTokensField: "max_tokens"
|
|
221
|
+
};
|
|
222
|
+
/** Base URL for Baseten's OpenAI-compatible Model APIs. */
|
|
223
|
+
const BASETEN_BASE_URL = BASETEN_MANIFEST_CATALOG.baseUrl;
|
|
224
|
+
/** Default Baseten model id used for onboarding. */
|
|
225
|
+
const BASETEN_DEFAULT_MODEL_ID = "thinkingmachines/inkling";
|
|
226
|
+
/** Default Baseten model ref used for onboarding. */
|
|
227
|
+
const BASETEN_DEFAULT_MODEL_REF = `baseten/${BASETEN_DEFAULT_MODEL_ID}`;
|
|
228
|
+
/** Bundled fallback rows for all Baseten Model APIs available at release time. */
|
|
229
|
+
const BASETEN_MODEL_CATALOG = BASETEN_MANIFEST_CATALOG.models;
|
|
230
|
+
/** Whether Baseten requires chat-template thinking control for this model. */
|
|
231
|
+
function usesBasetenChatTemplateThinking(modelId) {
|
|
232
|
+
return CHAT_TEMPLATE_THINKING_MODEL_IDS.has(modelId.trim().toLowerCase());
|
|
233
|
+
}
|
|
234
|
+
function buildBasetenReasoningCompat(modelId) {
|
|
235
|
+
if (FULL_REASONING_EFFORT_MODEL_IDS.has(modelId)) return {
|
|
236
|
+
supportsReasoningEffort: true,
|
|
237
|
+
supportedReasoningEfforts: FULL_REASONING_EFFORTS,
|
|
238
|
+
reasoningEffortMap: {
|
|
239
|
+
off: "none",
|
|
240
|
+
none: "none",
|
|
241
|
+
adaptive: "max"
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
if (modelId === "thinkingmachines/inkling") return {
|
|
245
|
+
supportsReasoningEffort: true,
|
|
246
|
+
supportedReasoningEfforts: INKLING_REASONING_EFFORTS,
|
|
247
|
+
reasoningEffortMap: {
|
|
248
|
+
off: "none",
|
|
249
|
+
none: "none",
|
|
250
|
+
adaptive: "xhigh",
|
|
251
|
+
max: "xhigh"
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
if (modelId === "zai-org/GLM-5.2") return {
|
|
255
|
+
supportsReasoningEffort: true,
|
|
256
|
+
supportedReasoningEfforts: [
|
|
257
|
+
"none",
|
|
258
|
+
"high",
|
|
259
|
+
"max"
|
|
260
|
+
],
|
|
261
|
+
reasoningEffortMap: {
|
|
262
|
+
off: "none",
|
|
263
|
+
none: "none",
|
|
264
|
+
minimal: "high",
|
|
265
|
+
low: "high",
|
|
266
|
+
medium: "high",
|
|
267
|
+
xhigh: "high",
|
|
268
|
+
adaptive: "max"
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
return {};
|
|
272
|
+
}
|
|
273
|
+
/** Complete OpenAI-compatible transport policy for one Baseten model. */
|
|
274
|
+
function buildBasetenModelCompat(modelId) {
|
|
275
|
+
return {
|
|
276
|
+
...BASE_COMPAT,
|
|
277
|
+
...buildBasetenReasoningCompat(modelId)
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
/** Builds one normalized Baseten model definition from a manifest entry. */
|
|
281
|
+
function buildBasetenModelDefinition(model) {
|
|
282
|
+
const normalized = buildManifestModelProviderConfig({
|
|
283
|
+
providerId: "baseten",
|
|
284
|
+
catalog: {
|
|
285
|
+
...BASETEN_MANIFEST_CATALOG,
|
|
286
|
+
models: [model]
|
|
287
|
+
}
|
|
288
|
+
}).models[0];
|
|
289
|
+
if (!normalized) throw new Error(`Missing normalized Baseten model ${model.id}`);
|
|
290
|
+
return {
|
|
291
|
+
...normalized,
|
|
292
|
+
compat: buildBasetenModelCompat(normalized.id)
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
/** Builds the network-free fallback catalog. */
|
|
296
|
+
function buildStaticBasetenModels() {
|
|
297
|
+
return BASETEN_MODEL_CATALOG.map(buildBasetenModelDefinition);
|
|
298
|
+
}
|
|
299
|
+
function readPositiveInteger(value) {
|
|
300
|
+
const number = typeof value === "number" ? value : Number(value);
|
|
301
|
+
return Number.isSafeInteger(number) && number > 0 ? number : void 0;
|
|
302
|
+
}
|
|
303
|
+
function readPerTokenPrice(value) {
|
|
304
|
+
if (typeof value !== "number" && (typeof value !== "string" || !value.trim())) return;
|
|
305
|
+
const number = typeof value === "number" ? value : Number(value);
|
|
306
|
+
return Number.isFinite(number) && number >= 0 ? Number((number * 1e6).toFixed(9)) : void 0;
|
|
307
|
+
}
|
|
308
|
+
function readStringArray(value) {
|
|
309
|
+
return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
|
|
310
|
+
}
|
|
311
|
+
function applyLiveReasoningEffortCompat(fallbackCompat, supportsReasoningEffort) {
|
|
312
|
+
if (supportsReasoningEffort) return {
|
|
313
|
+
...fallbackCompat,
|
|
314
|
+
supportsReasoningEffort: true
|
|
315
|
+
};
|
|
316
|
+
const compat = { ...fallbackCompat };
|
|
317
|
+
delete compat.supportsReasoningEffort;
|
|
318
|
+
delete compat.supportedReasoningEfforts;
|
|
319
|
+
delete compat.reasoningEffortMap;
|
|
320
|
+
return compat;
|
|
321
|
+
}
|
|
322
|
+
function projectLiveModel(row, fallback) {
|
|
323
|
+
if (row.object !== void 0 && row.object !== "model") return;
|
|
324
|
+
const id = typeof row.id === "string" ? row.id.trim() : "";
|
|
325
|
+
if (!id) return;
|
|
326
|
+
const hasLiveFeatures = Array.isArray(row.supported_features);
|
|
327
|
+
const features = new Set(readStringArray(row.supported_features));
|
|
328
|
+
const pricing = row.pricing && typeof row.pricing === "object" && !Array.isArray(row.pricing) ? row.pricing : {};
|
|
329
|
+
const inputPrice = readPerTokenPrice(pricing.prompt);
|
|
330
|
+
const outputPrice = readPerTokenPrice(pricing.completion);
|
|
331
|
+
const cacheReadPrice = readPerTokenPrice(pricing.input_cache_read);
|
|
332
|
+
const supportsReasoningEffort = features.has("reasoning_effort");
|
|
333
|
+
const fallbackCompat = fallback?.compat ?? buildBasetenModelCompat(id);
|
|
334
|
+
const compat = hasLiveFeatures ? applyLiveReasoningEffortCompat(fallbackCompat, supportsReasoningEffort) : fallbackCompat;
|
|
335
|
+
return {
|
|
336
|
+
id,
|
|
337
|
+
name: typeof row.name === "string" && row.name.trim() ? row.name.trim() : fallback?.name ?? id,
|
|
338
|
+
reasoning: hasLiveFeatures ? features.has("reasoning") || supportsReasoningEffort : fallback?.reasoning ?? false,
|
|
339
|
+
input: hasLiveFeatures ? features.has("vision") ? ["text", "image"] : ["text"] : fallback?.input ?? ["text"],
|
|
340
|
+
cost: {
|
|
341
|
+
input: inputPrice ?? fallback?.cost.input ?? 0,
|
|
342
|
+
output: outputPrice ?? fallback?.cost.output ?? 0,
|
|
343
|
+
cacheRead: cacheReadPrice ?? fallback?.cost.cacheRead ?? 0,
|
|
344
|
+
cacheWrite: fallback?.cost.cacheWrite ?? 0
|
|
345
|
+
},
|
|
346
|
+
contextWindow: readPositiveInteger(row.context_length) ?? fallback?.contextWindow ?? DEFAULT_CONTEXT_WINDOW,
|
|
347
|
+
maxTokens: readPositiveInteger(row.max_completion_tokens) ?? fallback?.maxTokens ?? DEFAULT_MAX_TOKENS,
|
|
348
|
+
compat
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
/** Projects Baseten's authenticated `/models` response into OpenClaw model rows. */
|
|
352
|
+
function projectBasetenLiveModels(rows) {
|
|
353
|
+
const fallbacks = new Map(buildStaticBasetenModels().map((model) => [model.id, model]));
|
|
354
|
+
const seen = /* @__PURE__ */ new Set();
|
|
355
|
+
const models = [];
|
|
356
|
+
for (const row of rows) {
|
|
357
|
+
if (!row || typeof row !== "object" || Array.isArray(row)) continue;
|
|
358
|
+
const model = projectLiveModel(row, fallbacks.get(String(row.id)));
|
|
359
|
+
if (!model || seen.has(model.id)) continue;
|
|
360
|
+
seen.add(model.id);
|
|
361
|
+
models.push(model);
|
|
362
|
+
}
|
|
363
|
+
return models;
|
|
364
|
+
}
|
|
365
|
+
/** Discovers every model enabled for a Baseten account, with a static fallback. */
|
|
366
|
+
async function discoverBasetenModels(params = {}) {
|
|
367
|
+
const staticModels = buildStaticBasetenModels();
|
|
368
|
+
const env = params.env ?? process.env;
|
|
369
|
+
if (!params.discoveryApiKey?.trim() || !params.forceLive && (env.NODE_ENV === "test" || env.VITEST === "true")) return staticModels;
|
|
370
|
+
try {
|
|
371
|
+
const models = projectBasetenLiveModels(await getCachedLiveProviderModelRows({
|
|
372
|
+
providerId: "baseten",
|
|
373
|
+
endpoint: `${BASETEN_BASE_URL}/models`,
|
|
374
|
+
discoveryApiKey: params.discoveryApiKey,
|
|
375
|
+
fetchGuard: params.fetchGuard,
|
|
376
|
+
signal: params.signal,
|
|
377
|
+
timeoutMs: 1e4,
|
|
378
|
+
ttlMs: CACHE_TTL_MS,
|
|
379
|
+
policy: ssrfPolicyFromHttpBaseUrlAllowedHostname(BASETEN_BASE_URL),
|
|
380
|
+
auditContext: "baseten-model-discovery",
|
|
381
|
+
shouldCacheRows: (candidateRows) => projectBasetenLiveModels(candidateRows).length > 0
|
|
382
|
+
}));
|
|
383
|
+
if (models.length > 0) return models;
|
|
384
|
+
log.warn("Baseten returned no usable models; using bundled catalog");
|
|
385
|
+
} catch (error) {
|
|
386
|
+
log.warn(`Baseten model discovery failed; using bundled catalog: ${String(error)}`);
|
|
387
|
+
}
|
|
388
|
+
return staticModels;
|
|
389
|
+
}
|
|
390
|
+
/** Resolves a forward-compatible Baseten model id not yet in the bundled catalog. */
|
|
391
|
+
function resolveBasetenDynamicModel(modelId) {
|
|
392
|
+
const id = modelId.trim();
|
|
393
|
+
if (!id || BASETEN_MODEL_CATALOG.some((model) => model.id === id)) return;
|
|
394
|
+
return {
|
|
395
|
+
id,
|
|
396
|
+
name: id,
|
|
397
|
+
provider: "baseten",
|
|
398
|
+
api: "openai-completions",
|
|
399
|
+
baseUrl: BASETEN_BASE_URL,
|
|
400
|
+
reasoning: false,
|
|
401
|
+
input: ["text"],
|
|
402
|
+
cost: {
|
|
403
|
+
input: 0,
|
|
404
|
+
output: 0,
|
|
405
|
+
cacheRead: 0,
|
|
406
|
+
cacheWrite: 0
|
|
407
|
+
},
|
|
408
|
+
contextWindow: DEFAULT_CONTEXT_WINDOW,
|
|
409
|
+
maxTokens: DEFAULT_MAX_TOKENS,
|
|
410
|
+
compat: buildBasetenModelCompat(id)
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
//#endregion
|
|
414
|
+
export { buildBasetenModelCompat as a, discoverBasetenModels as c, usesBasetenChatTemplateThinking as d, BASETEN_MODEL_CATALOG as i, projectBasetenLiveModels as l, BASETEN_DEFAULT_MODEL_ID as n, buildBasetenModelDefinition as o, BASETEN_DEFAULT_MODEL_REF as r, buildStaticBasetenModels as s, BASETEN_BASE_URL as t, resolveBasetenDynamicModel as u };
|
package/dist/models.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as buildBasetenModelCompat, c as discoverBasetenModels, d as usesBasetenChatTemplateThinking, i as BASETEN_MODEL_CATALOG, l as projectBasetenLiveModels, n as BASETEN_DEFAULT_MODEL_ID, o as buildBasetenModelDefinition, r as BASETEN_DEFAULT_MODEL_REF, s as buildStaticBasetenModels, t as BASETEN_BASE_URL, u as resolveBasetenDynamicModel } from "./models-Dg5jGc7M.js";
|
|
2
|
+
export { BASETEN_BASE_URL, BASETEN_DEFAULT_MODEL_ID, BASETEN_DEFAULT_MODEL_REF, BASETEN_MODEL_CATALOG, buildBasetenModelCompat, buildBasetenModelDefinition, buildStaticBasetenModels, discoverBasetenModels, projectBasetenLiveModels, resolveBasetenDynamicModel, usesBasetenChatTemplateThinking };
|
package/dist/onboard.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { r as BASETEN_DEFAULT_MODEL_REF, s as buildStaticBasetenModels, t as BASETEN_BASE_URL } from "./models-Dg5jGc7M.js";
|
|
2
|
+
import { createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
|
|
3
|
+
//#region extensions/baseten/onboard.ts
|
|
4
|
+
/** Baseten onboarding config helpers. */
|
|
5
|
+
const basetenPresetAppliers = createModelCatalogPresetAppliers({
|
|
6
|
+
primaryModelRef: BASETEN_DEFAULT_MODEL_REF,
|
|
7
|
+
resolveParams: (_cfg) => ({
|
|
8
|
+
providerId: "baseten",
|
|
9
|
+
api: "openai-completions",
|
|
10
|
+
baseUrl: BASETEN_BASE_URL,
|
|
11
|
+
catalogModels: buildStaticBasetenModels(),
|
|
12
|
+
aliases: [{
|
|
13
|
+
modelRef: BASETEN_DEFAULT_MODEL_REF,
|
|
14
|
+
alias: "Inkling"
|
|
15
|
+
}]
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
/** Applies Baseten's provider catalog, Inkling alias, and default model. */
|
|
19
|
+
function applyBasetenConfig(cfg) {
|
|
20
|
+
return basetenPresetAppliers.applyConfig(cfg);
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { applyBasetenConfig };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { c as discoverBasetenModels, s as buildStaticBasetenModels, t as BASETEN_BASE_URL } from "./models-Dg5jGc7M.js";
|
|
2
|
+
//#region extensions/baseten/provider-catalog.ts
|
|
3
|
+
/** Builds Baseten's network-free fallback provider catalog. */
|
|
4
|
+
function buildStaticBasetenProvider() {
|
|
5
|
+
return {
|
|
6
|
+
baseUrl: BASETEN_BASE_URL,
|
|
7
|
+
api: "openai-completions",
|
|
8
|
+
models: buildStaticBasetenModels()
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
/** Builds Baseten's account-scoped live catalog. */
|
|
12
|
+
async function buildBasetenProvider(discoveryApiKey) {
|
|
13
|
+
return {
|
|
14
|
+
baseUrl: BASETEN_BASE_URL,
|
|
15
|
+
api: "openai-completions",
|
|
16
|
+
models: await discoverBasetenModels({ discoveryApiKey })
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { buildBasetenProvider, buildStaticBasetenProvider };
|
package/dist/stream.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { d as usesBasetenChatTemplateThinking } from "./models-Dg5jGc7M.js";
|
|
2
|
+
import { createPayloadPatchStreamWrapper } from "openclaw/plugin-sdk/provider-stream-shared";
|
|
3
|
+
//#region extensions/baseten/stream.ts
|
|
4
|
+
const BASETEN_DEEPSEEK_V4_MODEL_ID = "deepseek-ai/deepseek-v4-pro";
|
|
5
|
+
function isThinkingEnabled(level) {
|
|
6
|
+
return level !== void 0 && level !== "off";
|
|
7
|
+
}
|
|
8
|
+
function isBasetenDeepSeekV4ModelId(modelId) {
|
|
9
|
+
return modelId.trim().toLowerCase() === BASETEN_DEEPSEEK_V4_MODEL_ID;
|
|
10
|
+
}
|
|
11
|
+
function patchBasetenDeepSeekV4Replay(payload, thinkingEnabled) {
|
|
12
|
+
if (!Array.isArray(payload.messages)) return;
|
|
13
|
+
for (const message of payload.messages) {
|
|
14
|
+
if (!message || typeof message !== "object" || Array.isArray(message)) continue;
|
|
15
|
+
const record = message;
|
|
16
|
+
if (record.role !== "assistant") continue;
|
|
17
|
+
if (thinkingEnabled) record.reasoning_content ??= "";
|
|
18
|
+
else delete record.reasoning_content;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/** Adds Baseten's `chat_template_args.enable_thinking` without dropping caller args. */
|
|
22
|
+
function createBasetenThinkingWrapper(ctx) {
|
|
23
|
+
return createPayloadPatchStreamWrapper(ctx.streamFn, ({ payload, model }) => {
|
|
24
|
+
if (model.provider !== "baseten" || model.api !== "openai-completions") return;
|
|
25
|
+
if (isBasetenDeepSeekV4ModelId(model.id)) patchBasetenDeepSeekV4Replay(payload, ctx.thinkingLevel !== "off");
|
|
26
|
+
if (!usesBasetenChatTemplateThinking(model.id)) return;
|
|
27
|
+
payload.chat_template_args = {
|
|
28
|
+
...payload.chat_template_args && typeof payload.chat_template_args === "object" && !Array.isArray(payload.chat_template_args) ? payload.chat_template_args : {},
|
|
29
|
+
enable_thinking: isThinkingEnabled(ctx.thinkingLevel)
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { createBasetenThinkingWrapper };
|
package/dist/thinking.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { d as usesBasetenChatTemplateThinking } from "./models-Dg5jGc7M.js";
|
|
2
|
+
//#region extensions/baseten/thinking.ts
|
|
3
|
+
const BASETEN_BINARY_THINKING_PROFILE = {
|
|
4
|
+
levels: [{ id: "off" }, {
|
|
5
|
+
id: "low",
|
|
6
|
+
label: "on"
|
|
7
|
+
}],
|
|
8
|
+
defaultLevel: "off"
|
|
9
|
+
};
|
|
10
|
+
const BASETEN_GLM_52_THINKING_PROFILE = {
|
|
11
|
+
levels: [
|
|
12
|
+
{ id: "off" },
|
|
13
|
+
{ id: "high" },
|
|
14
|
+
{ id: "max" }
|
|
15
|
+
],
|
|
16
|
+
defaultLevel: "off"
|
|
17
|
+
};
|
|
18
|
+
/** Exposes only the thinking levels that Baseten actually accepts for opt-in models. */
|
|
19
|
+
function resolveBasetenThinkingProfile(modelId) {
|
|
20
|
+
const normalized = modelId.trim().toLowerCase();
|
|
21
|
+
if (normalized === "zai-org/glm-5.2") return BASETEN_GLM_52_THINKING_PROFILE;
|
|
22
|
+
return usesBasetenChatTemplateThinking(normalized) ? BASETEN_BINARY_THINKING_PROFILE : void 0;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { resolveBasetenThinkingProfile };
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "baseten",
|
|
3
|
+
"name": "Baseten",
|
|
4
|
+
"description": "OpenClaw Baseten provider plugin.",
|
|
5
|
+
"activation": {
|
|
6
|
+
"onStartup": false
|
|
7
|
+
},
|
|
8
|
+
"enabledByDefault": true,
|
|
9
|
+
"providers": ["baseten"],
|
|
10
|
+
"providerRequest": {
|
|
11
|
+
"providers": {
|
|
12
|
+
"baseten": {
|
|
13
|
+
"family": "baseten",
|
|
14
|
+
"openAICompletions": {
|
|
15
|
+
"supportsStreamingUsage": true
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"modelCatalog": {
|
|
21
|
+
"providers": {
|
|
22
|
+
"baseten": {
|
|
23
|
+
"baseUrl": "https://inference.baseten.co/v1",
|
|
24
|
+
"api": "openai-completions",
|
|
25
|
+
"models": [
|
|
26
|
+
{
|
|
27
|
+
"id": "deepseek-ai/DeepSeek-V4-Pro",
|
|
28
|
+
"name": "DeepSeek V4 Pro",
|
|
29
|
+
"reasoning": true,
|
|
30
|
+
"input": ["text"],
|
|
31
|
+
"contextWindow": 262000,
|
|
32
|
+
"maxTokens": 262000,
|
|
33
|
+
"cost": {
|
|
34
|
+
"input": 1.74,
|
|
35
|
+
"output": 3.48,
|
|
36
|
+
"cacheRead": 0.145,
|
|
37
|
+
"cacheWrite": 0
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "zai-org/GLM-4.7",
|
|
42
|
+
"name": "GLM 4.7",
|
|
43
|
+
"reasoning": true,
|
|
44
|
+
"input": ["text"],
|
|
45
|
+
"contextWindow": 200000,
|
|
46
|
+
"maxTokens": 200000,
|
|
47
|
+
"cost": {
|
|
48
|
+
"input": 0.6,
|
|
49
|
+
"output": 2.2,
|
|
50
|
+
"cacheRead": 0.12,
|
|
51
|
+
"cacheWrite": 0
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "zai-org/GLM-5",
|
|
56
|
+
"name": "GLM 5",
|
|
57
|
+
"reasoning": true,
|
|
58
|
+
"input": ["text"],
|
|
59
|
+
"contextWindow": 202000,
|
|
60
|
+
"maxTokens": 202000,
|
|
61
|
+
"cost": {
|
|
62
|
+
"input": 0.95,
|
|
63
|
+
"output": 3.15,
|
|
64
|
+
"cacheRead": 0.2,
|
|
65
|
+
"cacheWrite": 0
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "zai-org/GLM-5.1",
|
|
70
|
+
"name": "GLM 5.1",
|
|
71
|
+
"reasoning": true,
|
|
72
|
+
"input": ["text"],
|
|
73
|
+
"contextWindow": 202000,
|
|
74
|
+
"maxTokens": 202000,
|
|
75
|
+
"cost": {
|
|
76
|
+
"input": 1.3,
|
|
77
|
+
"output": 4.3,
|
|
78
|
+
"cacheRead": 0.26,
|
|
79
|
+
"cacheWrite": 0
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "zai-org/GLM-5.2",
|
|
84
|
+
"name": "GLM 5.2",
|
|
85
|
+
"reasoning": true,
|
|
86
|
+
"input": ["text"],
|
|
87
|
+
"contextWindow": 202000,
|
|
88
|
+
"maxTokens": 202000,
|
|
89
|
+
"cost": {
|
|
90
|
+
"input": 1.4,
|
|
91
|
+
"output": 4.4,
|
|
92
|
+
"cacheRead": 0.26,
|
|
93
|
+
"cacheWrite": 0
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "thinkingmachines/inkling",
|
|
98
|
+
"name": "Inkling",
|
|
99
|
+
"reasoning": true,
|
|
100
|
+
"input": ["text", "image"],
|
|
101
|
+
"contextWindow": 1048000,
|
|
102
|
+
"maxTokens": 32000,
|
|
103
|
+
"cost": {
|
|
104
|
+
"input": 1,
|
|
105
|
+
"output": 4.05,
|
|
106
|
+
"cacheRead": 0.17,
|
|
107
|
+
"cacheWrite": 0
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "moonshotai/Kimi-K2.5",
|
|
112
|
+
"name": "Kimi K2.5",
|
|
113
|
+
"reasoning": true,
|
|
114
|
+
"input": ["text", "image"],
|
|
115
|
+
"contextWindow": 262000,
|
|
116
|
+
"maxTokens": 262000,
|
|
117
|
+
"cost": {
|
|
118
|
+
"input": 0.6,
|
|
119
|
+
"output": 3,
|
|
120
|
+
"cacheRead": 0.12,
|
|
121
|
+
"cacheWrite": 0
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"id": "moonshotai/Kimi-K2.6",
|
|
126
|
+
"name": "Kimi K2.6",
|
|
127
|
+
"reasoning": true,
|
|
128
|
+
"input": ["text", "image"],
|
|
129
|
+
"contextWindow": 262000,
|
|
130
|
+
"maxTokens": 262000,
|
|
131
|
+
"cost": {
|
|
132
|
+
"input": 0.95,
|
|
133
|
+
"output": 4,
|
|
134
|
+
"cacheRead": 0.16,
|
|
135
|
+
"cacheWrite": 0
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "moonshotai/Kimi-K2.7-Code",
|
|
140
|
+
"name": "Kimi K2.7 Code",
|
|
141
|
+
"reasoning": true,
|
|
142
|
+
"input": ["text", "image"],
|
|
143
|
+
"contextWindow": 262000,
|
|
144
|
+
"maxTokens": 262000,
|
|
145
|
+
"cost": {
|
|
146
|
+
"input": 0.95,
|
|
147
|
+
"output": 4,
|
|
148
|
+
"cacheRead": 0.16,
|
|
149
|
+
"cacheWrite": 0
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "nvidia/Nemotron-120B-A12B",
|
|
154
|
+
"name": "Nemotron Super",
|
|
155
|
+
"reasoning": true,
|
|
156
|
+
"input": ["text"],
|
|
157
|
+
"contextWindow": 202000,
|
|
158
|
+
"maxTokens": 202000,
|
|
159
|
+
"cost": {
|
|
160
|
+
"input": 0.3,
|
|
161
|
+
"output": 0.75,
|
|
162
|
+
"cacheRead": 0.06,
|
|
163
|
+
"cacheWrite": 0
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B",
|
|
168
|
+
"name": "Nemotron Ultra",
|
|
169
|
+
"reasoning": true,
|
|
170
|
+
"input": ["text"],
|
|
171
|
+
"contextWindow": 202000,
|
|
172
|
+
"maxTokens": 202000,
|
|
173
|
+
"cost": {
|
|
174
|
+
"input": 0.6,
|
|
175
|
+
"output": 2.4,
|
|
176
|
+
"cacheRead": 0.12,
|
|
177
|
+
"cacheWrite": 0
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"id": "openai/gpt-oss-120b",
|
|
182
|
+
"name": "GPT OSS 120B",
|
|
183
|
+
"reasoning": true,
|
|
184
|
+
"input": ["text"],
|
|
185
|
+
"contextWindow": 128000,
|
|
186
|
+
"maxTokens": 128000,
|
|
187
|
+
"cost": {
|
|
188
|
+
"input": 0.1,
|
|
189
|
+
"output": 0.5,
|
|
190
|
+
"cacheRead": 0,
|
|
191
|
+
"cacheWrite": 0
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"discovery": {
|
|
198
|
+
"baseten": "refreshable"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"setup": {
|
|
202
|
+
"providers": [
|
|
203
|
+
{
|
|
204
|
+
"id": "baseten",
|
|
205
|
+
"envVars": ["BASETEN_API_KEY"]
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"providerAuthChoices": [
|
|
210
|
+
{
|
|
211
|
+
"provider": "baseten",
|
|
212
|
+
"method": "api-key",
|
|
213
|
+
"choiceId": "baseten-api-key",
|
|
214
|
+
"appGuidedSecret": true,
|
|
215
|
+
"choiceLabel": "Baseten API key",
|
|
216
|
+
"groupId": "baseten",
|
|
217
|
+
"groupLabel": "Baseten",
|
|
218
|
+
"groupHint": "Hosted Model APIs, including Inkling",
|
|
219
|
+
"optionKey": "basetenApiKey",
|
|
220
|
+
"cliFlag": "--baseten-api-key",
|
|
221
|
+
"cliOption": "--baseten-api-key <key>",
|
|
222
|
+
"cliDescription": "Baseten API key"
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
"configSchema": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"additionalProperties": false,
|
|
228
|
+
"properties": {}
|
|
229
|
+
}
|
|
230
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@openclaw/baseten-provider",
|
|
3
|
+
"version": "2026.7.2-beta.2",
|
|
4
|
+
"description": "OpenClaw Baseten provider plugin.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/openclaw/openclaw"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"openclaw": {
|
|
11
|
+
"extensions": [
|
|
12
|
+
"./index.ts"
|
|
13
|
+
],
|
|
14
|
+
"install": {
|
|
15
|
+
"clawhubSpec": "clawhub:@openclaw/baseten-provider",
|
|
16
|
+
"npmSpec": "@openclaw/baseten-provider",
|
|
17
|
+
"defaultChoice": "npm",
|
|
18
|
+
"minHostVersion": ">=2026.7.2-beta.2"
|
|
19
|
+
},
|
|
20
|
+
"compat": {
|
|
21
|
+
"pluginApi": ">=2026.7.2-beta.2"
|
|
22
|
+
},
|
|
23
|
+
"build": {
|
|
24
|
+
"openclawVersion": "2026.7.2-beta.2",
|
|
25
|
+
"bundledDist": false
|
|
26
|
+
},
|
|
27
|
+
"release": {
|
|
28
|
+
"publishToClawHub": true,
|
|
29
|
+
"publishToNpm": true
|
|
30
|
+
},
|
|
31
|
+
"runtimeExtensions": [
|
|
32
|
+
"./dist/index.js"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist/**",
|
|
37
|
+
"openclaw.plugin.json",
|
|
38
|
+
"npm-shrinkwrap.json",
|
|
39
|
+
"README.md"
|
|
40
|
+
],
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"openclaw": ">=2026.7.2-beta.2"
|
|
43
|
+
},
|
|
44
|
+
"peerDependenciesMeta": {
|
|
45
|
+
"openclaw": {
|
|
46
|
+
"optional": true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"bundledDependencies": []
|
|
50
|
+
}
|