@openclaw/stepfun-provider 2026.9.1 → 2026.9.3
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/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
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-BXohNkBo.js";
|
|
2
2
|
import { applyStepFunPlanConfig, applyStepFunPlanConfigCn, applyStepFunStandardConfig, applyStepFunStandardConfigCn } from "./onboard.js";
|
|
3
3
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
4
4
|
import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key";
|
|
5
|
-
import {
|
|
5
|
+
import { buildOpenAICompatibleLiveProviderCatalog } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
//#region extensions/stepfun/index.ts
|
|
8
8
|
function trimExplicitBaseUrl(ctx, providerId) {
|
|
@@ -35,19 +35,22 @@ function resolveDefaultBaseUrl(surface, region) {
|
|
|
35
35
|
return region === "cn" ? STEPFUN_STANDARD_CN_BASE_URL : STEPFUN_STANDARD_INTL_BASE_URL;
|
|
36
36
|
}
|
|
37
37
|
async function resolveStepFunCatalog(ctx, params) {
|
|
38
|
-
const
|
|
39
|
-
const
|
|
38
|
+
const profileAuth = ctx.resolveProviderAuth(params.providerId);
|
|
39
|
+
const auth = profileAuth.apiKey ? profileAuth : ctx.resolveProviderApiKey(params.providerId);
|
|
40
|
+
const apiKey = auth.apiKey;
|
|
40
41
|
if (!apiKey) return null;
|
|
41
42
|
const explicitBaseUrl = trimExplicitBaseUrl(ctx, params.providerId);
|
|
42
43
|
const region = inferRegionFromBaseUrl(explicitBaseUrl) ?? inferRegionFromExplicitBaseUrls(ctx) ?? inferRegionFromProfileId(auth.profileId) ?? inferRegionFromEnv(ctx.env);
|
|
43
44
|
const baseUrl = explicitBaseUrl ?? resolveDefaultBaseUrl(params.surface, region ?? "intl");
|
|
44
45
|
const providerConfig = params.surface === "plan" ? buildStepFunPlanProvider(baseUrl) : buildStepFunProvider(baseUrl);
|
|
45
|
-
return
|
|
46
|
+
return await buildOpenAICompatibleLiveProviderCatalog({
|
|
47
|
+
discoveryMode: "strict",
|
|
46
48
|
providerId: params.providerId,
|
|
47
49
|
providerConfig,
|
|
48
50
|
apiKey,
|
|
49
|
-
discoveryApiKey: auth.discoveryApiKey
|
|
50
|
-
|
|
51
|
+
discoveryApiKey: auth.discoveryApiKey,
|
|
52
|
+
profileId: auth.profileId
|
|
53
|
+
});
|
|
51
54
|
}
|
|
52
55
|
function resolveProfileIds(region) {
|
|
53
56
|
return region === "cn" ? ["stepfun:cn", "stepfun-plan:cn"] : ["stepfun:intl", "stepfun-plan:intl"];
|
package/dist/onboard.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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-
|
|
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-BXohNkBo.js";
|
|
2
2
|
import { createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
|
|
3
3
|
//#region extensions/stepfun/onboard.ts
|
|
4
4
|
function createStepFunPresetAppliers(params) {
|
|
5
5
|
return createModelCatalogPresetAppliers({
|
|
6
6
|
primaryModelRef: params.primaryModelRef,
|
|
7
|
-
resolveParams: (
|
|
7
|
+
resolveParams: (cfg, baseUrl) => {
|
|
8
8
|
const provider = params.buildProvider(baseUrl);
|
|
9
9
|
const models = provider.models ?? [];
|
|
10
10
|
return {
|
|
11
11
|
providerId: params.providerId,
|
|
12
12
|
api: provider.api ?? "openai-completions",
|
|
13
13
|
baseUrl,
|
|
14
|
-
catalogModels: models,
|
|
14
|
+
catalogModels: cfg.models?.mode === "replace" ? models : [],
|
|
15
15
|
aliases: [...models.map((model) => `${params.providerId}/${model.id}`), {
|
|
16
16
|
modelRef: params.primaryModelRef,
|
|
17
17
|
alias: params.alias
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
2
2
|
//#region extensions/stepfun/openclaw.plugin.json
|
|
3
3
|
var modelCatalog = {
|
|
4
|
+
"modelsDev": {
|
|
5
|
+
"stepfun": "stepfun-ai",
|
|
6
|
+
"stepfun-plan": "stepfun-ai-step-plan"
|
|
7
|
+
},
|
|
4
8
|
"providers": {
|
|
5
9
|
"stepfun": {
|
|
6
10
|
"baseUrl": "https://api.stepfun.ai/v1",
|
package/dist/provider-catalog.js
CHANGED
|
@@ -1,2 +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-
|
|
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-BXohNkBo.js";
|
|
2
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 };
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/stepfun-provider",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.3",
|
|
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.9.
|
|
21
|
+
"pluginApi": ">=2026.9.3"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.9.
|
|
24
|
+
"openclawVersion": "2026.9.3",
|
|
25
25
|
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"README.md"
|
|
39
39
|
],
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"openclaw": ">=2026.9.
|
|
41
|
+
"openclaw": ">=2026.9.3"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|