Skip to content

Commit 4e0bfb7

Browse files
committed
refactor(plugin-sdk): remove dead OpenAI compat branch
Keep behavioral route coverage and drop the brittle source-text assertion.\n\nCo-authored-by: Pick-cat <[email protected]>
1 parent fd0301d commit 4e0bfb7

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

‎src/plugin-sdk/provider-tools.test.ts‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// Provider tool tests cover tool schema conversion and provider payload compatibility.
2-
import { readFileSync } from "node:fs";
3-
import { fileURLToPath } from "node:url";
42
import { describe, expect, it } from "vitest";
53
import {
64
buildProviderToolCompatFamilyHooks,
@@ -84,18 +82,6 @@ describe("buildProviderToolCompatFamilyHooks", () => {
8482
});
8583
});
8684

87-
it("keeps a single openai provider gate for OpenAI tool-schema compat", () => {
88-
// Guards against reintroducing a duplicate unreachable
89-
// `if (provider === "openai")` branch after the live openai return.
90-
const source = readFileSync(
91-
fileURLToPath(new URL("./provider-tools.ts", import.meta.url)),
92-
"utf8",
93-
);
94-
const fn = source.match(/function shouldApplyOpenAIToolCompat\([\s\S]*?\n\}/)?.[0];
95-
expect(fn).toBeTruthy();
96-
expect(fn!.match(/if \(provider === "openai"\)/g)).toHaveLength(1);
97-
});
98-
9985
it("applies ChatGPT Responses strict compat on first-party OpenAI API hosts", () => {
10086
const hooks = buildProviderToolCompatFamilyHooks("openai");
10187
const tools = [{ name: "demo", description: "", parameters: {} }] as never;

0 commit comments

Comments
 (0)