[aws bedrock: anthropic opus 4.1] The arguments provided to the tool are invalid: Invalid input for tool write: JSON parsing failed: Text
looks like this problem not only with write tool, but it like streaming at all for opus 4.1 in bedrock. I like stop streaming on a middle. reproduce only on large write operations. Not reproduce for opus 4. only for opus 4.1
this is likely issues on their end given the new model - give it a week and let me know if there are still problems
for share, I did try to use bedrock due openrouter. maybe I not completely understand how openrouter works, but in opencode, opus 4.1 on bedrock due openrouter was pretty fast and have no some steaming-like problems
maybe, it's related to this settings. like some limit on bedrock, that unhandled by ai-sdk
@thdxr I am still facing this issue
The arguments provided to the tool are invalid: Invalid input for tool write: JSON parsing failed: Text: {"filePath": ...
Error message: JSON Parse error: Expected '}'
Same error here, using opencode 0.14.6 and LM Studio 0.3.29 with qwen/qwen3-coder-30b. If I use qwen/qwen2.5-coder-14b the error is not present.
invalid [tool=write, error=Invalid input for tool write: JSON parsing failed: Text: {"filePath": "C:\Users\Project_Design_Document.md". Error message: JSON Parse error: Expected '}']
how can i fix this
This is the model calling a tool incorrectly, it should be able to recover on it's own. It called a tool with invalid json, it just has to try again generally
I get it, when the content is to long (with Copilot). Then I prompt, that it should write in chunks and then the document could be written.