Skip to content

OpenCode: BadRequestError on Qwen models #296

Description

@m0leynik

Hi,
Thanks for this tooling.
Hope to help make it a bit better :)

Agent: OpenCode
Model: Qwen/Qwen35-397B-A17B-FP8 (same issue with other Qwens)

Scenario:

  1. Modify OpenCode config { "plugin": ["@dietrichgebert/ponytail"] }
  2. Run OpenCode
  3. Send a single request

Expected result:
No error

Actual result:

Bad Request: {"detail":"{\"error\":{\"message\":\"System message must be at the beginning.\",\"type\":\"BadRequestError\",\"param\":null,\"code\":400}}"}

Also:
The issue cannot be reproduced with non-Qwen models like Gemma, gpt-oss.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions