Skip to content

When using the qwen3.5-122b-a10b model (via nvidia provider), the following error is returned: System message must be at the beginning #16560

@fanyapeng

Description

@fanyapeng

Description

Environment

  • OpenCode Version: 1.2.21
  • Operating System: Windows
  • Provider: nvidia
  • Model: qwen/qwen3.5-122b-a10b

Steps to Reproduce

  1. Configure opencode.json to use nvidia provider with qwen3.5-122b-a10b model
  2. Start opencode and try to interact with the model
  3. Error occurs: System message must be at the beginning

Workarounds Attempted
Added the following configuration in opencode.json:
{
"nvidia": {
"models": {
"qwen/qwen3.5-122b-a10b": {
"chat_template_kwargs": {
"enable_system_prompt": true
}
}
}
}
}
But the problem persists.

Expected Behavior
The model should be able to receive and process system prompts normally without returning an error.

Additional Information

  • Error occurs every time (100% reproducibility)
  • Other models (e.g., glm-4.7, doubao-seed-2.0-code) work fine with this provider
  • Have not tried direct curl calls to nvidia API yet

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

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