fix(stepfun): drop stale auth choice metadata

This commit is contained in:
Vincent Koc
2026-05-23 08:23:56 +02:00
parent 73c1e375e4
commit 0b2ab6c93c
3 changed files with 65 additions and 2 deletions

View File

@@ -48,6 +48,7 @@ Docs: https://docs.openclaw.ai
### Fixes
- Agents/tools: honor configured custom provider API keys when deciding whether media, image-generation, video-generation, music-generation, and PDF tools are available. (#85570)
- StepFun: stop advertising stale generic API key auth choices so onboarding only offers runtime-backed Standard and Step Plan choices.
- Windows installer: fail Git checkout installs when `pnpm install` or `pnpm build` fails instead of writing a wrapper to a missing CLI build.
- Sessions: surface previous-transcript archive failures during `/new` rotation so disk rename errors are logged instead of silently hiding stranded transcript files. Fixes #81984. (#85586, from #82081) Thanks @0xghost42.
- TUI/agents: mirror internal-ui message-tool replies into final chat output so message-tool-only agents remain visible in `openclaw tui`. Fixes #85538. Thanks @danpolasek.

View File

@@ -0,0 +1,64 @@
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import {
registerProviderPlugin,
requireRegisteredProvider,
} from "openclaw/plugin-sdk/plugin-test-runtime";
import { describe, expect, it } from "vitest";
import stepfunPlugin from "./index.js";
type StepFunManifest = {
setup?: {
providers?: Array<{
id?: string;
authMethods?: string[];
envVars?: string[];
}>;
};
providerAuthChoices?: Array<{
provider?: string;
method?: string;
choiceId?: string;
}>;
};
function readManifest(): StepFunManifest {
return JSON.parse(readFileSync(resolve(import.meta.dirname, "openclaw.plugin.json"), "utf-8"));
}
describe("stepfun provider registration", () => {
it("keeps manifest auth choices aligned with runtime provider methods", async () => {
const { providers } = await registerProviderPlugin({
plugin: stepfunPlugin,
id: "stepfun",
name: "StepFun",
});
const manifest = readManifest();
const runtimeChoices = ["stepfun", "stepfun-plan"].flatMap((providerId) => {
const provider = requireRegisteredProvider(providers, providerId);
return provider.auth.map((method) => ({
provider: provider.id,
method: method.id,
choiceId: method.wizard?.choiceId,
}));
});
const manifestChoices = manifest.providerAuthChoices?.map((choice) => ({
provider: choice.provider,
method: choice.method,
choiceId: choice.choiceId,
}));
expect(runtimeChoices).toEqual(manifestChoices);
expect(manifest.setup?.providers).toEqual([
{
id: "stepfun",
envVars: ["STEPFUN_API_KEY"],
},
{
id: "stepfun-plan",
envVars: ["STEPFUN_API_KEY"],
},
]);
});
});

View File

@@ -10,12 +10,10 @@
"providers": [
{
"id": "stepfun",
"authMethods": ["api-key"],
"envVars": ["STEPFUN_API_KEY"]
},
{
"id": "stepfun-plan",
"authMethods": ["api-key"],
"envVars": ["STEPFUN_API_KEY"]
}
]