openclaw - 💡(How to fix) Fix [Guide] SiliconFlow provider for Chinese users — DeepSeek + Qwen smart routing proxy [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#49497Fetched 2026-04-08 00:54:39
View on GitHub
Comments
1
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

A community deployment guide and proxy layer for Chinese users to run OpenClaw with SiliconFlow's API (DeepSeek + Qwen vision models) via smart routing.

Root Cause

A community deployment guide and proxy layer for Chinese users to run OpenClaw with SiliconFlow's API (DeepSeek + Qwen vision models) via smart routing.

RAW_BUFFERClick to expand / collapse

Summary

A community deployment guide and proxy layer for Chinese users to run OpenClaw with SiliconFlow's API (DeepSeek + Qwen vision models) via smart routing.

Problem to solve

Chinese users cannot directly access Anthropic/OpenAI APIs. SiliconFlow provides affordable DeepSeek and Qwen models, but OpenClaw's ModelDefinitionSchema uses .strict() with no remoteId/idOverride support, making it impossible to separate the logical model ID from the actual API model name.

Proposed solution

A lightweight Node.js proxy (proxy.js) that sits between OpenClaw and SiliconFlow:

  • Smart routing: text requests → DeepSeek-V3, image requests → Qwen vision model
  • Streaming support: direct pipe forwarding, zero buffering
  • Security: request body size limit (10MB) + upstream timeout (120s)
  • All secrets via environment variables, zero hardcoding

Full guide: https://syysean.github.io/openclaw-deepseek-deploy/ Repo: https://github.com/Syysean/openclaw-deepseek-deploy

Alternatives considered

Using OpenAI-compatible providers directly — but API keys are inaccessible in China without a VPN, and costs are higher. This proxy approach works entirely within Chinese network infrastructure.

Impact

Affected: All Chinese users who want to run OpenClaw without VPN access to OpenAI/Anthropic Severity: Blocks initial setup entirely for this user group Frequency: Always — this is a infrastructure-level barrier, not an edge case Consequence: Chinese users cannot use OpenClaw at all without a solution like this proxy

Evidence/examples

No response

Additional information

No response

extent analysis

Fix Plan

To resolve the issue, we will implement a Node.js proxy server that sits between OpenClaw and SiliconFlow's API. The proxy will handle smart routing, streaming support, security, and secrets management.

Step-by-Step Solution

  • Create a new Node.js project and install required dependencies: express, axios, and dotenv.
  • Set up environment variables for SiliconFlow API credentials and other secrets using dotenv.
  • Implement smart routing logic in the proxy server:
const express = require('express');
const axios = require('axios');
const app = express();

app.use(express.json({ limit: '10mb' }));

app.post('/api/:model', async (req, res) => {
  const { model } = req.params;
  const { text, image } = req.body;

  if (text) {
    // Route text requests to DeepSeek-V3
    const response = await axios.post(process.env.DEESEEK_API_URL, { text });
    res.json(response.data);
  } else if (image) {
    // Route image requests to Qwen vision model
    const response = await axios.post(process.env.QWEN_API_URL, { image });
    res.json(response.data);
  } else {
    res.status(400).json({ error: 'Invalid request' });
  }
});
  • Implement streaming support using axios and stream modules:
const { PassThrough } = require('stream');

app.post('/api/:model/stream', async (req, res) => {
  const { model } = req.params;
  const { text, image } = req.body;

  if (text) {
    // Stream text requests to DeepSeek-V3
    const passThrough = new PassThrough();
    const response = await axios.post(process.env.DEESEEK_API_URL, { text }, { responseType: 'stream' });
    response.data.pipe(passThrough);
    res.pipe(passThrough);
  } else if (image) {
    // Stream image requests to Qwen vision model
    const passThrough = new PassThrough();
    const response = await axios.post(process.env.QWEN_API_URL, { image }, { responseType: 'stream' });
    response.data.pipe(passThrough);
    res.pipe(passThrough);
  } else {
    res.status(400).json({ error: 'Invalid request' });
  }
});
  • Set up security measures such as request body size limit and upstream timeout:
app.use((req, res, next) => {
  req.setTimeout(120000); // 120s timeout
  next();
});

Verification

To verify that the fix worked, test the proxy server by sending requests to the /api/:model endpoint with different payloads (text and image). Check that the responses are correctly routed to the corresponding SiliconFlow API endpoints.

Extra Tips

  • Make sure

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING