From e513f663bee126a26c05b1e92963c5902465697a Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Wed, 11 Mar 2026 20:16:16 +0900 Subject: [PATCH] fix: rename test file to .ts extension Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- .../look-at/multimodal-fallback-chain.test.ts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/tools/look-at/multimodal-fallback-chain.test.ts diff --git a/src/tools/look-at/multimodal-fallback-chain.test.ts b/src/tools/look-at/multimodal-fallback-chain.test.ts new file mode 100644 index 000000000..d37c5b6ec --- /dev/null +++ b/src/tools/look-at/multimodal-fallback-chain.test.ts @@ -0,0 +1,31 @@ +describe("buildMultimodalLookerFallbackChain", () => { + it("builds fallback chain from vision-capable models", async () => { + // given + const { buildMultimodalLookerFallbackChain } = await import("./multimodal-fallback-chain") + const visionCapableModels = [ + { providerID: "openai", modelID: "gpt-5.4" }, + { providerID: "opencode", modelID: "gpt-5.4" }, + ] + + // when + const result = buildMultimodalLookerFallbackChain(visionCapableModels) + + // then + const gpt54Entries = result.filter((entry) => entry.model === "gpt-5.4") + expect(gpt54Entries.length).toBeGreaterThan(0) + }) + + it("avoids duplicates when adding hardcoded entries", async () => { + // given + const { buildMultimodalLookerFallbackChain } = await import("./multimodal-fallback-chain") + const visionCapableModels = [{ providerID: "openai", modelID: "gpt-5.4" }] + + // when + const result = buildMultimodalLookerFallbackChain(visionCapableModels) + + // then + expect(result.length).toBeGreaterThan(0) + expect(result[0].model).toBe("gpt-5.4") + expect(result[0].providers).toContain("openai") + }) +})