After adding @cortexkit/aft-opencode@latest to OpenCode plugins, requests to qwen3.6-27b through LiteLLM/vLLM fail with:
litellm.BadRequestError: Hosted_vllmException - {"error":{"message":"System message must be at the beginning.","type":"BadRequestError","param":null,"code":400}}
Environment
- OpenCode
1.17.13
- Plugins:
@cortexkit/aft-opencode@latest
@cortexkit/opencode-magic-context@latest
- Model:
qwen3.6-27b
- Provider: LiteLLM
- Endpoint:
/v1/chat/completions
Reproduction
- Add
@cortexkit/aft-opencode@latest to the plugin list
- Start a fresh OpenCode session with
qwen3.6-27b
- Send the first prompt
- Request fails with the error above
Observations
- This started immediately after adding
@cortexkit/aft-opencode@latest
- A brand new session fails on the first turn
- Another model through the same LiteLLM instance works
- In a mixed session, using another model works, then switching to
qwen3.6-27b fails again with the same error
Relevant code location
Installed package contains:
"experimental.chat.system.transform": async (_input, output) => {
if (hintsBlock) {
output.system.push(hintsBlock);
}
},
From @cortexkit/aft-opencode dist:
dist/index.js around lines 36794-36797
After adding
@cortexkit/aft-opencode@latestto OpenCode plugins, requests toqwen3.6-27bthrough LiteLLM/vLLM fail with:Environment
1.17.13@cortexkit/aft-opencode@latest@cortexkit/opencode-magic-context@latestqwen3.6-27b/v1/chat/completionsReproduction
@cortexkit/aft-opencode@latestto the plugin listqwen3.6-27bObservations
@cortexkit/aft-opencode@latestqwen3.6-27bfails again with the same errorRelevant code location
Installed package contains:
From
@cortexkit/aft-opencodedist:dist/index.jsaround lines36794-36797