anomalyco / anomalyco/opencode
Cloudflare Workers AI models fail on the first message
Open
@kitlangton is already working on this.
Since Aug 31, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Cloudflare Workers AI models can fail on the first message in two ways. Models that report output == context trigger ContextOverflowError before a request is sent because almost the whole context is reserved for output. Models that reach Workers AI can receive HTTP 400 System message must be at the beginning when a system transform produces multiple system messages.
Plugins
Reproduces when a system transform splits the system prompt.
OpenCode version
1.18.25
Steps to reproduce
- Authenticate
cloudflare-workers-aiand setCLOUDFLARE_ACCOUNT_ID. - Select a Workers AI model such as
@cf/qwen/qwen2.5-coder-32b-instructor@cf/qwen/qwen3.8-27b. - Send the first message.
Screenshot and/or share link
N/A
Operating System
Windows 11
Terminal
Windows Terminal
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.
Assessment
This issue has not been assessed yet.