fix(release): align prerelease contracts after provider rename

This commit is contained in:
Peter Steinberger
2026-05-31 00:52:02 +01:00
parent 6270d5326f
commit 16bae70af4
9 changed files with 20 additions and 22 deletions

View File

@@ -163,7 +163,6 @@ describe("Matrix inbound event dedupe", () => {
expect(first.claimEvent({ roomId: "!room:example.org", eventId: "$legacy" })).toBe(false);
fs.rmSync(storagePath, { force: true });
resetPluginStateStoreForTests();
const second = await createMatrixInboundEventDeduper({
auth: auth as never,
storagePath,

View File

@@ -1,5 +1,6 @@
{
"id": "openai",
"legacyPluginIds": ["openai-codex"],
"activation": {
"onStartup": false
},

View File

@@ -31,6 +31,7 @@ const manifest = JSON.parse(
};
providerEndpoints?: Array<{ endpointClass?: string; hosts?: string[] }>;
providerAuthAliases?: Record<string, string>;
legacyPluginIds?: string[];
};
const packageJson = JSON.parse(
@@ -105,6 +106,7 @@ describe("OpenAI plugin manifest", () => {
});
it("routes setup through the OpenAI setup runtime", () => {
expect(manifest.legacyPluginIds).toEqual(["openai-codex"]);
expect(manifest.setup?.providers?.map((provider) => provider.id)).toEqual(["openai"]);
expect(manifest.providerAuthAliases).toBeUndefined();
});

View File

@@ -12,7 +12,6 @@ describe("OpenAI setup auth provider", () => {
const apiKey = provider.auth.find((method) => method.id === "api-key");
expect(provider.id).toBe("openai");
expect(provider.aliases).toEqual(["openai"]);
expect(authMethodIds(provider)).toEqual(["oauth", "device-code", "api-key"]);
expect(oauth?.label).toBe("ChatGPT Login");
expect(oauth?.wizard?.choiceId).toBe("openai");

View File

@@ -1,4 +1,3 @@
import { MAX_TIMER_TIMEOUT_MS } from "openclaw/plugin-sdk/number-runtime";
import { expectExplicitMusicGenerationCapabilities } from "openclaw/plugin-sdk/provider-test-contracts";
import { afterEach, describe, expect, it, vi } from "vitest";
import { buildOpenRouterMusicGenerationProvider } from "./music-generation-provider.js";
@@ -225,8 +224,8 @@ describe("openrouter music generation provider", () => {
}),
).rejects.toThrow("OpenRouter music generation response missing audio data");
expect(postRequest().timeoutMs).toBe(MAX_TIMER_TIMEOUT_MS);
expect(timeoutSpy).toHaveBeenCalledWith(expect.any(Function), MAX_TIMER_TIMEOUT_MS);
expect(postRequest().timeoutMs).toBe(180_000);
expect(timeoutSpy).toHaveBeenCalledWith(expect.any(Function), 180_000);
} finally {
timeoutSpy.mockRestore();
}

View File

@@ -555,6 +555,7 @@ export function describeOpenAIProviderRuntimeContract(load: ProviderRuntimeContr
const model = provider.resolveDynamicModel?.({
provider: "openai",
modelId: "gpt-5.4",
authProfileMode: "oauth",
modelRegistry: {
find: (_provider: string, id: string) =>
id === "gpt-5.2-codex"
@@ -582,6 +583,7 @@ export function describeOpenAIProviderRuntimeContract(load: ProviderRuntimeContr
const model = provider.resolveDynamicModel?.({
provider: "openai",
modelId: "gpt-5.5",
authProfileMode: "oauth",
modelRegistry: {
find: (_provider: string, id: string) =>
id === "gpt-5.5"
@@ -614,6 +616,7 @@ export function describeOpenAIProviderRuntimeContract(load: ProviderRuntimeContr
const model = provider.resolveDynamicModel?.({
provider: "openai",
modelId: "gpt-5.4-mini",
authProfileMode: "oauth",
modelRegistry: {
find: (_provider: string, id: string) =>
id === "gpt-5.4"
@@ -647,6 +650,12 @@ export function describeOpenAIProviderRuntimeContract(load: ProviderRuntimeContr
provider.prepareExtraParams?.({
provider: "openai",
modelId: "gpt-5.4",
model: createModel({
id: "gpt-5.4",
provider: "openai",
api: "openai-chatgpt-responses",
baseUrl: "https://chatgpt.com/backend-api/codex",
}),
extraParams: { temperature: 0.2 },
}),
).toEqual({
@@ -685,7 +694,7 @@ export function describeOpenAIProviderRuntimeContract(load: ProviderRuntimeContr
}),
).resolves.toEqual({
provider: "openai",
displayName: "Codex",
displayName: "OpenAI",
windows: [{ label: "3h", usedPercent: 12, resetAt: 1_705_000_000 }],
plan: "Plus",
});

View File

@@ -287,22 +287,7 @@ describe("activation planner", () => {
{
pluginId: "openai",
origin: "bundled",
reasons: ["manifest-provider-owner"],
},
]);
expect(
resolveManifestActivationPlan({
trigger: {
kind: "provider",
provider: "openai",
},
}).entries,
).toEqual([
{
pluginId: "openai",
origin: "bundled",
reasons: ["manifest-setup-provider-owner"],
reasons: ["manifest-provider-owner", "manifest-setup-provider-owner"],
},
]);

View File

@@ -455,6 +455,9 @@ export function isPluginMetadataSnapshotCompatible(params: {
function appendOwner(owners: Map<string, string[]>, ownedId: string, pluginId: string): void {
const existing = owners.get(ownedId);
if (existing) {
if (existing.includes(pluginId)) {
return;
}
existing.push(pluginId);
return;
}

View File

@@ -379,6 +379,7 @@ describe("plugin registry facade", () => {
path.join(rootDir, "openclaw.plugin.json"),
JSON.stringify({
id: "openai",
legacyPluginIds: ["openai-codex"],
configSchema: { type: "object" },
providers: ["openai", "openai"],
channels: ["openai-chat"],