From 294c0356fe0f3a66d65cc62175ad4c481ecb3854 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 3 Mar 2025 11:20:26 -0800 Subject: [PATCH] proxy tool support --- core/llm/toolSupport.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/core/llm/toolSupport.ts b/core/llm/toolSupport.ts index ea7f2adf3..25f4071e0 100644 --- a/core/llm/toolSupport.ts +++ b/core/llm/toolSupport.ts @@ -3,9 +3,24 @@ export const PROVIDER_TOOL_SUPPORT: Record< (model: string) => boolean | undefined > = { "continue-proxy": (model) => { - return ["claude-3-5", "claude-3.5", "claude-3-7", "claude-3.7", "gpt-4", "o3", "gemini"].some((part) => - model.toLowerCase().startsWith(part), - ); + // see getContinueProxyModelName + const provider = model.split("/")[2]; + const _model = model.split("/")[3]; + if (provider && _model && provider !== "continue-proxy") { + const fn = PROVIDER_TOOL_SUPPORT[provider]; + if (fn) { + return fn(_model); + } + } + return [ + "claude-3-5", + "claude-3.5", + "claude-3-7", + "claude-3.7", + "gpt-4", + "o3", + "gemini", + ].some((part) => model.toLowerCase().startsWith(part)); }, anthropic: (model) => { if (