opencode icon indicating copy to clipboard operation
opencode copied to clipboard

AI_InvalidToolInputError: Invalid input for tool todowrite

Open binajmen opened this issue 1 year ago • 7 comments

FYI, just sharing as I dont know if you are monitoring this.

AI_InvalidToolInputError: Invalid input for tool todowrite: Type validation
failed: Value: {"todos":"[{\"content\": \"Analyze current project structure
and understand data models\", \"id\": \"1\", \"priority\": \"high\",
\"status\": \"completed\"}, {\"content\": \"Design import feature requirements
and validation logic\", \"id\": \"2\", \"priority\": \"high\", \"status\":
\"in_progress\"}, {\"content\": \"Plan database schema changes if needed\",
\"id\": \"3\", \"priority\": \"medium\", \"status\": \"pending\"},
{\"content\": \"Design UI flow for project import feature\", \"id\": \"4\",
\"priority\": \"medium\", \"status\": \"pending\"}, {\"content\": \"Create
implementation plan with specific components\", \"id\": \"5\", \"priority\":
\"high\", \"status\": \"pending\"}]</parameter>\n</invoke>"}.
Error message: [
  {
    "code": "invalid_type",
    "expected": "array",
    "received": "string",
    "path": [
      "todos"
    ],
    "message": "Expected array, received string"
  }
]

Using GitHub Copilot Sonnet 4

binajmen avatar Jul 28 '25 14:07 binajmen

Seeing same thing on Anthropic Sonnet 4 on 0.3.81

joe-p avatar Jul 29 '25 19:07 joe-p

are either of you still seeing this on latest?

rekram1-node avatar Aug 29 '25 21:08 rekram1-node

Just got this issue on 0.7.0 (qwen3-coder-480b)

CruelAddict avatar Sep 10 '25 11:09 CruelAddict

Running into this quite often on v1.0.45 (OpenRouter, GLM 4.6 exacto, MacOS 15.7.1, Ghostty v1.2.3)

Image

abh1nav avatar Nov 08 '25 03:11 abh1nav

wow wtf all the empty ones

what model is that?

rekram1-node avatar Nov 08 '25 03:11 rekram1-node

GLM 4.6 exacto. This isn't specific to 1.x, it used to happen occasionally in 0.15.x too.

abh1nav avatar Nov 08 '25 05:11 abh1nav

oh okay then thats the model calling the tool stupidly

thought this was a bug on our end

we could prolly do something to make ux better here tho

rekram1-node avatar Nov 08 '25 05:11 rekram1-node