Elffuss BraidHub

kikocis/continue public

feat: use recommended models fn for tools (#7755)

* feat: use recommended models fn for tools

* Update toolSupport.ts

---------

Co-authored-by: Dallin Romney <dallinromney@gmail.com>
Changeset36ebc3ac99f4c02be3cfd4fe6979ea42969de7d754185b51ea99bdb69e34f1ca
AuthorPatrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-09-17 16:48 -07:00
CommitterGitHub <noreply@github.com> · 2025-09-17 16:48 -07:00
Parents4d2cde11634f

Browse the files at this changeset

2 files changed

modified core/llm/toolSupport.ts +1 −2
@@ -374,9 +374,8 @@
374374 [/o[134]/],
375375 [/deepseek/, /r1|reasoner/],
376376 [/gemini/, /2\.5/, /pro/],
377- [/gpt/, /4/],
378377 [/gpt-5/],
379- [/claude/, /sonnet/, /3\.5|3\.7|3-5|3-7|-4/],
378+ [/claude/, /sonnet/, /3\.7|3-7|-4/],
380379 [/claude/, /opus/, /-4/],
381380 ];
382381 for (const combo of recs) {
modified core/tools/index.ts +2 −1
@@ -1,4 +1,5 @@
11 import { ConfigDependentToolParams, Tool } from "..";
2+import { isRecommendedAgentModel } from "../llm/toolSupport";
23 import * as toolDefinitions from "./definitions";
34
45 // I'm writing these as functions because we've messed up 3 TIMES by pushing to const, causing duplicate tool definitions on subsequent config loads.
@@ -36,7 +37,7 @@
3637 );
3738 }
3839
39- if (modelName?.includes("claude") || modelName?.includes("gpt-5")) {
40+ if (modelName && isRecommendedAgentModel(modelName)) {
4041 tools.push(toolDefinitions.multiEditTool);
4142 } else {
4243 tools.push(toolDefinitions.editFileTool);