Skip to content

Privacy proxy incompatible with MiniMax OAuth provider - returns HTML instead of JSON #3

@xiongwei-git

Description

@xiongwei-git

Description

When the privacy proxy is enabled, requests to MiniMax models (via minimax-portal provider with OAuth authentication) fail. The proxy receives HTML responses instead of JSON from the MiniMax API, causing a SyntaxError: Unexpected token '<' error.

Environment

  • OpenClaw version: 2026.4.2
  • ClawXRouter version: 1.0.6 (installed from GitHub source)
  • MiniMax provider: minimax-portal with OAuth authentication (apiKey: "minimax-oauth")
  • MiniMax API endpoint: https://api.minimaxi.com/anthropic

Steps to Reproduce

  1. Install ClawXRouter plugin
  2. Enable privacy proxy (privacy.enabled: true)
  3. Configure default model as minimax-portal/MiniMax-M2.7-highspeed
  4. Send any message through OpenClaw

Error Logs

[ClawXrouter Proxy] → https://api.minimaxi.com/anthropic/messages (stream=true)
[ClawXrouter Proxy] Streaming unavailable, falling back to non-streaming + SSE conversion
[ClawXrouter Proxy] Request failed: SyntaxError: Unexpected token '<', "<html>\r\n<h"... is not valid JSON

HTTP 500 proxy_error: ClawXrouter proxy error: SyntaxError: Unexpected token '<', "<html>\r\n<h"... is not valid JSON

Root Cause Analysis

The MiniMax provider uses OAuth authentication (not standard API key auth). When the ClawXRouter privacy proxy intercepts and forwards the request, the OAuth token/session is likely not properly forwarded, causing MiniMax to return an HTML error page (authentication page) instead of a JSON API response.

The proxy then tries to parse this HTML as JSON, resulting in the SyntaxError.

Current Workaround

Disabling the privacy proxy entirely (privacy.enabled: false), which also disables privacy protection for all other providers.

Feature Request

Please consider adding a provider-level proxy exclusion option, for example:

{
  "privacy": {
    "enabled": true,
    "proxyExcludeProviders": ["minimax-portal"]
  }
}

This would allow the privacy proxy to remain active for API-key-based providers (e.g., Anthropic, OpenAI via Evolink) while bypassing it for OAuth-based providers like MiniMax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions