Skip to content

The open source coding agent.

TypeScript

disable todo tools for qwen models to improve compatibility

Dax Raad5cc44c872e82
diff --git a/packages/opencode/src/tool/registry.ts b/packages/opencode/src/tool/registry.ts
index e7938057908..9e8f9638c84 100644
--- a/packages/opencode/src/tool/registry.ts
+++ b/packages/opencode/src/tool/registry.ts
@@ -68,7 +68,7 @@ export namespace ToolRegistry {
export async function enabled(
_providerID: string,
- _modelID: string,
+ modelID: string,
agent: Agent.Info,
): Promise<Record<string, boolean>> {
const result: Record<string, boolean> = {}
@@ -86,6 +86,11 @@ export namespace ToolRegistry {
result["webfetch"] = false
}
+ if (modelID.includes("qwen")) {
+ result["todowrite"] = false
+ result["todoread"] = false
+ }
+
return result
}