anomalyco / anomalyco/opencode
Bug: 401 Unauthorized and content-blocked errors via AgentRouter (OpenAI Compatible) Provider
@rekram1-node is already working on this.
Since Aug 11, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Describe the bug
When trying to use custom models (GPT-5.6 Sol and Claude 4.8 Opus) routed through AgentRouter (https://agentrouter.org) using the OpenAI Compatible provider configuration, the extension fails to handle responses. It either returns empty streaming text or throws a "401 unauthorized client detected" error due to Alibaba Cloud WAF / security rules blocking the extension's user-agent/headers.
To Reproduce
- Configure
config.yamlwith an OpenAI compatible provider pointing tohttps://agentrouter.org. - Add models
gpt-5.6-solorclaude-opus-4-8. - Open a new session and send a message.
- Observe the empty response or the 401 Unauthorized popup.
Expected behavior
The extension should successfully pass the required headers or allow user-agent customization so that proxy platforms/WAF providers do not flag the API requests as bot/malicious activity.
Plugins
OpenAI Compatible Provider (via AgentRouter)
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
Operating System
Windows 11
Terminal
No response
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.