@openclaw/stepfun-provider 2026.10.10-beta.5 → 2026.11.5-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.
@@ -0,0 +1 @@
1
+ {"version":3,"entries":[{"output":"index.js","source":"extensions/stepfun/index.ts"}],"chunks":[{"output":"index.js","sha256":"8532505a1573e2dc612201ae6460e4758038134cf601a7a342233cb6b6998783","facadeSource":"extensions/stepfun/index.ts","sources":["extensions/stepfun/index.ts","extensions/stepfun/openclaw.plugin.json"]}],"unrenderedSources":[]}
package/dist/index.js CHANGED
@@ -1,10 +1,193 @@
1
- import { a as STEPFUN_PLAN_PROVIDER_ID, c as STEPFUN_STANDARD_INTL_BASE_URL, i as STEPFUN_PLAN_INTL_BASE_URL, l as buildStepFunPlanProvider, n as STEPFUN_PLAN_CN_BASE_URL, o as STEPFUN_PROVIDER_ID, r as STEPFUN_PLAN_DEFAULT_MODEL_REF, s as STEPFUN_STANDARD_CN_BASE_URL, t as STEPFUN_DEFAULT_MODEL_REF, u as buildStepFunProvider } from "./.setup/provider-catalog-BnsJu-SS.mjs";
2
- import { applyStepFunPlanConfig, applyStepFunPlanConfigCn, applyStepFunStandardConfig, applyStepFunStandardConfigCn } from "./onboard.js";
3
1
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
4
2
  import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key";
5
3
  import { buildOpenAICompatibleLiveProviderCatalog } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
4
+ import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
5
+ import { createProviderConnectionPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
6
6
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
- //#region extensions/stepfun/index.ts
7
+ // extensions/stepfun/openclaw.plugin.json
8
+ var modelCatalog = {
9
+ "aliases": {
10
+ "stepfun-ai": {
11
+ "provider": "stepfun",
12
+ "api": "openai-completions"
13
+ },
14
+ "stepfun-ai-step-plan": {
15
+ "provider": "stepfun-plan",
16
+ "api": "openai-completions"
17
+ }
18
+ },
19
+ "modelsDev": {
20
+ "stepfun": "stepfun-ai",
21
+ "stepfun-plan": "stepfun-ai-step-plan"
22
+ },
23
+ "providers": {
24
+ "stepfun": {
25
+ "baseUrl": "https://api.stepfun.ai/v1",
26
+ "api": "openai-completions",
27
+ "family": "stepfun",
28
+ "models": [{
29
+ "id": "step-3.7-flash",
30
+ "name": "Step 3.7 Flash",
31
+ "reasoning": true,
32
+ "input": ["text", "image"],
33
+ "thinkingLevelMap": {
34
+ "off": "low",
35
+ "minimal": "low",
36
+ "xhigh": "high",
37
+ "max": "high"
38
+ },
39
+ "contextWindow": 262144,
40
+ "maxTokens": 262144,
41
+ "cost": {
42
+ "input": .2,
43
+ "output": 1.15,
44
+ "cacheRead": .04,
45
+ "cacheWrite": 0
46
+ },
47
+ "compat": {
48
+ "supportsStore": false,
49
+ "supportsDeveloperRole": false,
50
+ "supportsUsageInStreaming": false,
51
+ "supportsReasoningEffort": true,
52
+ "supportsStrictMode": false,
53
+ "supportedReasoningEfforts": [
54
+ "low",
55
+ "medium",
56
+ "high"
57
+ ],
58
+ "maxTokensField": "max_tokens",
59
+ "reasoningEffortMap": {
60
+ "off": "low",
61
+ "none": "low",
62
+ "minimal": "low",
63
+ "low": "low",
64
+ "medium": "medium",
65
+ "high": "high",
66
+ "xhigh": "high",
67
+ "adaptive": "high",
68
+ "max": "high"
69
+ }
70
+ }
71
+ }, {
72
+ "id": "step-3.5-flash",
73
+ "name": "Step 3.5 Flash",
74
+ "reasoning": true,
75
+ "input": ["text"],
76
+ "contextWindow": 262144,
77
+ "maxTokens": 65536,
78
+ "cost": {
79
+ "input": .1,
80
+ "output": .3,
81
+ "cacheRead": .02,
82
+ "cacheWrite": 0
83
+ }
84
+ }]
85
+ },
86
+ "stepfun-plan": {
87
+ "baseUrl": "https://api.stepfun.ai/step_plan/v1",
88
+ "api": "openai-completions",
89
+ "family": "stepfun",
90
+ "models": [
91
+ {
92
+ "id": "step-3.7-flash",
93
+ "name": "Step 3.7 Flash",
94
+ "reasoning": true,
95
+ "input": ["text", "image"],
96
+ "thinkingLevelMap": {
97
+ "off": "low",
98
+ "minimal": "low",
99
+ "xhigh": "high",
100
+ "max": "high"
101
+ },
102
+ "contextWindow": 262144,
103
+ "maxTokens": 262144,
104
+ "cost": {
105
+ "input": 0,
106
+ "output": 0,
107
+ "cacheRead": 0,
108
+ "cacheWrite": 0
109
+ },
110
+ "compat": {
111
+ "supportsStore": false,
112
+ "supportsDeveloperRole": false,
113
+ "supportsUsageInStreaming": false,
114
+ "supportsReasoningEffort": true,
115
+ "supportsStrictMode": false,
116
+ "supportedReasoningEfforts": [
117
+ "low",
118
+ "medium",
119
+ "high"
120
+ ],
121
+ "maxTokensField": "max_tokens",
122
+ "reasoningEffortMap": {
123
+ "off": "low",
124
+ "none": "low",
125
+ "minimal": "low",
126
+ "low": "low",
127
+ "medium": "medium",
128
+ "high": "high",
129
+ "xhigh": "high",
130
+ "adaptive": "high",
131
+ "max": "high"
132
+ }
133
+ }
134
+ },
135
+ {
136
+ "id": "step-3.5-flash",
137
+ "name": "Step 3.5 Flash",
138
+ "reasoning": true,
139
+ "input": ["text"],
140
+ "contextWindow": 262144,
141
+ "maxTokens": 65536,
142
+ "cost": {
143
+ "input": 0,
144
+ "output": 0,
145
+ "cacheRead": 0,
146
+ "cacheWrite": 0
147
+ }
148
+ },
149
+ {
150
+ "id": "step-3.5-flash-2603",
151
+ "name": "Step 3.5 Flash 2603",
152
+ "reasoning": true,
153
+ "input": ["text"],
154
+ "contextWindow": 262144,
155
+ "maxTokens": 65536,
156
+ "cost": {
157
+ "input": 0,
158
+ "output": 0,
159
+ "cacheRead": 0,
160
+ "cacheWrite": 0
161
+ }
162
+ }
163
+ ]
164
+ }
165
+ },
166
+ "discovery": {
167
+ "stepfun": "refreshable",
168
+ "stepfun-plan": "refreshable"
169
+ }
170
+ };
171
+ // extensions/stepfun/index.ts
172
+ const STEPFUN_PROVIDER_ID = "stepfun";
173
+ const STEPFUN_PLAN_PROVIDER_ID = "stepfun-plan";
174
+ const STEPFUN_STANDARD_CN_BASE_URL = "https://api.stepfun.com/v1";
175
+ const STEPFUN_STANDARD_INTL_BASE_URL = "https://api.stepfun.ai/v1";
176
+ const STEPFUN_PLAN_CN_BASE_URL = "https://api.stepfun.com/step_plan/v1";
177
+ const STEPFUN_PLAN_INTL_BASE_URL = "https://api.stepfun.ai/step_plan/v1";
178
+ const STEPFUN_DEFAULT_MODEL_ID = "step-3.5-flash";
179
+ const STEPFUN_DEFAULT_MODEL_REF = `${STEPFUN_PROVIDER_ID}/${STEPFUN_DEFAULT_MODEL_ID}`;
180
+ const STEPFUN_PLAN_DEFAULT_MODEL_REF = `${STEPFUN_PLAN_PROVIDER_ID}/${STEPFUN_DEFAULT_MODEL_ID}`;
181
+ function buildStepFunManifestProvider(providerId, baseUrl) {
182
+ const provider = buildManifestModelProviderConfig({
183
+ providerId,
184
+ catalog: modelCatalog.providers[providerId]
185
+ });
186
+ return provider.baseUrl === baseUrl ? provider : {
187
+ ...provider,
188
+ baseUrl
189
+ };
190
+ }
8
191
  const STEPFUN_SURFACES = {
9
192
  standard: {
10
193
  providerId: STEPFUN_PROVIDER_ID,
@@ -15,11 +198,8 @@ const STEPFUN_SURFACES = {
15
198
  cn: STEPFUN_STANDARD_CN_BASE_URL,
16
199
  intl: STEPFUN_STANDARD_INTL_BASE_URL
17
200
  },
18
- buildProvider: buildStepFunProvider,
19
- applyConfig: {
20
- cn: applyStepFunStandardConfigCn,
21
- intl: applyStepFunStandardConfig
22
- }
201
+ buildProvider: (baseUrl = STEPFUN_STANDARD_INTL_BASE_URL) => buildStepFunManifestProvider(STEPFUN_PROVIDER_ID, baseUrl),
202
+ modelAlias: "StepFun"
23
203
  },
24
204
  plan: {
25
205
  providerId: STEPFUN_PLAN_PROVIDER_ID,
@@ -30,11 +210,8 @@ const STEPFUN_SURFACES = {
30
210
  cn: STEPFUN_PLAN_CN_BASE_URL,
31
211
  intl: STEPFUN_PLAN_INTL_BASE_URL
32
212
  },
33
- buildProvider: buildStepFunPlanProvider,
34
- applyConfig: {
35
- cn: applyStepFunPlanConfigCn,
36
- intl: applyStepFunPlanConfig
37
- }
213
+ buildProvider: (baseUrl = STEPFUN_PLAN_INTL_BASE_URL) => buildStepFunManifestProvider(STEPFUN_PLAN_PROVIDER_ID, baseUrl),
214
+ modelAlias: "StepFun Plan"
38
215
  }
39
216
  };
40
217
  function trimExplicitBaseUrl(ctx, providerId) {
@@ -51,55 +228,6 @@ function inferRegionFromProfileId(profileId) {
51
228
  if (profileId.includes(":cn")) return "cn";
52
229
  if (profileId.includes(":intl")) return "intl";
53
230
  }
54
- async function resolveStepFunCatalog(ctx, params) {
55
- const profileAuth = ctx.resolveProviderAuth(params.providerId);
56
- const auth = profileAuth.apiKey ? profileAuth : ctx.resolveProviderApiKey(params.providerId);
57
- const apiKey = auth.apiKey;
58
- if (!apiKey) return null;
59
- const explicitBaseUrl = trimExplicitBaseUrl(ctx, params.providerId);
60
- const region = inferRegionFromBaseUrl(explicitBaseUrl) ?? inferRegionFromBaseUrl(trimExplicitBaseUrl(ctx, "stepfun")) ?? inferRegionFromBaseUrl(trimExplicitBaseUrl(ctx, "stepfun-plan")) ?? inferRegionFromProfileId(auth.profileId);
61
- const provider = STEPFUN_SURFACES[params.surface];
62
- const baseUrl = explicitBaseUrl ?? provider.baseUrls[region ?? "intl"];
63
- const providerConfig = provider.buildProvider(baseUrl);
64
- return await buildOpenAICompatibleLiveProviderCatalog({
65
- discoveryMode: "strict",
66
- providerId: params.providerId,
67
- providerConfig,
68
- apiKey,
69
- discoveryApiKey: auth.discoveryApiKey,
70
- profileId: auth.profileId
71
- });
72
- }
73
- function createStepFunApiKeyMethod(surface, region) {
74
- const provider = STEPFUN_SURFACES[surface];
75
- const methodId = `${surface}-api-key-${region}`;
76
- const label = `${provider.authLabel} API key (${region === "cn" ? "China" : "Global/Intl"})`;
77
- const hint = `Endpoint: ${provider.baseUrls[region].replace(/^https:\/\//u, "")}`;
78
- return createProviderApiKeyAuthMethod({
79
- providerId: provider.providerId,
80
- methodId,
81
- label,
82
- hint,
83
- optionKey: "stepfunApiKey",
84
- flagName: "--stepfun-api-key",
85
- envVar: "STEPFUN_API_KEY",
86
- promptMessage: `Enter StepFun API key for ${region === "cn" ? "China" : "global"} endpoints`,
87
- profileIds: [`stepfun:${region}`, `stepfun-plan:${region}`],
88
- allowProfile: false,
89
- defaultModel: provider.defaultModel,
90
- preserveExistingPrimary: true,
91
- expectedProviders: [STEPFUN_PROVIDER_ID, STEPFUN_PLAN_PROVIDER_ID],
92
- applyConfig: provider.applyConfig[region],
93
- wizard: {
94
- choiceId: `stepfun-${methodId}`,
95
- choiceLabel: label,
96
- choiceHint: hint,
97
- groupId: "stepfun",
98
- groupLabel: "StepFun",
99
- groupHint: "Standard / Step Plan (China / Global)"
100
- }
101
- });
102
- }
103
231
  var stepfun_default = definePluginEntry({
104
232
  id: STEPFUN_PROVIDER_ID,
105
233
  name: "StepFun",
@@ -107,18 +235,76 @@ var stepfun_default = definePluginEntry({
107
235
  register(api) {
108
236
  for (const surface of ["standard", "plan"]) {
109
237
  const provider = STEPFUN_SURFACES[surface];
238
+ const presetAppliers = createProviderConnectionPresetAppliers({
239
+ primaryModelRef: provider.defaultModel,
240
+ resolveParams: (_cfg, baseUrl) => {
241
+ const catalog = provider.buildProvider(baseUrl);
242
+ return {
243
+ providerId: provider.providerId,
244
+ api: catalog.api ?? "openai-completions",
245
+ baseUrl,
246
+ catalogModels: catalog.models,
247
+ aliases: [...catalog.models.map((model) => `${provider.providerId}/${model.id}`), {
248
+ modelRef: provider.defaultModel,
249
+ alias: provider.modelAlias
250
+ }]
251
+ };
252
+ }
253
+ });
110
254
  api.registerProvider({
111
255
  id: provider.providerId,
112
256
  label: provider.label,
113
257
  docsPath: "/providers/stepfun",
114
258
  envVars: ["STEPFUN_API_KEY"],
115
- auth: ["cn", "intl"].map((region) => createStepFunApiKeyMethod(surface, region)),
259
+ auth: ["cn", "intl"].map((region) => {
260
+ const methodId = `${surface}-api-key-${region}`;
261
+ const label = `${provider.authLabel} API key (${region === "cn" ? "China" : "Global/Intl"})`;
262
+ const hint = `Endpoint: ${provider.baseUrls[region].replace(/^https:\/\//u, "")}`;
263
+ return createProviderApiKeyAuthMethod({
264
+ providerId: provider.providerId,
265
+ methodId,
266
+ label,
267
+ hint,
268
+ optionKey: "stepfunApiKey",
269
+ flagName: "--stepfun-api-key",
270
+ envVar: "STEPFUN_API_KEY",
271
+ promptMessage: `Enter StepFun API key for ${region === "cn" ? "China" : "global"} endpoints`,
272
+ profileIds: [`stepfun:${region}`, `stepfun-plan:${region}`],
273
+ allowProfile: false,
274
+ defaultModel: provider.defaultModel,
275
+ preserveExistingPrimary: true,
276
+ expectedProviders: [STEPFUN_PROVIDER_ID, STEPFUN_PLAN_PROVIDER_ID],
277
+ applyConfig: (cfg) => presetAppliers.applyConfig(cfg, provider.baseUrls[region]),
278
+ wizard: {
279
+ choiceId: `stepfun-${methodId}`,
280
+ choiceLabel: label,
281
+ choiceHint: hint,
282
+ groupId: "stepfun",
283
+ groupLabel: "StepFun",
284
+ groupHint: "Standard / Step Plan (China / Global)"
285
+ }
286
+ });
287
+ }),
116
288
  catalog: {
117
289
  order: "paired",
118
- run: async (ctx) => resolveStepFunCatalog(ctx, {
119
- providerId: provider.providerId,
120
- surface
121
- })
290
+ run: async (ctx) => {
291
+ const profileAuth = ctx.resolveProviderAuth(provider.providerId);
292
+ const auth = profileAuth.apiKey ? profileAuth : ctx.resolveProviderApiKey(provider.providerId);
293
+ const apiKey = auth.apiKey;
294
+ if (!apiKey) return null;
295
+ const explicitBaseUrl = trimExplicitBaseUrl(ctx, provider.providerId);
296
+ const region = inferRegionFromBaseUrl(explicitBaseUrl) ?? inferRegionFromBaseUrl(trimExplicitBaseUrl(ctx, STEPFUN_PROVIDER_ID)) ?? inferRegionFromBaseUrl(trimExplicitBaseUrl(ctx, STEPFUN_PLAN_PROVIDER_ID)) ?? inferRegionFromProfileId(auth.profileId);
297
+ const baseUrl = explicitBaseUrl ?? provider.baseUrls[region ?? "intl"];
298
+ const providerConfig = provider.buildProvider(baseUrl);
299
+ return await buildOpenAICompatibleLiveProviderCatalog({
300
+ discoveryMode: "strict",
301
+ providerId: provider.providerId,
302
+ providerConfig,
303
+ apiKey,
304
+ discoveryApiKey: auth.discoveryApiKey,
305
+ profileId: auth.profileId
306
+ });
307
+ }
122
308
  },
123
309
  staticCatalog: {
124
310
  order: "paired",
@@ -128,5 +314,4 @@ var stepfun_default = definePluginEntry({
128
314
  }
129
315
  }
130
316
  });
131
- //#endregion
132
317
  export { stepfun_default as default };
@@ -39,6 +39,7 @@
39
39
  "stepfun": {
40
40
  "baseUrl": "https://api.stepfun.ai/v1",
41
41
  "api": "openai-completions",
42
+ "family": "stepfun",
42
43
  "models": [
43
44
  {
44
45
  "id": "step-3.7-flash",
@@ -99,6 +100,7 @@
99
100
  "stepfun-plan": {
100
101
  "baseUrl": "https://api.stepfun.ai/step_plan/v1",
101
102
  "api": "openai-completions",
103
+ "family": "stepfun",
102
104
  "models": [
103
105
  {
104
106
  "id": "step-3.7-flash",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/stepfun-provider",
3
- "version": "2026.10.10-beta.5",
3
+ "version": "2026.11.5-beta.1",
4
4
  "description": "OpenClaw StepFun provider plugin.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,10 +18,10 @@
18
18
  "minHostVersion": ">=2026.6.9"
19
19
  },
20
20
  "compat": {
21
- "pluginApi": ">=2026.10.10-beta.5"
21
+ "pluginApi": ">=2026.11.5-beta.1"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.10.10-beta.5",
24
+ "openclawVersion": "2026.11.5-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.10.10-beta.5"
43
+ "openclaw": ">=2026.11.5-beta.1"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "openclaw": {
@@ -1,192 +0,0 @@
1
- import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
2
- //#region extensions/stepfun/openclaw.plugin.json
3
- var modelCatalog = {
4
- "aliases": {
5
- "stepfun-ai": {
6
- "provider": "stepfun",
7
- "api": "openai-completions"
8
- },
9
- "stepfun-ai-step-plan": {
10
- "provider": "stepfun-plan",
11
- "api": "openai-completions"
12
- }
13
- },
14
- "modelsDev": {
15
- "stepfun": "stepfun-ai",
16
- "stepfun-plan": "stepfun-ai-step-plan"
17
- },
18
- "providers": {
19
- "stepfun": {
20
- "baseUrl": "https://api.stepfun.ai/v1",
21
- "api": "openai-completions",
22
- "models": [{
23
- "id": "step-3.7-flash",
24
- "name": "Step 3.7 Flash",
25
- "reasoning": true,
26
- "input": ["text", "image"],
27
- "thinkingLevelMap": {
28
- "off": "low",
29
- "minimal": "low",
30
- "xhigh": "high",
31
- "max": "high"
32
- },
33
- "contextWindow": 262144,
34
- "maxTokens": 262144,
35
- "cost": {
36
- "input": .2,
37
- "output": 1.15,
38
- "cacheRead": .04,
39
- "cacheWrite": 0
40
- },
41
- "compat": {
42
- "supportsStore": false,
43
- "supportsDeveloperRole": false,
44
- "supportsUsageInStreaming": false,
45
- "supportsReasoningEffort": true,
46
- "supportsStrictMode": false,
47
- "supportedReasoningEfforts": [
48
- "low",
49
- "medium",
50
- "high"
51
- ],
52
- "maxTokensField": "max_tokens",
53
- "reasoningEffortMap": {
54
- "off": "low",
55
- "none": "low",
56
- "minimal": "low",
57
- "low": "low",
58
- "medium": "medium",
59
- "high": "high",
60
- "xhigh": "high",
61
- "adaptive": "high",
62
- "max": "high"
63
- }
64
- }
65
- }, {
66
- "id": "step-3.5-flash",
67
- "name": "Step 3.5 Flash",
68
- "reasoning": true,
69
- "input": ["text"],
70
- "contextWindow": 262144,
71
- "maxTokens": 65536,
72
- "cost": {
73
- "input": .1,
74
- "output": .3,
75
- "cacheRead": .02,
76
- "cacheWrite": 0
77
- }
78
- }]
79
- },
80
- "stepfun-plan": {
81
- "baseUrl": "https://api.stepfun.ai/step_plan/v1",
82
- "api": "openai-completions",
83
- "models": [
84
- {
85
- "id": "step-3.7-flash",
86
- "name": "Step 3.7 Flash",
87
- "reasoning": true,
88
- "input": ["text", "image"],
89
- "thinkingLevelMap": {
90
- "off": "low",
91
- "minimal": "low",
92
- "xhigh": "high",
93
- "max": "high"
94
- },
95
- "contextWindow": 262144,
96
- "maxTokens": 262144,
97
- "cost": {
98
- "input": 0,
99
- "output": 0,
100
- "cacheRead": 0,
101
- "cacheWrite": 0
102
- },
103
- "compat": {
104
- "supportsStore": false,
105
- "supportsDeveloperRole": false,
106
- "supportsUsageInStreaming": false,
107
- "supportsReasoningEffort": true,
108
- "supportsStrictMode": false,
109
- "supportedReasoningEfforts": [
110
- "low",
111
- "medium",
112
- "high"
113
- ],
114
- "maxTokensField": "max_tokens",
115
- "reasoningEffortMap": {
116
- "off": "low",
117
- "none": "low",
118
- "minimal": "low",
119
- "low": "low",
120
- "medium": "medium",
121
- "high": "high",
122
- "xhigh": "high",
123
- "adaptive": "high",
124
- "max": "high"
125
- }
126
- }
127
- },
128
- {
129
- "id": "step-3.5-flash",
130
- "name": "Step 3.5 Flash",
131
- "reasoning": true,
132
- "input": ["text"],
133
- "contextWindow": 262144,
134
- "maxTokens": 65536,
135
- "cost": {
136
- "input": 0,
137
- "output": 0,
138
- "cacheRead": 0,
139
- "cacheWrite": 0
140
- }
141
- },
142
- {
143
- "id": "step-3.5-flash-2603",
144
- "name": "Step 3.5 Flash 2603",
145
- "reasoning": true,
146
- "input": ["text"],
147
- "contextWindow": 262144,
148
- "maxTokens": 65536,
149
- "cost": {
150
- "input": 0,
151
- "output": 0,
152
- "cacheRead": 0,
153
- "cacheWrite": 0
154
- }
155
- }
156
- ]
157
- }
158
- },
159
- "discovery": {
160
- "stepfun": "refreshable",
161
- "stepfun-plan": "refreshable"
162
- }
163
- };
164
- //#endregion
165
- //#region extensions/stepfun/provider-catalog.ts
166
- const STEPFUN_PROVIDER_ID = "stepfun";
167
- const STEPFUN_PLAN_PROVIDER_ID = "stepfun-plan";
168
- const STEPFUN_STANDARD_CN_BASE_URL = "https://api.stepfun.com/v1";
169
- const STEPFUN_STANDARD_INTL_BASE_URL = "https://api.stepfun.ai/v1";
170
- const STEPFUN_PLAN_CN_BASE_URL = "https://api.stepfun.com/step_plan/v1";
171
- const STEPFUN_PLAN_INTL_BASE_URL = "https://api.stepfun.ai/step_plan/v1";
172
- const STEPFUN_DEFAULT_MODEL_ID = "step-3.5-flash";
173
- const STEPFUN_DEFAULT_MODEL_REF = `${STEPFUN_PROVIDER_ID}/${STEPFUN_DEFAULT_MODEL_ID}`;
174
- const STEPFUN_PLAN_DEFAULT_MODEL_REF = `${STEPFUN_PLAN_PROVIDER_ID}/${STEPFUN_DEFAULT_MODEL_ID}`;
175
- function buildStepFunManifestProvider(providerId, baseUrl) {
176
- const provider = buildManifestModelProviderConfig({
177
- providerId,
178
- catalog: modelCatalog.providers[providerId]
179
- });
180
- return provider.baseUrl === baseUrl ? provider : {
181
- ...provider,
182
- baseUrl
183
- };
184
- }
185
- function buildStepFunProvider(baseUrl = STEPFUN_STANDARD_INTL_BASE_URL) {
186
- return buildStepFunManifestProvider(STEPFUN_PROVIDER_ID, baseUrl);
187
- }
188
- function buildStepFunPlanProvider(baseUrl = STEPFUN_PLAN_INTL_BASE_URL) {
189
- return buildStepFunManifestProvider(STEPFUN_PLAN_PROVIDER_ID, baseUrl);
190
- }
191
- //#endregion
192
- export { STEPFUN_PLAN_PROVIDER_ID as a, STEPFUN_STANDARD_INTL_BASE_URL as c, STEPFUN_PLAN_INTL_BASE_URL as i, buildStepFunPlanProvider as l, STEPFUN_PLAN_CN_BASE_URL as n, STEPFUN_PROVIDER_ID as o, STEPFUN_PLAN_DEFAULT_MODEL_REF as r, STEPFUN_STANDARD_CN_BASE_URL as s, STEPFUN_DEFAULT_MODEL_REF as t, buildStepFunProvider as u };
@@ -1 +0,0 @@
1
- {"version":3,"entries":[{"output":"index.js","source":"extensions/stepfun/index.ts"},{"output":"onboard.js","source":"extensions/stepfun/onboard.ts"},{"output":"provider-catalog.js","source":"extensions/stepfun/provider-catalog.ts"}],"chunks":[{"output":".setup/provider-catalog-BnsJu-SS.mjs","sha256":"f60afbd0aaa3576bae45e45c228e41f64d724c10513a61865edacf7d42e16e7f","facadeSource":null,"sources":["extensions/stepfun/openclaw.plugin.json","extensions/stepfun/provider-catalog.ts"]},{"output":"index.js","sha256":"cda144154521e10a5461bc9bd31336ed9242e075ae78b83a65ae90776eab75ee","facadeSource":"extensions/stepfun/index.ts","sources":["extensions/stepfun/index.ts"]},{"output":"onboard.js","sha256":"4715b5f66145ae397fab734578f3dc90b0eae3003b26307f84dc1b54f86c66c6","facadeSource":"extensions/stepfun/onboard.ts","sources":["extensions/stepfun/onboard.ts"]},{"output":"provider-catalog.js","sha256":"f1a5b972d71770772e861aae266b25e24dc4b3c2e5b58c323768fb11f325315d","facadeSource":"extensions/stepfun/provider-catalog.ts","sources":[]}],"unrenderedSources":[]}
package/dist/onboard.js DELETED
@@ -1,47 +0,0 @@
1
- import { a as STEPFUN_PLAN_PROVIDER_ID, c as STEPFUN_STANDARD_INTL_BASE_URL, i as STEPFUN_PLAN_INTL_BASE_URL, l as buildStepFunPlanProvider, n as STEPFUN_PLAN_CN_BASE_URL, o as STEPFUN_PROVIDER_ID, r as STEPFUN_PLAN_DEFAULT_MODEL_REF, s as STEPFUN_STANDARD_CN_BASE_URL, t as STEPFUN_DEFAULT_MODEL_REF, u as buildStepFunProvider } from "./.setup/provider-catalog-BnsJu-SS.mjs";
2
- import { createProviderConnectionPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
3
- //#region extensions/stepfun/onboard.ts
4
- function createStepFunPresetAppliers(params) {
5
- return createProviderConnectionPresetAppliers({
6
- primaryModelRef: params.primaryModelRef,
7
- resolveParams: (_cfg, baseUrl) => {
8
- const provider = params.buildProvider(baseUrl);
9
- return {
10
- providerId: params.providerId,
11
- api: provider.api ?? "openai-completions",
12
- baseUrl,
13
- catalogModels: provider.models,
14
- aliases: [...provider.models.map((model) => `${params.providerId}/${model.id}`), {
15
- modelRef: params.primaryModelRef,
16
- alias: params.alias
17
- }]
18
- };
19
- }
20
- });
21
- }
22
- const stepFunPresetAppliers = createStepFunPresetAppliers({
23
- providerId: STEPFUN_PROVIDER_ID,
24
- primaryModelRef: STEPFUN_DEFAULT_MODEL_REF,
25
- alias: "StepFun",
26
- buildProvider: buildStepFunProvider
27
- });
28
- const stepFunPlanPresetAppliers = createStepFunPresetAppliers({
29
- providerId: STEPFUN_PLAN_PROVIDER_ID,
30
- primaryModelRef: STEPFUN_PLAN_DEFAULT_MODEL_REF,
31
- alias: "StepFun Plan",
32
- buildProvider: buildStepFunPlanProvider
33
- });
34
- function applyStepFunStandardConfigCn(cfg) {
35
- return stepFunPresetAppliers.applyConfig(cfg, STEPFUN_STANDARD_CN_BASE_URL);
36
- }
37
- function applyStepFunStandardConfig(cfg) {
38
- return stepFunPresetAppliers.applyConfig(cfg, STEPFUN_STANDARD_INTL_BASE_URL);
39
- }
40
- function applyStepFunPlanConfigCn(cfg) {
41
- return stepFunPlanPresetAppliers.applyConfig(cfg, STEPFUN_PLAN_CN_BASE_URL);
42
- }
43
- function applyStepFunPlanConfig(cfg) {
44
- return stepFunPlanPresetAppliers.applyConfig(cfg, STEPFUN_PLAN_INTL_BASE_URL);
45
- }
46
- //#endregion
47
- export { applyStepFunPlanConfig, applyStepFunPlanConfigCn, applyStepFunStandardConfig, applyStepFunStandardConfigCn };
@@ -1 +0,0 @@
1
- export { t as STEPFUN_DEFAULT_MODEL_REF, n as STEPFUN_PLAN_CN_BASE_URL, r as STEPFUN_PLAN_DEFAULT_MODEL_REF, i as STEPFUN_PLAN_INTL_BASE_URL, a as STEPFUN_PLAN_PROVIDER_ID, o as STEPFUN_PROVIDER_ID, s as STEPFUN_STANDARD_CN_BASE_URL, c as STEPFUN_STANDARD_INTL_BASE_URL, l as buildStepFunPlanProvider, u as buildStepFunProvider } from "./.setup/provider-catalog-BnsJu-SS.mjs";