opencode icon indicating copy to clipboard operation
opencode copied to clipboard

AI_InvalidToolInputError: Invalid input for tool todowrite

Open ds-brandao opened this issue 1 year ago • 3 comments

I have been really enjoying opencode, it is a great tool but i have been consistently getting the following message after switching tobuildmode while using openai models:

AI_InvalidToolInputError: Invalid input for tool todowrite: Type validation failed: Value:
{"todos":[{"id":"todo1","status":"completed"}]}.
Error message: [
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "undefined",
    "path": [
      "todos",
      0,
      "content"
    ],
    "message": "Required"
  },
  {
    "expected": "'high' | 'medium' | 'low'",
    "received": "undefined",
    "code": "invalid_type",
    "path": [
      "todos",
      0,
      "priority"
    ],
    "message": "Required"
  }
]

ds-brandao avatar Jul 25 '25 15:07 ds-brandao

Just had the same problem with OpenRouter Qwen3 Coder

unholywhale avatar Jul 25 '25 15:07 unholywhale

try latest

thdxr avatar Jul 26 '25 05:07 thdxr

i am seen the same issue with version 0.3.77. is there a newer version?

i am seen this problem whenever I have it generate a plan and then execute it.

ds-brandao avatar Jul 26 '25 05:07 ds-brandao