anomalyco / anomalyco/opencode

Bug: 401 Unauthorized and content-blocked errors via AgentRouter (OpenAI Compatible) Provider

Open
#41,873 1 comment 0 reactions 1 assignee View on GitHub

@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
  1. Configure config.yaml with an OpenAI compatible provider pointing to https://agentrouter.org.
  2. Add models gpt-5.6-sol or claude-opus-4-8.
  3. Open a new session and send a message.
  4. 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
Image
Operating System

Windows 11

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.