Skip to content

Qwen 3.7 Plus/Max (via OpenRouter) unknown/invalid tool calls #33618

Description

@BernhardGruen

Description

BLUF: When using newer Qwen (3.7 Plus/Max) models via OpenRouter, tool calls sporadically fail with empty names like ✗ "" failed
followed by Tool execution aborted, causing repeated retries and aborted sessions.

Symptoms observed:

  • Tool calls displayed as ✗ "" failed or ✗ <toolname> failed in the TUI
  • Tool execution aborted errors (up to 15 per session in severe cases)
  • Successful tool executions followed immediately by spurious failures for the same call ID
  • Sessions becoming unusable due to repeated tool aborts

Affected providers: Confirmed with Qwen 3.7 Plus/Max via OpenRouter, likely affects other models and maybe other providers too.

Plugins

None

OpenCode version

1.17.9

Steps to reproduce

  1. Configure OpenCode to use a Qwen model (e.g., qwen/qwen-3.7-plus) via OpenRouter
  2. Start a session and request a task that requires multiple tool calls (e.g., writing code with tests using TDD
    methodology)
  3. Observe that after a successful tool execution, there are sometimes immediate spurious failures with empty tool names
  4. The frequency increases with longer sessions and more tool calls

Note: The bug is stochastic. Therefore it might need some repetitions to reproduce it. About 50% of sessions (as described above) are affected by this.

Screenshot and/or share link

Exact prompt:

Follow the Skills. Follow the Semantic Achors. Follow the Rules.
Create using TDD a Hello World Program in TypeScript. Use bun. 

Error in detail:

invalid [tool=unknown, error=Model tried to call unavailable tool 'unknown'. Available tools: bash, edit, glob, grep, invalid, question, read, skill, task, todowrite, webfetch, websearch, write.]
unknown 

Execution with error visible: https://opncd.ai/share/XIq1kE7k

Operating System

Fedora 44 Silverblue / Bluefin

Terminal

Ptyxis (but not relevant)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions