@openclaw/stepfun-provider 2026.11.3 → 2026.11.5-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.
@@ -0,0 +1 @@
1
+ {"version":3,"entries":[{"output":"index.js","source":"extensions/stepfun/index.ts"}],"chunks":[{"output":"index.js","sha256":"c3bcfb617404be9460e29f5127d29a4210e6fb0ac280581ed1812d53476910fc","facadeSource":"extensions/stepfun/index.ts","sources":["extensions/stepfun/index.ts","extensions/stepfun/openclaw.plugin.json"]}],"unrenderedSources":[]}
package/dist/index.js CHANGED
@@ -1,10 +1,194 @@
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/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
+ //#endregion
7
172
  //#region extensions/stepfun/index.ts
173
+ const STEPFUN_PROVIDER_ID = "stepfun";
174
+ const STEPFUN_PLAN_PROVIDER_ID = "stepfun-plan";
175
+ const STEPFUN_STANDARD_CN_BASE_URL = "https://api.stepfun.com/v1";
176
+ const STEPFUN_STANDARD_INTL_BASE_URL = "https://api.stepfun.ai/v1";
177
+ const STEPFUN_PLAN_CN_BASE_URL = "https://api.stepfun.com/step_plan/v1";
178
+ const STEPFUN_PLAN_INTL_BASE_URL = "https://api.stepfun.ai/step_plan/v1";
179
+ const STEPFUN_DEFAULT_MODEL_ID = "step-3.5-flash";
180
+ const STEPFUN_DEFAULT_MODEL_REF = `${STEPFUN_PROVIDER_ID}/${STEPFUN_DEFAULT_MODEL_ID}`;
181
+ const STEPFUN_PLAN_DEFAULT_MODEL_REF = `${STEPFUN_PLAN_PROVIDER_ID}/${STEPFUN_DEFAULT_MODEL_ID}`;
182
+ function buildStepFunManifestProvider(providerId, baseUrl) {
183
+ const provider = buildManifestModelProviderConfig({
184
+ providerId,
185
+ catalog: modelCatalog.providers[providerId]
186
+ });
187
+ return provider.baseUrl === baseUrl ? provider : {
188
+ ...provider,
189
+ baseUrl
190
+ };
191
+ }
8
192
  const STEPFUN_SURFACES = {
9
193
  standard: {
10
194
  providerId: STEPFUN_PROVIDER_ID,
@@ -15,11 +199,8 @@ const STEPFUN_SURFACES = {
15
199
  cn: STEPFUN_STANDARD_CN_BASE_URL,
16
200
  intl: STEPFUN_STANDARD_INTL_BASE_URL
17
201
  },
18
- buildProvider: buildStepFunProvider,
19
- applyConfig: {
20
- cn: applyStepFunStandardConfigCn,
21
- intl: applyStepFunStandardConfig
22
- }
202
+ buildProvider: (baseUrl = STEPFUN_STANDARD_INTL_BASE_URL) => buildStepFunManifestProvider(STEPFUN_PROVIDER_ID, baseUrl),
203
+ modelAlias: "StepFun"
23
204
  },
24
205
  plan: {
25
206
  providerId: STEPFUN_PLAN_PROVIDER_ID,
@@ -30,11 +211,8 @@ const STEPFUN_SURFACES = {
30
211
  cn: STEPFUN_PLAN_CN_BASE_URL,
31
212
  intl: STEPFUN_PLAN_INTL_BASE_URL
32
213
  },
33
- buildProvider: buildStepFunPlanProvider,
34
- applyConfig: {
35
- cn: applyStepFunPlanConfigCn,
36
- intl: applyStepFunPlanConfig
37
- }
214
+ buildProvider: (baseUrl = STEPFUN_PLAN_INTL_BASE_URL) => buildStepFunManifestProvider(STEPFUN_PLAN_PROVIDER_ID, baseUrl),
215
+ modelAlias: "StepFun Plan"
38
216
  }
39
217
  };
40
218
  function trimExplicitBaseUrl(ctx, providerId) {
@@ -51,55 +229,6 @@ function inferRegionFromProfileId(profileId) {
51
229
  if (profileId.includes(":cn")) return "cn";
52
230
  if (profileId.includes(":intl")) return "intl";
53
231
  }
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
232
  var stepfun_default = definePluginEntry({
104
233
  id: STEPFUN_PROVIDER_ID,
105
234
  name: "StepFun",
@@ -107,18 +236,76 @@ var stepfun_default = definePluginEntry({
107
236
  register(api) {
108
237
  for (const surface of ["standard", "plan"]) {
109
238
  const provider = STEPFUN_SURFACES[surface];
239
+ const presetAppliers = createProviderConnectionPresetAppliers({
240
+ primaryModelRef: provider.defaultModel,
241
+ resolveParams: (_cfg, baseUrl) => {
242
+ const catalog = provider.buildProvider(baseUrl);
243
+ return {
244
+ providerId: provider.providerId,
245
+ api: catalog.api ?? "openai-completions",
246
+ baseUrl,
247
+ catalogModels: catalog.models,
248
+ aliases: [...catalog.models.map((model) => `${provider.providerId}/${model.id}`), {
249
+ modelRef: provider.defaultModel,
250
+ alias: provider.modelAlias
251
+ }]
252
+ };
253
+ }
254
+ });
110
255
  api.registerProvider({
111
256
  id: provider.providerId,
112
257
  label: provider.label,
113
258
  docsPath: "/providers/stepfun",
114
259
  envVars: ["STEPFUN_API_KEY"],
115
- auth: ["cn", "intl"].map((region) => createStepFunApiKeyMethod(surface, region)),
260
+ auth: ["cn", "intl"].map((region) => {
261
+ const methodId = `${surface}-api-key-${region}`;
262
+ const label = `${provider.authLabel} API key (${region === "cn" ? "China" : "Global/Intl"})`;
263
+ const hint = `Endpoint: ${provider.baseUrls[region].replace(/^https:\/\//u, "")}`;
264
+ return createProviderApiKeyAuthMethod({
265
+ providerId: provider.providerId,
266
+ methodId,
267
+ label,
268
+ hint,
269
+ optionKey: "stepfunApiKey",
270
+ flagName: "--stepfun-api-key",
271
+ envVar: "STEPFUN_API_KEY",
272
+ promptMessage: `Enter StepFun API key for ${region === "cn" ? "China" : "global"} endpoints`,
273
+ profileIds: [`stepfun:${region}`, `stepfun-plan:${region}`],
274
+ allowProfile: false,
275
+ defaultModel: provider.defaultModel,
276
+ preserveExistingPrimary: true,
277
+ expectedProviders: [STEPFUN_PROVIDER_ID, STEPFUN_PLAN_PROVIDER_ID],
278
+ applyConfig: (cfg) => presetAppliers.applyConfig(cfg, provider.baseUrls[region]),
279
+ wizard: {
280
+ choiceId: `stepfun-${methodId}`,
281
+ choiceLabel: label,
282
+ choiceHint: hint,
283
+ groupId: "stepfun",
284
+ groupLabel: "StepFun",
285
+ groupHint: "Standard / Step Plan (China / Global)"
286
+ }
287
+ });
288
+ }),
116
289
  catalog: {
117
290
  order: "paired",
118
- run: async (ctx) => resolveStepFunCatalog(ctx, {
119
- providerId: provider.providerId,
120
- surface
121
- })
291
+ run: async (ctx) => {
292
+ const profileAuth = ctx.resolveProviderAuth(provider.providerId);
293
+ const auth = profileAuth.apiKey ? profileAuth : ctx.resolveProviderApiKey(provider.providerId);
294
+ const apiKey = auth.apiKey;
295
+ if (!apiKey) return null;
296
+ const explicitBaseUrl = trimExplicitBaseUrl(ctx, provider.providerId);
297
+ const region = inferRegionFromBaseUrl(explicitBaseUrl) ?? inferRegionFromBaseUrl(trimExplicitBaseUrl(ctx, STEPFUN_PROVIDER_ID)) ?? inferRegionFromBaseUrl(trimExplicitBaseUrl(ctx, STEPFUN_PLAN_PROVIDER_ID)) ?? inferRegionFromProfileId(auth.profileId);
298
+ const baseUrl = explicitBaseUrl ?? provider.baseUrls[region ?? "intl"];
299
+ const providerConfig = provider.buildProvider(baseUrl);
300
+ return await buildOpenAICompatibleLiveProviderCatalog({
301
+ discoveryMode: "strict",
302
+ providerId: provider.providerId,
303
+ providerConfig,
304
+ apiKey,
305
+ discoveryApiKey: auth.discoveryApiKey,
306
+ profileId: auth.profileId
307
+ });
308
+ }
122
309
  },
123
310
  staticCatalog: {
124
311
  order: "paired",
@@ -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.11.3",
3
+ "version": "2026.11.5-beta.2",
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.11.3"
21
+ "pluginApi": ">=2026.11.5-beta.2"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.11.3",
24
+ "openclawVersion": "2026.11.5-beta.2",
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.11.3"
43
+ "openclaw": ">=2026.11.5-beta.2"
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 };
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,2 +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
- export { STEPFUN_DEFAULT_MODEL_REF, STEPFUN_PLAN_CN_BASE_URL, STEPFUN_PLAN_DEFAULT_MODEL_REF, STEPFUN_PLAN_INTL_BASE_URL, STEPFUN_PLAN_PROVIDER_ID, STEPFUN_PROVIDER_ID, STEPFUN_STANDARD_CN_BASE_URL, STEPFUN_STANDARD_INTL_BASE_URL, buildStepFunPlanProvider, buildStepFunProvider };