From 4def447b7f8d0be1a7124da2bc8c4d2e9bddfe9e Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Fri, 9 May 2025 13:48:46 -0700 Subject: [PATCH 1/2] Update toolSupport.ts --- core/llm/toolSupport.ts | 53 ++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/core/llm/toolSupport.ts b/core/llm/toolSupport.ts index 8a2b55195..4174c0ab7 100644 --- a/core/llm/toolSupport.ts +++ b/core/llm/toolSupport.ts @@ -35,7 +35,8 @@ export const PROVIDER_TOOL_SUPPORT: Record< if ( model.toLowerCase().startsWith("gpt-4") || model.toLowerCase().startsWith("o3") - ) return true; + ) + return true; return false; }, openai: (model) => { @@ -66,7 +67,10 @@ export const PROVIDER_TOOL_SUPPORT: Record< }, vertexai: (model) => { // All gemini models except flash 2.0 lite support function calling - return model.toLowerCase().includes("gemini") && !model.toLowerCase().includes("lite");; + return ( + model.toLowerCase().includes("gemini") && + !model.toLowerCase().includes("lite") + ); }, bedrock: (model) => { // For Bedrock, only support Claude Sonnet models with versions 3.5/3-5 and 3.7/3-7 @@ -81,22 +85,24 @@ export const PROVIDER_TOOL_SUPPORT: Record< }, mistral: (model) => { // https://docs.mistral.ai/capabilities/function_calling/ - return !model.toLowerCase().includes("mamba") && - [ - "codestral", - "mistral-large", - "mistral-small", - "pixtral", - "ministral", - "mistral-nemo" - ].some((part) => model.toLowerCase().includes(part)); + return ( + !model.toLowerCase().includes("mamba") && + [ + "codestral", + "mistral-large", + "mistral-small", + "pixtral", + "ministral", + "mistral-nemo", + ].some((part) => model.toLowerCase().includes(part)) + ); }, // https://ollama.com/search?c=tools ollama: (model) => { let modelName = ""; // Extract the model name after the last slash to support other registries - if(model.includes("/")) { - let parts = model.split('/'); + if (model.includes("/")) { + let parts = model.split("/"); modelName = parts[parts.length - 1]; } else { modelName = model; @@ -117,6 +123,7 @@ export const PROVIDER_TOOL_SUPPORT: Record< "llama3.2", "llama3.1", "qwen2", + "qwen3", "mixtral", "command-r", "smollm2", @@ -145,19 +152,17 @@ export const PROVIDER_TOOL_SUPPORT: Record< } }, deepseek: (model) => { - if(model !== "deepseek-reasoner") { + if (model !== "deepseek-reasoner") { return true; } }, watsonx: (model) => { - if (model.toLowerCase().includes("guard")) return false; - if ([ - "llama-3", - "llama-4", - "mistral", - "codestral", - "granite-3" - ].some((part) => model.toLowerCase().includes(part))) - return true; - } + if (model.toLowerCase().includes("guard")) return false; + if ( + ["llama-3", "llama-4", "mistral", "codestral", "granite-3"].some((part) => + model.toLowerCase().includes(part), + ) + ) + return true; + }, }; From 5e122b76b3cf5f0f511101bb1b2cea1349fa3a7a Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Fri, 9 May 2025 14:47:55 -0700 Subject: [PATCH 2/2] fix: copy --- core/llm/llms/Ollama.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index ca029488a..cd312c681 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -44,7 +44,7 @@ interface OllamaModelFileParams { min_p?: number; num_gpu?: number; - // deprecated or not directly supported here: + // Deprecated or not directly supported here: num_thread?: number; use_mmap?: boolean; num_gqa?: number;