Skip to content

fix: For non-anthropic providers, combine system prompts (allows Qwen 3.5 to work)#15018

Open
paulgear wants to merge 1 commit intoanomalyco:devfrom
paulgear:bugfix/combine-system-prompts
Open

fix: For non-anthropic providers, combine system prompts (allows Qwen 3.5 to work)#15018
paulgear wants to merge 1 commit intoanomalyco:devfrom
paulgear:bugfix/combine-system-prompts

Conversation

@paulgear
Copy link

This is an attempted fix for issue #5034 which works for me using Qwen3.5-35B-A3B.

Issue for this PR

(Hopefully) Closes #5034

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

When I updated my llama.cpp model from Qwen3-Coder-30B-A3B-Instruct to Qwen3.5-35B-A3B I started receiving the error message noted in my comment on #5034. I asked Sonnet 4.5 to analyse it and it suggested two possible fixes, one which unconditionally combines system prompts, and another which does it only for providers other than Anthropic. I chose the latter. I can provide the prompting artifacts if that's desirable.

How did you verify your code works?

  • I ran the typecheck.yml and test.yml workflows against my own branch
  • I built an opencode binary which I tested against my llama.cpp setup using Qwen3.5-35B-A3B-UD-Q6_K_XL from https://huggingface.co/unsloth/Qwen3.5-35B-A3B-GGUF. This did not produce the error and seems fully functional as a model for OpenCode, whereas without this fix it gives HTTP 500 errors and doesn't do anything useful at all.

Screenshots / recordings

n/a

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions
Copy link
Contributor

Hey! Your PR title For non-anthropic providers, combine system prompts doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@paulgear paulgear changed the title For non-anthropic providers, combine system prompts fix: For non-anthropic providers, combine system prompts Feb 25, 2026
@paulgear paulgear force-pushed the bugfix/combine-system-prompts branch from a6fe19c to 902d134 Compare February 25, 2026 06:46
@paulgear paulgear force-pushed the bugfix/combine-system-prompts branch from 902d134 to 2e448fd Compare March 2, 2026 03:38
@paulgear
Copy link
Author

paulgear commented Mar 2, 2026

@thdxr & @rekram1-node Apologies to bother you with direct mentions, but you seem to be the most common contributors to this file. Is there any chance of some eyes on this PR? Qwen3.5 and some other models seem unusable with OpenCode without it.

@paulgear paulgear changed the title fix: For non-anthropic providers, combine system prompts fix: For non-anthropic providers, combine system prompts (allows Qwen 3.5 to work) Mar 3, 2026
This is a fix for issue anomalyco#5034 which works for me using Qwen3.5-35B-A3B.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ministral 3 support: error "Only user, assistant and tool roles are supported, got system"

1 participant