[API Error: 400 <400> InternalError.Algo.InvalidParameter for every message
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 3.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 714
Description
What happened?
Any message/ request/prompt sent to Qwen code gives a API Error: 400. Every single one. This has been happening for the last 12-16 hours without any setting or config change by me. Started happening in the middle of a coding session
Exact error message:
✕ [API Error: 400 <400> InternalError.Algo.InvalidParameter: An assistant message with "tool_calls" must be followed by tool messages responding to each "tool_call_id". The following tool_call_ids did not have response messages: message[540].role]
What did you expect to happen?
The prompts are sent to the model and the model responds appropriately
Client information
Client Information
Run qwen to enter the interactive CLI, then run the /about command.
╭────────────╮
│ > /about │
╰────────────╯
╭──────────────────────────────────────────────────────────────────────────────────╮
│ │
│ About Qwen Code │
│ │
│ CLI Version 0.0.11 │
│ Git Commit b01ddf0a │
│ Model qwen3-coder-plus │
│ Sandbox no sandbox │
│ OS win32 │
│ Auth Method qwen-oauth │
│ │
╰──────────────────────────────────────────────────────────────────────────────────╯
Login information
Auth
Anything else we need to know?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure in the Qwen interactive CLI using the reported version, model, OS, and qwen-oauth details, then inspect how the request history handles assistant tool_calls and matching tool messages. Done means ordinary prompts no longer return the reported 400 error and the behavior is covered by an appropriate regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100