Elffuss BraidHub

kikocis/continue public

Update toolSupport.ts
Changeset6b8c10b93aa576685db6f7a01a93ef678c4cb274584cd0aea3bcba40ab02a37d
AuthorTomasz Stefaniak <tomasz.p.stefaniak@gmail.com> · 2025-05-09 13:48 -07:00
CommitterTomasz Stefaniak <tomasz.p.stefaniak@gmail.com> · 2025-05-09 13:48 -07:00
Parents33f5452d0cbf

Browse the files at this changeset

1 file changed

modified core/llm/toolSupport.ts +29 −24
@@ -35,7 +35,8 @@
3535 if (
3636 model.toLowerCase().startsWith("gpt-4") ||
3737 model.toLowerCase().startsWith("o3")
38- ) return true;
38+ )
39+ return true;
3940 return false;
4041 },
4142 openai: (model) => {
@@ -66,7 +67,10 @@
6667 },
6768 vertexai: (model) => {
6869 // All gemini models except flash 2.0 lite support function calling
69- return model.toLowerCase().includes("gemini") && !model.toLowerCase().includes("lite");;
70+ return (
71+ model.toLowerCase().includes("gemini") &&
72+ !model.toLowerCase().includes("lite")
73+ );
7074 },
7175 bedrock: (model) => {
7276 // For Bedrock, only support Claude Sonnet models with versions 3.5/3-5 and 3.7/3-7
@@ -81,22 +85,24 @@
8185 },
8286 mistral: (model) => {
8387 // https://docs.mistral.ai/capabilities/function_calling/
84- return !model.toLowerCase().includes("mamba") &&
85- [
86- "codestral",
87- "mistral-large",
88- "mistral-small",
89- "pixtral",
90- "ministral",
91- "mistral-nemo"
92- ].some((part) => model.toLowerCase().includes(part));
88+ return (
89+ !model.toLowerCase().includes("mamba") &&
90+ [
91+ "codestral",
92+ "mistral-large",
93+ "mistral-small",
94+ "pixtral",
95+ "ministral",
96+ "mistral-nemo",
97+ ].some((part) => model.toLowerCase().includes(part))
98+ );
9399 },
94100 // https://ollama.com/search?c=tools
95101 ollama: (model) => {
96102 let modelName = "";
97103 // Extract the model name after the last slash to support other registries
98- if(model.includes("/")) {
99- let parts = model.split('/');
104+ if (model.includes("/")) {
105+ let parts = model.split("/");
100106 modelName = parts[parts.length - 1];
101107 } else {
102108 modelName = model;
@@ -117,6 +123,7 @@
117123 "llama3.2",
118124 "llama3.1",
119125 "qwen2",
126+ "qwen3",
120127 "mixtral",
121128 "command-r",
122129 "smollm2",
@@ -145,19 +152,17 @@
145152 }
146153 },
147154 deepseek: (model) => {
148- if(model !== "deepseek-reasoner") {
155+ if (model !== "deepseek-reasoner") {
149156 return true;
150157 }
151158 },
152159 watsonx: (model) => {
153- if (model.toLowerCase().includes("guard")) return false;
154- if ([
155- "llama-3",
156- "llama-4",
157- "mistral",
158- "codestral",
159- "granite-3"
160- ].some((part) => model.toLowerCase().includes(part)))
161- return true;
162- }
160+ if (model.toLowerCase().includes("guard")) return false;
161+ if (
162+ ["llama-3", "llama-4", "mistral", "codestral", "granite-3"].some((part) =>
163+ model.toLowerCase().includes(part),
164+ )
165+ )
166+ return true;
167+ },
163168 };