Skip to content

Commit 6e91e38

Browse files
committed
test: add Novita provider tool support tests
Add comprehensive test coverage for Novita provider including exact match models, prefix match models, and unsupported model cases.
1 parent 9fb3c93 commit 6e91e38

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

core/llm/toolSupport.test.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,34 @@ describe("PROVIDER_TOOL_SUPPORT", () => {
280280
});
281281
});
282282

283+
describe("novita", () => {
284+
const supportsFn = PROVIDER_TOOL_SUPPORT["novita"];
285+
286+
it("should return true for exact match models", () => {
287+
expect(supportsFn("deepseek/deepseek-r1-0528")).toBe(true);
288+
expect(supportsFn("deepseek/deepseek-r1-turbo")).toBe(true);
289+
expect(supportsFn("deepseek/deepseek-v3-0324")).toBe(true);
290+
expect(supportsFn("deepseek/deepseek-v3-turbo")).toBe(true);
291+
expect(supportsFn("meta-llama/llama-3.3-70b-instruct")).toBe(true);
292+
expect(supportsFn("qwen/qwen-2.5-72b-instruct")).toBe(true);
293+
expect(supportsFn("zai-org/glm-4.5")).toBe(true);
294+
expect(supportsFn("moonshotai/kimi-k2-instruct")).toBe(true);
295+
});
296+
297+
it("should return true for prefix match models", () => {
298+
expect(supportsFn("qwen/qwen3-235b-a22b-instruct-2507")).toBe(true);
299+
expect(supportsFn("openai/gpt-oss-20b")).toBe(true);
300+
expect(supportsFn("openai/gpt-oss-120b")).toBe(true);
301+
});
302+
303+
it("should return false for unsupported models", () => {
304+
expect(supportsFn("deepseek/deepseek-chat")).toBe(false);
305+
expect(supportsFn("meta-llama/llama-2-7b")).toBe(false);
306+
expect(supportsFn("qwen/qwen-2.0-7b")).toBe(false);
307+
expect(supportsFn("openai/gpt-4")).toBe(false);
308+
});
309+
});
310+
283311
describe("edge cases", () => {
284312
it("should handle empty model names", () => {
285313
expect(PROVIDER_TOOL_SUPPORT["continue-proxy"]("")).toBe(false);
@@ -288,6 +316,7 @@ describe("PROVIDER_TOOL_SUPPORT", () => {
288316
expect(PROVIDER_TOOL_SUPPORT["gemini"]("")).toBe(false);
289317
expect(PROVIDER_TOOL_SUPPORT["bedrock"]("")).toBe(false);
290318
expect(PROVIDER_TOOL_SUPPORT["ollama"]("")).toBe(false);
319+
expect(PROVIDER_TOOL_SUPPORT["novita"]("")).toBe(false);
291320
});
292321

293322
it("should handle non-existent provider", () => {

0 commit comments

Comments
 (0)