diff --git a/core/llm/toolSupport.test.ts b/core/llm/toolSupport.test.ts index c3397878c..111d183d0 100644 --- a/core/llm/toolSupport.test.ts +++ b/core/llm/toolSupport.test.ts @@ -280,6 +280,34 @@ describe("PROVIDER_TOOL_SUPPORT", () => { }); }); + describe("novita", () => { + const supportsFn = PROVIDER_TOOL_SUPPORT["novita"]; + + it("should return true for exact match models", () => { + expect(supportsFn("deepseek/deepseek-r1-0528")).toBe(true); + expect(supportsFn("deepseek/deepseek-r1-turbo")).toBe(true); + expect(supportsFn("deepseek/deepseek-v3-0324")).toBe(true); + expect(supportsFn("deepseek/deepseek-v3-turbo")).toBe(true); + expect(supportsFn("meta-llama/llama-3.3-70b-instruct")).toBe(true); + expect(supportsFn("qwen/qwen-2.5-72b-instruct")).toBe(true); + expect(supportsFn("zai-org/glm-4.5")).toBe(true); + expect(supportsFn("moonshotai/kimi-k2-instruct")).toBe(true); + }); + + it("should return true for prefix match models", () => { + expect(supportsFn("qwen/qwen3-235b-a22b-instruct-2507")).toBe(true); + expect(supportsFn("openai/gpt-oss-20b")).toBe(true); + expect(supportsFn("openai/gpt-oss-120b")).toBe(true); + }); + + it("should return false for unsupported models", () => { + expect(supportsFn("deepseek/deepseek-chat")).toBe(false); + expect(supportsFn("meta-llama/llama-2-7b")).toBe(false); + expect(supportsFn("qwen/qwen-2.0-7b")).toBe(false); + expect(supportsFn("openai/gpt-4")).toBe(false); + }); + }); + describe("edge cases", () => { it("should handle empty model names", () => { expect(PROVIDER_TOOL_SUPPORT["continue-proxy"]("")).toBe(false); @@ -288,6 +316,7 @@ describe("PROVIDER_TOOL_SUPPORT", () => { expect(PROVIDER_TOOL_SUPPORT["gemini"]("")).toBe(false); expect(PROVIDER_TOOL_SUPPORT["bedrock"]("")).toBe(false); expect(PROVIDER_TOOL_SUPPORT["ollama"]("")).toBe(false); + expect(PROVIDER_TOOL_SUPPORT["novita"]("")).toBe(false); }); it("should handle non-existent provider", () => {