opencode icon indicating copy to clipboard operation
opencode copied to clipboard

qwen3-coder fails to call edit tool

Open mausch opened this issue 4 days ago • 2 comments

Description

When using https://openrouter.ai/qwen/qwen3-coder:free it fails to call the edit tool.

It fails over and over again with:

Error: The edit tool was called with invalid arguments: [
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "oldString"
    ],
    "message": "Invalid input: expected string, received object"
  },
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "newString"
    ],
    "message": "Invalid input: expected string, received object"
  }
].
Please rewrite the input so it satisfies the expected schema.

Plugins

none

OpenCode version

1.1.1

Steps to reproduce

  1. Set provider to Openrouter
  2. Set model to qwen/qwen3-coder:free
  3. Ask it to make any edits

Screenshot and/or share link

Image

Operating System

NixOS

Terminal

xterm

mausch avatar Jan 05 '26 08:01 mausch