Przeglądaj źródła

omit todo tools for openai models

Aiden Cline 7 miesięcy temu
rodzic
commit
3515b4ff7d
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      packages/opencode/src/tool/registry.ts

+ 5 - 0
packages/opencode/src/tool/registry.ts

@@ -143,6 +143,11 @@ export namespace ToolRegistry {
           if (t.id === "apply_patch") return usePatch
           if (t.id === "apply_patch") return usePatch
           if (t.id === "edit" || t.id === "write") return !usePatch
           if (t.id === "edit" || t.id === "write") return !usePatch
 
 
+          // omit todo tools for openai models
+          if (t.id === "todoread" || t.id === "todowrite") {
+            if (model.modelID.includes("gpt-")) return false
+          }
+
           return true
           return true
         })
         })
         .map(async (t) => {
         .map(async (t) => {