> For the complete documentation index, see [llms.txt](https://www.openclawbook.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.openclawbook.xyz/en/ch07-model-configuration/7.3-regional-model-providers.md). Agents can also search and read this documentation through its [MCP server](https://www.openclawbook.xyz/~gitbook/mcp).

# 7.3 Regional Model Providers

> **Generated by**: Claude Opus 5 (claude-opus-5\[1m]) **Token usage**: Input \~188,000 tokens, Output \~8,000 tokens (this section) **Source baseline**: `v2026.3.9` (`v2026.3.8-170-g665f67726`)

***

OpenClaw supports providers beyond the usual Anthropic/OpenAI/Google set. This section covers connecting Chinese providers in particular — useful if you're in a region where they're faster and cheaper, or where the major Western APIs are hard to reach.

## 7.3.1 DeepSeek, Qwen, and Moonshot

### DeepSeek

OpenAI-compatible API, so configuration is straightforward:

```json5
{
  providers: {
    deepseek: {
      baseUrl: "https://api.deepseek.com/v1",
      apiKey: "${DEEPSEEK_API_KEY}",
    },
  },
  agents: {
    defaults: {
      model: { primary: "deepseek/deepseek-chat" },
    },
  },
}
```

DeepSeek's pricing is aggressive, which makes it a reasonable default for scheduled jobs and other high-volume, low-stakes work even if your main model is something else.

### Qwen (Alibaba)

Qwen has a dedicated auth extension (`qwen-portal-auth`) for portal-based login in addition to plain API keys:

```json5
{
  providers: {
    qwen: {
      baseUrl: "https://dashscope.aliyuncs.com/compatible-mode/v1",
      apiKey: "${DASHSCOPE_API_KEY}",
    },
  },
}
```

### Moonshot (Kimi)

```json5
{
  providers: {
    moonshot: {
      baseUrl: "https://api.moonshot.cn/v1",
      apiKey: "${MOONSHOT_API_KEY}",
    },
  },
}
```

Kimi's long-context variants are worth considering when you regularly work with large documents.

> **Via OpenRouter**, remember the prefix rule (§7.1.1): `openrouter/moonshotai/kimi-k2`, not `moonshotai/kimi-k2`.

## 7.3.2 Zhipu and Doubao

### Zhipu (GLM)

```json5
{
  providers: {
    zhipu: {
      baseUrl: "https://open.bigmodel.cn/api/paas/v4",
      apiKey: "${ZHIPU_API_KEY}",
    },
  },
}
```

### Doubao (ByteDance)

Doubao uses endpoint IDs rather than model names, so the configuration looks slightly different:

```json5
{
  providers: {
    doubao: {
      baseUrl: "https://ark.cn-beijing.volces.com/api/v3",
      apiKey: "${ARK_API_KEY}",
    },
  },
}
```

There's also a `byteplus-models.ts` catalog in the source for the international BytePlus variant.

### MiniMax

Has a dedicated auth extension (`minimax-portal-auth`) alongside standard key configuration.

## 7.3.3 Practical Considerations

### Mixing providers in a fallback chain

Regional providers make good fallback entries precisely because they have **different failure modes** from the Western APIs:

```json5
{
  agents: {
    defaults: {
      model: {
        primary: "anthropic/claude-opus-4-6",
        fallbacks: [
          "deepseek/deepseek-chat",       // different provider, different network path
        ],
      },
    },
  },
}
```

If your primary is unreachable due to a network issue rather than a service issue, a provider on a different network path is the fallback that actually helps.

### Network access

If you're in a region where the major Western APIs are hard to reach directly, two approaches:

**Proxy configuration** — standard environment variables work:

```bash
export HTTPS_PROXY=http://127.0.0.1:7890
openclaw gateway
```

> **One caveat worth knowing** (§24.5.4): with proxy environment variables set, the browser tool's strict SSRF policy **fails closed** — because a proxy can route a connection anywhere, making DNS pre-checks meaningless. If you use both a proxy and strict browser SSRF policy, you'll hit this.

**Use regional providers as primary** — simpler, and avoids the proxy dependency entirely. Given how capable the current generation of Chinese models is, this is a reasonable choice on its own merits rather than as a workaround.

### Capability differences to expect

Not every provider supports every feature:

| Feature                     | Notes                                                                                                                       |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| Vision                      | Varies by model; when unsupported, media understanding falls back to a describing model (§34.6.3)                           |
| Tool calling                | Broadly supported, but format compliance varies — this is why `apply_patch` is restricted to OpenAI-family models (§22.5.1) |
| Thinking / reasoning levels | Varies; unsupported levels trigger an automatic downgrade and retry (§15.5.3)                                               |
| Prompt caching              | Mostly an Anthropic feature; cost-optimization advice about cache TTL (§7.2.3) may not apply                                |

OpenClaw handles most of these differences automatically through the streamFn wrapper chain (§15.5.5) — quirks like tool-call ID formats and thinking-block handling are patched per provider.

### Checking what works

```bash
openclaw models status        # probes reachability for each configured model
openclaw doctor               # broader health check
```

***

## Section Summary

1. **Most Chinese providers expose OpenAI-compatible APIs**, so configuration is just a `baseUrl` plus a key; Qwen and MiniMax additionally have portal-auth extensions.
2. **Doubao uses endpoint IDs rather than model names** — its configuration shape differs slightly from the others.
3. **Regional providers make good fallback entries precisely because they have different failure modes** — including a different network path, which is what helps when the problem is connectivity rather than service health.
4. **Proxy environment variables work**, but note that they make the browser tool's **strict SSRF policy fail closed** — a proxy can route anywhere, so DNS pre-checks become meaningless.
5. **Using regional providers as primary avoids the proxy dependency entirely** and is a reasonable choice on capability grounds, not just as a workaround.
6. **Expect capability variation** in vision, tool-call format compliance, thinking levels, and prompt caching — OpenClaw patches most differences automatically through the streamFn wrapper chain.
