Przeglądaj źródła

disable todo tools for qwen models to improve compatibility

Dax Raad 8 miesięcy temu
rodzic
commit
5cc44c872e
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6 1
      packages/opencode/src/tool/registry.ts

+ 6 - 1
packages/opencode/src/tool/registry.ts

@@ -68,7 +68,7 @@ export namespace ToolRegistry {
 
 
   export async function enabled(
   export async function enabled(
     _providerID: string,
     _providerID: string,
-    _modelID: string,
+    modelID: string,
     agent: Agent.Info,
     agent: Agent.Info,
   ): Promise<Record<string, boolean>> {
   ): Promise<Record<string, boolean>> {
     const result: Record<string, boolean> = {}
     const result: Record<string, boolean> = {}
@@ -86,6 +86,11 @@ export namespace ToolRegistry {
       result["webfetch"] = false
       result["webfetch"] = false
     }
     }
 
 
+    if (modelID.includes("qwen")) {
+      result["todowrite"] = false
+      result["todoread"] = false
+    }
+
     return result
     return result
   }
   }