Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions core/llm/toolSupport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,13 @@ describe("PROVIDER_TOOL_SUPPORT", () => {
expect(supportsFn("devstral-24b")).toBe(true);
});

it("should return true for Gemma models", () => {
expect(supportsFn("gemma3")).toBe(true);
expect(supportsFn("gemma4")).toBe(true);
expect(supportsFn("gemma3:27b")).toBe(true);
expect(supportsFn("gemma4:27b")).toBe(true);
});

it("should return false for explicitly unsupported models", () => {
expect(supportsFn("vision")).toBe(false);
expect(supportsFn("math")).toBe(false);
Expand Down Expand Up @@ -292,6 +299,14 @@ describe("PROVIDER_TOOL_SUPPORT", () => {
expect(supportsFn("mistral-7b")).toBe(true);
});

it("should return true for Gemma models via LM Studio", () => {
// Gemma 3/4 support function calling per Google's documentation
expect(supportsFn("gemma3")).toBe(true);
expect(supportsFn("gemma4")).toBe(true);
expect(supportsFn("Gemma-3-27B-Instruct-GGUF")).toBe(true);
expect(supportsFn("Gemma-4-27B-Instruct-GGUF")).toBe(true);
});

it("should return true for LM Studio hyphenated model IDs", () => {
// LM Studio uses hyphenated model identifiers like "Meta-Llama-3.1-8B-Instruct-GGUF"
expect(supportsFn("Meta-Llama-3.1-8B-Instruct-GGUF")).toBe(true);
Expand Down
2 changes: 2 additions & 0 deletions core/llm/toolSupport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
"glm-5",
"deepseek",
"dolphin",
// https://ai.google.dev/gemma/docs/capabilities/function-calling
"gemma",
].some((part) => modelName.toLowerCase().includes(part))
) {
return true;
Expand Down
Loading