You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I’m using qwen3-coder-30b-a3b-instruct with the Pi.dev AI agent tools and I encountered an issue where the model generates invalid tool calls when trying to edit files.
The agent attempts to call the edit tool, but the payload is malformed. Example error:
Validation failed for tool "edit": edits.0: must be object
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I’m using qwen3-coder-30b-a3b-instruct with the Pi.dev AI agent tools and I encountered an issue where the model generates invalid tool calls when trying to edit files.
The agent attempts to call the edit tool, but the payload is malformed. Example error:
Validation failed for tool "edit": edits.0: must be object
The generated arguments look like this:
{
"path": "backend/services/auth.py",
"edits": "[{"oldText":"...","newText":"..."}]"
}
The problem seems to be that edits is being passed as a string instead of an array/object:
"edits": "[{...}]"
instead of:
"edits": [
{
"oldText": "...",
"newText": "..."
}
]
So the model/tool wrapper appears to serialize the edits array incorrectly.
I’m not sure whether this is:
a model formatting issue,
an agent parser issue,
or a tool schema issue.
Has anyone encountered this before or knows where this should be reported? Thank you for your time !
Beta Was this translation helpful? Give feedback.
All reactions