Skip to content

qwen3-coder fails to call edit tool #6918

@mausch

Description

@mausch

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingnix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions