@openclaw/stepfun-provider 0.0.0 → 2026.6.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/index.js +163 -0
- package/dist/onboard.js +48 -0
- package/dist/provider-catalog-D-r4WCiD.js +88 -0
- package/dist/provider-catalog.js +2 -0
- package/npm-shrinkwrap.json +12 -0
- package/openclaw.plugin.json +146 -0
- package/package.json +42 -8
package/README.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# OpenClaw StepFun Provider
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Official OpenClaw provider plugin for StepFun.
|
|
4
|
+
|
|
5
|
+
Install from OpenClaw:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
openclaw plugins install @openclaw/stepfun-provider
|
|
9
|
+
openclaw gateway restart
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
See <https://docs.openclaw.ai/providers/stepfun> for setup and configuration.
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
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 "./provider-catalog-D-r4WCiD.js";
|
|
2
|
+
import { applyStepFunPlanConfig, applyStepFunPlanConfigCn, applyStepFunStandardConfig, applyStepFunStandardConfigCn } from "./onboard.js";
|
|
3
|
+
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
4
|
+
import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key";
|
|
5
|
+
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
+
//#region extensions/stepfun/index.ts
|
|
7
|
+
function trimExplicitBaseUrl(ctx, providerId) {
|
|
8
|
+
const explicitProvider = ctx.config.models?.providers?.[providerId];
|
|
9
|
+
return (typeof explicitProvider?.baseUrl === "string" ? explicitProvider.baseUrl.trim() : "") || void 0;
|
|
10
|
+
}
|
|
11
|
+
function inferRegionFromBaseUrl(baseUrl) {
|
|
12
|
+
if (!baseUrl) return;
|
|
13
|
+
try {
|
|
14
|
+
const host = normalizeLowercaseStringOrEmpty(new URL(baseUrl).hostname);
|
|
15
|
+
if (host === "api.stepfun.com") return "cn";
|
|
16
|
+
if (host === "api.stepfun.ai") return "intl";
|
|
17
|
+
} catch {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function inferRegionFromProfileId(profileId) {
|
|
22
|
+
if (!profileId) return;
|
|
23
|
+
if (profileId.includes(":cn")) return "cn";
|
|
24
|
+
if (profileId.includes(":intl")) return "intl";
|
|
25
|
+
}
|
|
26
|
+
function inferRegionFromEnv(env) {
|
|
27
|
+
if (env.STEPFUN_API_KEY?.trim()) return "intl";
|
|
28
|
+
}
|
|
29
|
+
function inferRegionFromExplicitBaseUrls(ctx) {
|
|
30
|
+
return inferRegionFromBaseUrl(trimExplicitBaseUrl(ctx, "stepfun")) ?? inferRegionFromBaseUrl(trimExplicitBaseUrl(ctx, "stepfun-plan"));
|
|
31
|
+
}
|
|
32
|
+
function resolveDefaultBaseUrl(surface, region) {
|
|
33
|
+
if (surface === "plan") return region === "cn" ? STEPFUN_PLAN_CN_BASE_URL : STEPFUN_PLAN_INTL_BASE_URL;
|
|
34
|
+
return region === "cn" ? STEPFUN_STANDARD_CN_BASE_URL : STEPFUN_STANDARD_INTL_BASE_URL;
|
|
35
|
+
}
|
|
36
|
+
function resolveStepFunCatalog(ctx, params) {
|
|
37
|
+
const auth = ctx.resolveProviderAuth(params.providerId);
|
|
38
|
+
const apiKey = auth.apiKey ?? ctx.resolveProviderApiKey(params.providerId).apiKey;
|
|
39
|
+
if (!apiKey) return null;
|
|
40
|
+
const explicitBaseUrl = trimExplicitBaseUrl(ctx, params.providerId);
|
|
41
|
+
const region = inferRegionFromBaseUrl(explicitBaseUrl) ?? inferRegionFromExplicitBaseUrls(ctx) ?? inferRegionFromProfileId(auth.profileId) ?? inferRegionFromEnv(ctx.env);
|
|
42
|
+
const baseUrl = explicitBaseUrl ?? resolveDefaultBaseUrl(params.surface, region ?? "intl");
|
|
43
|
+
return { provider: params.surface === "plan" ? {
|
|
44
|
+
...buildStepFunPlanProvider(baseUrl),
|
|
45
|
+
apiKey
|
|
46
|
+
} : {
|
|
47
|
+
...buildStepFunProvider(baseUrl),
|
|
48
|
+
apiKey
|
|
49
|
+
} };
|
|
50
|
+
}
|
|
51
|
+
function resolveProfileIds(region) {
|
|
52
|
+
return region === "cn" ? ["stepfun:cn", "stepfun-plan:cn"] : ["stepfun:intl", "stepfun-plan:intl"];
|
|
53
|
+
}
|
|
54
|
+
function createStepFunApiKeyMethod(params) {
|
|
55
|
+
return createProviderApiKeyAuthMethod({
|
|
56
|
+
providerId: params.providerId,
|
|
57
|
+
methodId: params.methodId,
|
|
58
|
+
label: params.label,
|
|
59
|
+
hint: params.hint,
|
|
60
|
+
optionKey: "stepfunApiKey",
|
|
61
|
+
flagName: "--stepfun-api-key",
|
|
62
|
+
envVar: "STEPFUN_API_KEY",
|
|
63
|
+
promptMessage: params.promptMessage,
|
|
64
|
+
profileIds: resolveProfileIds(params.region),
|
|
65
|
+
allowProfile: false,
|
|
66
|
+
defaultModel: params.defaultModel,
|
|
67
|
+
expectedProviders: [STEPFUN_PROVIDER_ID, STEPFUN_PLAN_PROVIDER_ID],
|
|
68
|
+
applyConfig: params.applyConfig,
|
|
69
|
+
wizard: {
|
|
70
|
+
choiceId: params.choiceId,
|
|
71
|
+
choiceLabel: params.choiceLabel,
|
|
72
|
+
choiceHint: params.choiceHint,
|
|
73
|
+
groupId: "stepfun",
|
|
74
|
+
groupLabel: "StepFun",
|
|
75
|
+
groupHint: "Standard / Step Plan (China / Global)"
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
var stepfun_default = definePluginEntry({
|
|
80
|
+
id: STEPFUN_PROVIDER_ID,
|
|
81
|
+
name: "StepFun",
|
|
82
|
+
description: "Bundled StepFun standard and Step Plan provider plugin",
|
|
83
|
+
register(api) {
|
|
84
|
+
api.registerProvider({
|
|
85
|
+
id: STEPFUN_PROVIDER_ID,
|
|
86
|
+
label: "StepFun",
|
|
87
|
+
docsPath: "/providers/stepfun",
|
|
88
|
+
envVars: ["STEPFUN_API_KEY"],
|
|
89
|
+
auth: [createStepFunApiKeyMethod({
|
|
90
|
+
providerId: STEPFUN_PROVIDER_ID,
|
|
91
|
+
methodId: "standard-api-key-cn",
|
|
92
|
+
label: "StepFun Standard API key (China)",
|
|
93
|
+
hint: "Endpoint: api.stepfun.com/v1",
|
|
94
|
+
region: "cn",
|
|
95
|
+
promptMessage: "Enter StepFun API key for China endpoints",
|
|
96
|
+
defaultModel: STEPFUN_DEFAULT_MODEL_REF,
|
|
97
|
+
choiceId: "stepfun-standard-api-key-cn",
|
|
98
|
+
choiceLabel: "StepFun Standard API key (China)",
|
|
99
|
+
choiceHint: "Endpoint: api.stepfun.com/v1",
|
|
100
|
+
applyConfig: applyStepFunStandardConfigCn
|
|
101
|
+
}), createStepFunApiKeyMethod({
|
|
102
|
+
providerId: STEPFUN_PROVIDER_ID,
|
|
103
|
+
methodId: "standard-api-key-intl",
|
|
104
|
+
label: "StepFun Standard API key (Global/Intl)",
|
|
105
|
+
hint: "Endpoint: api.stepfun.ai/v1",
|
|
106
|
+
region: "intl",
|
|
107
|
+
promptMessage: "Enter StepFun API key for global endpoints",
|
|
108
|
+
defaultModel: STEPFUN_DEFAULT_MODEL_REF,
|
|
109
|
+
choiceId: "stepfun-standard-api-key-intl",
|
|
110
|
+
choiceLabel: "StepFun Standard API key (Global/Intl)",
|
|
111
|
+
choiceHint: "Endpoint: api.stepfun.ai/v1",
|
|
112
|
+
applyConfig: applyStepFunStandardConfig
|
|
113
|
+
})],
|
|
114
|
+
catalog: {
|
|
115
|
+
order: "paired",
|
|
116
|
+
run: async (ctx) => resolveStepFunCatalog(ctx, {
|
|
117
|
+
providerId: STEPFUN_PROVIDER_ID,
|
|
118
|
+
surface: "standard"
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
api.registerProvider({
|
|
123
|
+
id: STEPFUN_PLAN_PROVIDER_ID,
|
|
124
|
+
label: "StepFun Step Plan",
|
|
125
|
+
docsPath: "/providers/stepfun",
|
|
126
|
+
envVars: ["STEPFUN_API_KEY"],
|
|
127
|
+
auth: [createStepFunApiKeyMethod({
|
|
128
|
+
providerId: STEPFUN_PLAN_PROVIDER_ID,
|
|
129
|
+
methodId: "plan-api-key-cn",
|
|
130
|
+
label: "StepFun Step Plan API key (China)",
|
|
131
|
+
hint: "Endpoint: api.stepfun.com/step_plan/v1",
|
|
132
|
+
region: "cn",
|
|
133
|
+
promptMessage: "Enter StepFun API key for China endpoints",
|
|
134
|
+
defaultModel: STEPFUN_PLAN_DEFAULT_MODEL_REF,
|
|
135
|
+
choiceId: "stepfun-plan-api-key-cn",
|
|
136
|
+
choiceLabel: "StepFun Step Plan API key (China)",
|
|
137
|
+
choiceHint: "Endpoint: api.stepfun.com/step_plan/v1",
|
|
138
|
+
applyConfig: applyStepFunPlanConfigCn
|
|
139
|
+
}), createStepFunApiKeyMethod({
|
|
140
|
+
providerId: STEPFUN_PLAN_PROVIDER_ID,
|
|
141
|
+
methodId: "plan-api-key-intl",
|
|
142
|
+
label: "StepFun Step Plan API key (Global/Intl)",
|
|
143
|
+
hint: "Endpoint: api.stepfun.ai/step_plan/v1",
|
|
144
|
+
region: "intl",
|
|
145
|
+
promptMessage: "Enter StepFun API key for global endpoints",
|
|
146
|
+
defaultModel: STEPFUN_PLAN_DEFAULT_MODEL_REF,
|
|
147
|
+
choiceId: "stepfun-plan-api-key-intl",
|
|
148
|
+
choiceLabel: "StepFun Step Plan API key (Global/Intl)",
|
|
149
|
+
choiceHint: "Endpoint: api.stepfun.ai/step_plan/v1",
|
|
150
|
+
applyConfig: applyStepFunPlanConfig
|
|
151
|
+
})],
|
|
152
|
+
catalog: {
|
|
153
|
+
order: "paired",
|
|
154
|
+
run: async (ctx) => resolveStepFunCatalog(ctx, {
|
|
155
|
+
providerId: STEPFUN_PLAN_PROVIDER_ID,
|
|
156
|
+
surface: "plan"
|
|
157
|
+
})
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
//#endregion
|
|
163
|
+
export { stepfun_default as default };
|
package/dist/onboard.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
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 "./provider-catalog-D-r4WCiD.js";
|
|
2
|
+
import { createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
|
|
3
|
+
//#region extensions/stepfun/onboard.ts
|
|
4
|
+
function createStepFunPresetAppliers(params) {
|
|
5
|
+
return createModelCatalogPresetAppliers({
|
|
6
|
+
primaryModelRef: params.primaryModelRef,
|
|
7
|
+
resolveParams: (_cfg, baseUrl) => {
|
|
8
|
+
const provider = params.buildProvider(baseUrl);
|
|
9
|
+
const models = provider.models ?? [];
|
|
10
|
+
return {
|
|
11
|
+
providerId: params.providerId,
|
|
12
|
+
api: provider.api ?? "openai-completions",
|
|
13
|
+
baseUrl,
|
|
14
|
+
catalogModels: models,
|
|
15
|
+
aliases: [...models.map((model) => `${params.providerId}/${model.id}`), {
|
|
16
|
+
modelRef: params.primaryModelRef,
|
|
17
|
+
alias: params.alias
|
|
18
|
+
}]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
const stepFunPresetAppliers = createStepFunPresetAppliers({
|
|
24
|
+
providerId: STEPFUN_PROVIDER_ID,
|
|
25
|
+
primaryModelRef: STEPFUN_DEFAULT_MODEL_REF,
|
|
26
|
+
alias: "StepFun",
|
|
27
|
+
buildProvider: buildStepFunProvider
|
|
28
|
+
});
|
|
29
|
+
const stepFunPlanPresetAppliers = createStepFunPresetAppliers({
|
|
30
|
+
providerId: STEPFUN_PLAN_PROVIDER_ID,
|
|
31
|
+
primaryModelRef: STEPFUN_PLAN_DEFAULT_MODEL_REF,
|
|
32
|
+
alias: "StepFun Plan",
|
|
33
|
+
buildProvider: buildStepFunPlanProvider
|
|
34
|
+
});
|
|
35
|
+
function applyStepFunStandardConfigCn(cfg) {
|
|
36
|
+
return stepFunPresetAppliers.applyConfig(cfg, STEPFUN_STANDARD_CN_BASE_URL);
|
|
37
|
+
}
|
|
38
|
+
function applyStepFunStandardConfig(cfg) {
|
|
39
|
+
return stepFunPresetAppliers.applyConfig(cfg, STEPFUN_STANDARD_INTL_BASE_URL);
|
|
40
|
+
}
|
|
41
|
+
function applyStepFunPlanConfigCn(cfg) {
|
|
42
|
+
return stepFunPlanPresetAppliers.applyConfig(cfg, STEPFUN_PLAN_CN_BASE_URL);
|
|
43
|
+
}
|
|
44
|
+
function applyStepFunPlanConfig(cfg) {
|
|
45
|
+
return stepFunPlanPresetAppliers.applyConfig(cfg, STEPFUN_PLAN_INTL_BASE_URL);
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { applyStepFunPlanConfig, applyStepFunPlanConfigCn, applyStepFunStandardConfig, applyStepFunStandardConfigCn };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
2
|
+
//#region extensions/stepfun/openclaw.plugin.json
|
|
3
|
+
var modelCatalog = {
|
|
4
|
+
"providers": {
|
|
5
|
+
"stepfun": {
|
|
6
|
+
"baseUrl": "https://api.stepfun.ai/v1",
|
|
7
|
+
"api": "openai-completions",
|
|
8
|
+
"models": [{
|
|
9
|
+
"id": "step-3.5-flash",
|
|
10
|
+
"name": "Step 3.5 Flash",
|
|
11
|
+
"reasoning": true,
|
|
12
|
+
"input": ["text"],
|
|
13
|
+
"contextWindow": 262144,
|
|
14
|
+
"maxTokens": 65536,
|
|
15
|
+
"cost": {
|
|
16
|
+
"input": 0,
|
|
17
|
+
"output": 0,
|
|
18
|
+
"cacheRead": 0,
|
|
19
|
+
"cacheWrite": 0
|
|
20
|
+
}
|
|
21
|
+
}]
|
|
22
|
+
},
|
|
23
|
+
"stepfun-plan": {
|
|
24
|
+
"baseUrl": "https://api.stepfun.ai/step_plan/v1",
|
|
25
|
+
"api": "openai-completions",
|
|
26
|
+
"models": [{
|
|
27
|
+
"id": "step-3.5-flash",
|
|
28
|
+
"name": "Step 3.5 Flash",
|
|
29
|
+
"reasoning": true,
|
|
30
|
+
"input": ["text"],
|
|
31
|
+
"contextWindow": 262144,
|
|
32
|
+
"maxTokens": 65536,
|
|
33
|
+
"cost": {
|
|
34
|
+
"input": 0,
|
|
35
|
+
"output": 0,
|
|
36
|
+
"cacheRead": 0,
|
|
37
|
+
"cacheWrite": 0
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
"id": "step-3.5-flash-2603",
|
|
41
|
+
"name": "Step 3.5 Flash 2603",
|
|
42
|
+
"reasoning": true,
|
|
43
|
+
"input": ["text"],
|
|
44
|
+
"contextWindow": 262144,
|
|
45
|
+
"maxTokens": 65536,
|
|
46
|
+
"cost": {
|
|
47
|
+
"input": 0,
|
|
48
|
+
"output": 0,
|
|
49
|
+
"cacheRead": 0,
|
|
50
|
+
"cacheWrite": 0
|
|
51
|
+
}
|
|
52
|
+
}]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"discovery": {
|
|
56
|
+
"stepfun": "static",
|
|
57
|
+
"stepfun-plan": "static"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region extensions/stepfun/provider-catalog.ts
|
|
62
|
+
const STEPFUN_PROVIDER_ID = "stepfun";
|
|
63
|
+
const STEPFUN_PLAN_PROVIDER_ID = "stepfun-plan";
|
|
64
|
+
const STEPFUN_STANDARD_CN_BASE_URL = "https://api.stepfun.com/v1";
|
|
65
|
+
const STEPFUN_STANDARD_INTL_BASE_URL = "https://api.stepfun.ai/v1";
|
|
66
|
+
const STEPFUN_PLAN_CN_BASE_URL = "https://api.stepfun.com/step_plan/v1";
|
|
67
|
+
const STEPFUN_PLAN_INTL_BASE_URL = "https://api.stepfun.ai/step_plan/v1";
|
|
68
|
+
const STEPFUN_DEFAULT_MODEL_ID = "step-3.5-flash";
|
|
69
|
+
const STEPFUN_DEFAULT_MODEL_REF = `${STEPFUN_PROVIDER_ID}/${STEPFUN_DEFAULT_MODEL_ID}`;
|
|
70
|
+
const STEPFUN_PLAN_DEFAULT_MODEL_REF = `${STEPFUN_PLAN_PROVIDER_ID}/${STEPFUN_DEFAULT_MODEL_ID}`;
|
|
71
|
+
function buildStepFunManifestProvider(providerId, baseUrl) {
|
|
72
|
+
const provider = buildManifestModelProviderConfig({
|
|
73
|
+
providerId,
|
|
74
|
+
catalog: modelCatalog.providers[providerId]
|
|
75
|
+
});
|
|
76
|
+
return provider.baseUrl === baseUrl ? provider : {
|
|
77
|
+
...provider,
|
|
78
|
+
baseUrl
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function buildStepFunProvider(baseUrl = STEPFUN_STANDARD_INTL_BASE_URL) {
|
|
82
|
+
return buildStepFunManifestProvider(STEPFUN_PROVIDER_ID, baseUrl);
|
|
83
|
+
}
|
|
84
|
+
function buildStepFunPlanProvider(baseUrl = STEPFUN_PLAN_INTL_BASE_URL) {
|
|
85
|
+
return buildStepFunManifestProvider(STEPFUN_PLAN_PROVIDER_ID, baseUrl);
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
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 };
|
|
@@ -0,0 +1,2 @@
|
|
|
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 "./provider-catalog-D-r4WCiD.js";
|
|
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 };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "stepfun",
|
|
3
|
+
"activation": {
|
|
4
|
+
"onStartup": false
|
|
5
|
+
},
|
|
6
|
+
"enabledByDefault": true,
|
|
7
|
+
"providers": ["stepfun", "stepfun-plan"],
|
|
8
|
+
"autoEnableWhenConfiguredProviders": ["stepfun", "stepfun-plan"],
|
|
9
|
+
"setup": {
|
|
10
|
+
"providers": [
|
|
11
|
+
{
|
|
12
|
+
"id": "stepfun",
|
|
13
|
+
"envVars": ["STEPFUN_API_KEY"]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "stepfun-plan",
|
|
17
|
+
"envVars": ["STEPFUN_API_KEY"]
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"modelCatalog": {
|
|
22
|
+
"providers": {
|
|
23
|
+
"stepfun": {
|
|
24
|
+
"baseUrl": "https://api.stepfun.ai/v1",
|
|
25
|
+
"api": "openai-completions",
|
|
26
|
+
"models": [
|
|
27
|
+
{
|
|
28
|
+
"id": "step-3.5-flash",
|
|
29
|
+
"name": "Step 3.5 Flash",
|
|
30
|
+
"reasoning": true,
|
|
31
|
+
"input": ["text"],
|
|
32
|
+
"contextWindow": 262144,
|
|
33
|
+
"maxTokens": 65536,
|
|
34
|
+
"cost": {
|
|
35
|
+
"input": 0,
|
|
36
|
+
"output": 0,
|
|
37
|
+
"cacheRead": 0,
|
|
38
|
+
"cacheWrite": 0
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"stepfun-plan": {
|
|
44
|
+
"baseUrl": "https://api.stepfun.ai/step_plan/v1",
|
|
45
|
+
"api": "openai-completions",
|
|
46
|
+
"models": [
|
|
47
|
+
{
|
|
48
|
+
"id": "step-3.5-flash",
|
|
49
|
+
"name": "Step 3.5 Flash",
|
|
50
|
+
"reasoning": true,
|
|
51
|
+
"input": ["text"],
|
|
52
|
+
"contextWindow": 262144,
|
|
53
|
+
"maxTokens": 65536,
|
|
54
|
+
"cost": {
|
|
55
|
+
"input": 0,
|
|
56
|
+
"output": 0,
|
|
57
|
+
"cacheRead": 0,
|
|
58
|
+
"cacheWrite": 0
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "step-3.5-flash-2603",
|
|
63
|
+
"name": "Step 3.5 Flash 2603",
|
|
64
|
+
"reasoning": true,
|
|
65
|
+
"input": ["text"],
|
|
66
|
+
"contextWindow": 262144,
|
|
67
|
+
"maxTokens": 65536,
|
|
68
|
+
"cost": {
|
|
69
|
+
"input": 0,
|
|
70
|
+
"output": 0,
|
|
71
|
+
"cacheRead": 0,
|
|
72
|
+
"cacheWrite": 0
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"discovery": {
|
|
79
|
+
"stepfun": "static",
|
|
80
|
+
"stepfun-plan": "static"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"providerAuthChoices": [
|
|
84
|
+
{
|
|
85
|
+
"provider": "stepfun",
|
|
86
|
+
"method": "standard-api-key-cn",
|
|
87
|
+
"choiceId": "stepfun-standard-api-key-cn",
|
|
88
|
+
"choiceLabel": "StepFun Standard API key (China)",
|
|
89
|
+
"choiceHint": "Endpoint: api.stepfun.com/v1",
|
|
90
|
+
"groupId": "stepfun",
|
|
91
|
+
"groupLabel": "StepFun",
|
|
92
|
+
"groupHint": "Standard / Step Plan (China / Global)",
|
|
93
|
+
"optionKey": "stepfunApiKey",
|
|
94
|
+
"cliFlag": "--stepfun-api-key",
|
|
95
|
+
"cliOption": "--stepfun-api-key <key>",
|
|
96
|
+
"cliDescription": "StepFun API key"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"provider": "stepfun",
|
|
100
|
+
"method": "standard-api-key-intl",
|
|
101
|
+
"choiceId": "stepfun-standard-api-key-intl",
|
|
102
|
+
"choiceLabel": "StepFun Standard API key (Global/Intl)",
|
|
103
|
+
"choiceHint": "Endpoint: api.stepfun.ai/v1",
|
|
104
|
+
"groupId": "stepfun",
|
|
105
|
+
"groupLabel": "StepFun",
|
|
106
|
+
"groupHint": "Standard / Step Plan (China / Global)",
|
|
107
|
+
"optionKey": "stepfunApiKey",
|
|
108
|
+
"cliFlag": "--stepfun-api-key",
|
|
109
|
+
"cliOption": "--stepfun-api-key <key>",
|
|
110
|
+
"cliDescription": "StepFun API key"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"provider": "stepfun-plan",
|
|
114
|
+
"method": "plan-api-key-cn",
|
|
115
|
+
"choiceId": "stepfun-plan-api-key-cn",
|
|
116
|
+
"choiceLabel": "StepFun Step Plan API key (China)",
|
|
117
|
+
"choiceHint": "Endpoint: api.stepfun.com/step_plan/v1",
|
|
118
|
+
"groupId": "stepfun",
|
|
119
|
+
"groupLabel": "StepFun",
|
|
120
|
+
"groupHint": "Standard / Step Plan (China / Global)",
|
|
121
|
+
"optionKey": "stepfunApiKey",
|
|
122
|
+
"cliFlag": "--stepfun-api-key",
|
|
123
|
+
"cliOption": "--stepfun-api-key <key>",
|
|
124
|
+
"cliDescription": "StepFun API key"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"provider": "stepfun-plan",
|
|
128
|
+
"method": "plan-api-key-intl",
|
|
129
|
+
"choiceId": "stepfun-plan-api-key-intl",
|
|
130
|
+
"choiceLabel": "StepFun Step Plan API key (Global/Intl)",
|
|
131
|
+
"choiceHint": "Endpoint: api.stepfun.ai/step_plan/v1",
|
|
132
|
+
"groupId": "stepfun",
|
|
133
|
+
"groupLabel": "StepFun",
|
|
134
|
+
"groupHint": "Standard / Step Plan (China / Global)",
|
|
135
|
+
"optionKey": "stepfunApiKey",
|
|
136
|
+
"cliFlag": "--stepfun-api-key",
|
|
137
|
+
"cliOption": "--stepfun-api-key <key>",
|
|
138
|
+
"cliDescription": "StepFun API key"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"configSchema": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"additionalProperties": false,
|
|
144
|
+
"properties": {}
|
|
145
|
+
}
|
|
146
|
+
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/stepfun-provider",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"license": "MIT",
|
|
3
|
+
"version": "2026.6.9-beta.1",
|
|
4
|
+
"description": "OpenClaw StepFun provider plugin.",
|
|
6
5
|
"repository": {
|
|
7
6
|
"type": "git",
|
|
8
|
-
"url": "
|
|
7
|
+
"url": "https://github.com/openclaw/openclaw"
|
|
9
8
|
},
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
9
|
+
"type": "module",
|
|
10
|
+
"openclaw": {
|
|
11
|
+
"extensions": [
|
|
12
|
+
"./index.ts"
|
|
13
|
+
],
|
|
14
|
+
"install": {
|
|
15
|
+
"npmSpec": "@openclaw/stepfun-provider",
|
|
16
|
+
"defaultChoice": "npm",
|
|
17
|
+
"minHostVersion": ">=2026.6.8"
|
|
18
|
+
},
|
|
19
|
+
"compat": {
|
|
20
|
+
"pluginApi": ">=2026.6.9-beta.1"
|
|
21
|
+
},
|
|
22
|
+
"build": {
|
|
23
|
+
"openclawVersion": "2026.6.9-beta.1",
|
|
24
|
+
"bundledDist": false
|
|
25
|
+
},
|
|
26
|
+
"release": {
|
|
27
|
+
"publishToNpm": true
|
|
28
|
+
},
|
|
29
|
+
"runtimeExtensions": [
|
|
30
|
+
"./dist/index.js"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist/**",
|
|
35
|
+
"openclaw.plugin.json",
|
|
36
|
+
"npm-shrinkwrap.json",
|
|
37
|
+
"README.md"
|
|
38
|
+
],
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"openclaw": ">=2026.6.9-beta.1"
|
|
41
|
+
},
|
|
42
|
+
"peerDependenciesMeta": {
|
|
43
|
+
"openclaw": {
|
|
44
|
+
"optional": true
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"bundledDependencies": []
|
|
14
48
|
}
|