refactor(providers): add family replay and tool hooks

This commit is contained in:
Vincent Koc
2026-04-04 19:27:36 +09:00
parent 4e099689c0
commit 39d2a719c9
20 changed files with 273 additions and 85 deletions

View File

@@ -0,0 +1,15 @@
import { describe, expect, it } from "vitest";
import {
buildProviderToolCompatFamilyHooks,
inspectGeminiToolSchemas,
normalizeGeminiToolSchemas,
} from "./provider-tools.js";
describe("buildProviderToolCompatFamilyHooks", () => {
it("maps the gemini family to the shared schema helpers", () => {
const hooks = buildProviderToolCompatFamilyHooks("gemini");
expect(hooks.normalizeToolSchemas).toBe(normalizeGeminiToolSchemas);
expect(hooks.inspectToolSchemas).toBe(inspectGeminiToolSchemas);
});
});