Skip to content

More domestic models and custom relay endpoints ​

The domestic models series is wrapping up here: DeepSeek, Qwen, GLM, Kimi, MiniMax, Doubao, Hunyuan, and Qianfan all have official plugins, and were connected in earlier lessons. This lesson covers the remaining three items — StepFun, Xiaomi MiMo, and Meituan LongCat, which still have official plugins; what to do about models like Spark and Baichuan that have no official provider; and the universal solution for OpenClaw relay: custom-api-key custom endpoints, plus the three aggregation routes OpenRouter, LiteLLM, and ClawRouter. The whole thing takes about 10 minutes; this tutorial is based on v2026.10.9.

What you'll be able to do after this lesson ​

  • Install the three official plugins for StepFun, Xiaomi MiMo, and Meituan LongCat and get each of their default models running
  • Know which domestic models do not have an official provider (Spark, Baichuan, 01.AI Yi, SenseTime SenseChat), and stop wasting time looking for plugins
  • Use the custom-api-key workflow to connect any OpenAI-compatible relay endpoint into OpenClaw — both the onboarding and config-file approaches
  • Connect the three aggregation routers OpenRouter / LiteLLM / ClawRouter and use multiple providers' models with a single key
  • Know how to tune a relay endpoint's compatibility switches: reasoning_effort returning 400, intranet endpoints being rejected, and vendor-proprietary field passthrough

🎒 Prerequisites ​

  • Completed Connecting models overview: the provider system and model switching: you're comfortable with the three steps of "install plugin → configure credentials → pick model" and the provider/model reference rules
  • OpenClaw is installed and the Gateway is running: openclaw gateway status produces output
  • You have the credentials to connect: a vendor API key, or a baseUrl + API key from your relay station
  • If you're running a server / daemon deployment, you know where ~/.openclaw/.env is — that's where the key will ultimately live

Follow along with me ​

Step 1: choose your route — official plugin, custom endpoint, or aggregation router ​

Why: OpenClaw offers three routes for connecting models, and picking the wrong one wastes effort — take 30 seconds to find your seat first.

Your situationWhich routeWhich step of this lesson
Using StepFun / Xiaomi MiMo / Meituan LongCatOfficial plugin (external, requires installation)Step 2
Using Spark, Baichuan, 01.AI Yi, or SenseTime — the vendor provides an OpenAI-compatible APICustom endpoint custom-api-keyStep 3
What you have is a relay station (an OpenAI-compatible proxy that gave you a baseUrl + key)Custom endpoint custom-api-keyStep 3
Want to use multiple providers' models with one key / a unified team gatewayAggregation routerStep 4

First, a negative result to report (full audit of the official repo 2026-11-03): iFlytek Spark, Baichuan, 01.AI Yi, and SenseTime SenseChat have no official provider plugin in OpenClaw — no matching catalog entry can be found in either extensions/ or docs/providers/. SenseTime's SenseAudio is indeed a built-in plugin, but that's a speech transcription service, not the SenseChat LLM. So don't go looking for a "Spark plugin" — these three vendors can only use the custom endpoint in step 3 or the aggregation router in step 4.

Step 2: connecting StepFun, Xiaomi MiMo, and Meituan LongCat (three official plugins in a row) ​

Why: these three are the last seats among official plugins for domestic models (the Volcano international edition BytePlus was covered in the Doubao lesson), and the installation is exactly the same routine as DeepSeek — install the plugin, configure the key, pick the model.

First, a quick-reference table (all information comes from the official provider docs):

VendorPlugin package (external, requires installation)provider idEnvironment variableDefault model
StepFun@openclaw/stepfun-providerstepfun, stepfun-planSTEPFUN_API_KEYstepfun/step-3.5-flash
Xiaomi MiMo@openclaw/xiaomi-providerxiaomi, xiaomi-token-planXIAOMI_API_KEY, XIAOMI_TOKEN_PLAN_API_KEYxiaomi/mimo-v2.6-pro
Meituan LongCat@openclaw/longcat-providerlongcatLONGCAT_API_KEYlongcat/LongCat-2.0

StepFun: First distinguish the China Key from the international Key ​

StepFun keys are region-specific; the official documentation explicitly requires: a China Key goes with the .com endpoint, and an international Key goes with the .ai endpoint — don't mix them up.

bash
openclaw plugins install @openclaw/stepfun-provider
openclaw onboard --auth-choice stepfun-standard-api-key-cn    # 中国 Key → api.stepfun.com
openclaw onboard --auth-choice stepfun-standard-api-key-intl  # 国际 Key → api.stepfun.ai

You should see: the onboarding prompt asks you to paste STEPFUN_API_KEY, and after verification passes, the default model becomes stepfun/step-3.5-flash.

Standard endpoint model catalog:

Model referenceContextMax outputNotes
stepfun/step-3.5-flash262,14465,536Default model
stepfun/step-3.7-flash262,144262,144Multimodal, supports image input

There is also a Step Plan endpoint (a separate provider, reference prefix stepfun-plan/..., auth-choice is stepfun-plan-api-key-cn|intl), with models such as stepfun-plan/step-3.5-flash-2603. Step 3.7 supports low / medium / high, three effort levels, with no non-reasoning mode; /think off maps to low.

Xiaomi MiMo: two providers — pay-as-you-go and Token Plan ​

bash
openclaw plugins install @openclaw/xiaomi-provider
openclaw onboard --auth-choice xiaomi-api-key          # 按量付费,sk-... Key
openclaw onboard --auth-choice xiaomi-token-plan-sgp   # Token Plan,tp-... Key(区域可选 cn / sgp / ams)

Create the pay-as-you-go Key in the Xiaomi MiMo console: platform.xiaomimimo.com/#/console/api-keys; for Token Plan, copy the regional endpoint from the subscription page along with the matching tp-... Key.

Model overview: mimo-v2.6-pro (default), mimo-v2.6-flash, mimo-v2.6-pro-ultraspeed (the official catalog marks 20x output speed), mimo-v2.5, mimo-v2.5-pro — all with a context of 1,048,576 tokens. /think is supported at all levels (off to max, default high). This plugin also includes TTS (mimo-v2.5-tts); if you want to give Claw a voice, see the images-and-voice lesson.

Meituan LongCat: one model, focused on reasoning ​

bash
openclaw plugins install @openclaw/longcat-provider
openclaw onboard --auth-choice longcat-api-key

Create the Key on the LongCat API platform: longcat.chat/platform/api_keys.

There is only one model: longcat/LongCat-2.0 — 1,048,576 context / 131,072 max output, text-only input, officially positioned as "a reasoning model built for coding and agentic workloads." Pricing (per the official documentation, per million tokens): input $0.75 (uncached) / $0.015 (cache hit), output $2.95.

💡 Want to run LongCat's open weights locally?

Don't use the longcat/LongCat-2.0 reference to connect to a local deployment — it points to the hosted API. To run the open weights locally, use vLLM / SGLang; see the next lesson Local models: Ollama, vLLM, and ds4.

  • Whichever one you installed, openclaw models list --provider stepfun (or xiaomi / longcat) can list its model catalog

Step 3: Configure OpenClaw relay endpoints — the universal custom-api-key workflow ​

Why: iFlytek Spark, Baichuan, Lingyi, and SenseTime have no official plugins; the "relay stations" and "API proxies" on the market are each their own private deployments too. But as long as the other side gives you an OpenAI-compatible baseUrl + API Key, OpenClaw can be connected via the custom-api-key workflow — that is the core method covered in this lesson.

Option A (recommended): onboarding with a single command ​

Fully parameterized non-interactive version (parameters taken from the official documentation example; $CUSTOM_API_KEY must already be set in the environment):

bash
openclaw onboard --non-interactive --accept-risk --skip-health \
  --auth-choice custom-api-key \
  --custom-base-url "https://llm.example.com/v1" \
  --custom-model-id "foo-large" \
  --custom-api-key "$CUSTOM_API_KEY" \
  --custom-compatibility openai

Each of the five parameters handles one thing:

ParameterPurposeNotes
--custom-base-urlRelay station addressOpenAI-compatible endpoints usually need /v1 appended; see the pitfall reminder
--custom-model-idModel IDCan be omitted: when omitted, it is auto-discovered from the endpoint's /models (5-second timeout), saving all discovered models with the first as the default; if discovery fails, rerun and explicitly specify
--custom-api-keyAPI KeyWhen omitted, reads the environment variable CUSTOM_API_KEY
--custom-compatibilityProtocol shapeopenai (default, chat completions) / openai-responses (endpoints with only /v1/responses) / anthropic; anthropic requires --custom-model-id
--custom-image-input / --custom-text-inputInput typeCommon vision model IDs (GPT-4o/4.1/5.x, Claude 3/4, Gemini, Qwen-VL, LLaVA, Pixtral, etc.) are automatically marked for image input; vision models not on the list can be force-marked with the former

You should see: the command completes without errors; openclaw models status shows an additional custom provider, with the default model pointing to the ID you provided.

Don't want to memorize parameters? Run openclaw onboard interactively, choose Custom setup to go through all guided options — you fill in exactly the same things.

⚠️ Running the Gateway as a daemon? Don't put the Key in an interactive shell

When the Gateway runs as a launchd / systemd service, it cannot see the export environment variables in your terminal. Write the Key into ~/.openclaw/.env, or provide it to that process via env.shellEnv in the configuration.

Option B: manually edit the configuration file ​

Prefer having everything under control, or need to roll out configuration in bulk across multiple machines—write models.providers by hand. Official example for an unauthenticated endpoint (verbatim):

json5
{
  agents: {
    defaults: { model: { primary: "my-studio/qwen3.8" } },
  },
  models: {
    providers: {
      "my-studio": {
        baseUrl: "https://studio.example.ts.net/v1",
        api: "openai-completions",
        auth: "none",
        models: [{ id: "qwen3.8", name: "Qwen3.8" }],
      },
    },
  },
}

The form with a Key and full model metadata (verbatim excerpt from the official example):

json5
{
  agents: {
    defaults: {
      model: { primary: "lmstudio/my-local-model" },
      models: { "lmstudio/my-local-model": { alias: "Local" } },
    },
  },
  models: {
    providers: {
      lmstudio: {
        baseUrl: "http://localhost:1234/v1",
        apiKey: "${LM_API_TOKEN}",
        api: "openai-completions",
        timeoutSeconds: 300,
        models: [
          {
            id: "my-local-model",
            name: "Local Model",
            reasoning: false,
            input: ["text"],
            cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
            contextWindow: 200000,
            maxTokens: 8192,
          },
        ],
      },
    },
  },
}

Model fields can be omitted; the defaults when omitted are: reasoning: false, input: ["text"], cost all 0, and when contextWindow is not set it falls back to 200000. Official recommendation: write everything out explicitly according to the real limits of your proxy / model.

Unauthenticated endpoints: auth: "none" ​

Self-hosted inference services on an internal network or tailnet / VPN often have no Key. OpenClaw supports this, but with two hard rules:

  • Explicitly declare auth: "none" (onboarding corresponds to --custom-no-auth, which cannot be used together with --custom-api-key)—automatic unauthenticated detection only covers loopback and RFC1918 addresses; "private network but not RFC1918" cases like tailnet / VPN must be declared explicitly
  • auth: "none" only takes effect for the openai-completions adapter; Responses, Azure OpenAI, and Anthropic-compatible endpoints require a placeholder Key even when unauthenticated

Compatibility switches (compat) for relay endpoints ​

OpenClaw automatically applies a conservative trimming layer to "openai-completions endpoints whose baseUrl is not api.openai.com", to prevent relay services from being overwhelmed by OpenAI-exclusive fields. Automatic rules versus manual switches:

Symptom / needSwitch
The relay service does not recognize the developer roleAutomatic: non-native endpoints force compat.supportsDeveloperRole: false (explicitly setting true will also be overridden)
Reports 400: does not recognize reasoning_effortSet compat.supportsReasoningEffort: false for that model (custom models with reasoning: true send this field by default when thinking is enabled)
A thinking session requires replaying reasoning_contentSet compat.requiresReasoningContentOnAssistantMessages: true (replay field names reasoning / reasoning_text / reasoning_content are kept as-is by default)
Need to pass through vendor-private fieldsagents.defaults.models["provider/model"].params.extra_body (or extraBody), merged into the request body
LAN / tailnet endpoint rejectedmodels.providers.<id>.request.allowPrivateNetwork: true (loopback is allowed by default)
Slow endpoint keeps timing outmodels.providers.<id>.timeoutSeconds
Anthropic-compatible relay does not recognize beta headersAutomatic: suppress implicit beta headers (e.g. claude-code-20250219); when beta features are genuinely needed, declare them explicitly in models.providers.<id>.headers["anthropic-beta"]
  • openclaw models status shows the credential sources of custom providers; use openclaw config get models.providers.<id>.baseUrl to view endpoint addresses

Step 4: Pick one of three aggregation routers—OpenRouter, LiteLLM, ClawRouter ​

Why: Don't want to register with every model provider? Aggregation routers give you one Key for models from many providers. All three plugins are built into OpenClaw (included in OpenClaw), no need to install them first.

RouterWhat it isAuthenticationDefault address / model
OpenRouterCommercial aggregation service, one Key to call models from many providersOAuth or API KeyDefault model openrouter/auto
LiteLLMOpen-source self-hosted LLM gateway (100+ providers)Proxies your own KeysDefault proxy http://localhost:4000
ClawRouterOpenClaw's officially hosted multi-upstream routerAdmin-issued policy-scoped Keyhttps://clawrouter.openclaw.ai

OpenRouter: one Key for both domestic and overseas models ​

The built-in starter catalog already includes domestic models: openrouter/moonshotai/kimi-k2.6, openrouter/moonshotai/kimi-k2.5; other references take the form openrouter/<provider>/<model>, dynamically resolving OpenRouter's official catalog. When calling DeepSeek V4 via OpenRouter, OpenClaw automatically adds reasoning_content replay, so thinking sessions don't break.

bash
# 方式一:API Key(在 openrouter.ai/keys 创建)
openclaw onboard --auth-choice openrouter-api-key

# 方式二:聊天里直接 OAuth(私聊发送,浏览器登录授权)
/login openrouter

You should see: after verification passes, the default model is openrouter/auto. To lock in a specific model: openclaw models set openrouter/moonshotai/kimi-k2.6.

LiteLLM: self-host a unified gateway with cost accounting ​

LiteLLM is an open-source LLM gateway that unifies the API for 100+ providers, with cost tracking, logging, quota-limited virtual Keys, and backend failover. OpenClaw connects to its OpenAI-compatible /v1:

bash
openclaw onboard --auth-choice litellm-api-key
# 提示代理地址时回车用默认 http://localhost:4000,或填你的代理 URL

Non-interactive version for a remote proxy (verbatim from the official docs):

bash
openclaw onboard --non-interactive --accept-risk --skip-health --auth-choice litellm-api-key \
  --litellm-api-key "$LITELLM_API_KEY" --custom-base-url "https://litellm.example/v1"

Onboarding calls the proxy's /v1/models to discover models and uses the first one as the default; if discovery fails, you'll be prompted to enter the ID manually. For a LiteLLM proxy on your LAN, remember to add request.allowPrivateNetwork: true. To issue quota-limited Keys to different people, use LiteLLM's POST /key/generate (max_budget / budget_duration).

ClawRouter: officially hosted, credentials never leave home ​

ClawRouter is OpenClaw's officially hosted multi-upstream router: each upstream provider's credentials and forwarding stay on the ClawRouter side, and your OpenClaw machine doesn't need any upstream provider plugins installed. The plugin is built in and enabled by default; all you need is an admin-issued Key (shown once at issuance, store it safely).

bash
export CLAWROUTER_API_KEY="..."
openclaw onboard --auth-choice clawrouter-api-key
openclaw plugins enable clawrouter
openclaw models list --all --provider clawrouter

(clawrouter is enabled by default anyway; you only need to add it to the allow list first if plugins.allow is set in the configuration.)

Model references keep the upstream namespace, in three-part form: clawrouter/openai/gpt-5.5, clawrouter/anthropic/claude-sonnet-4-6, clawrouter/google/gemini-3.5-flash—use them exactly as returned by the catalog, openclaw models set clawrouter/<provider>/<model>. The catalog is discovered via /v1/catalog based on the Key's permission scope (cached for 1 hour), and quota usage goes through /v1/usage.

Step 5: Verify the relay chain ​

Why: Configuration being written to disk doesn't mean the chain works. Check the catalog, credentials, and an end-to-end conversation one layer each—whichever layer breaks, you'll know where to fix it. This step applies to both official plugins and custom relay endpoints.

bash
# 1. 看目录:新接入的 provider 和模型有没有进来
openclaw models list

# 2. 看凭据:默认模型、fallback,以及各 provider 的凭据来源
openclaw models status

# 3. 发一条测试消息,确认端到端连通
openclaw agent --agent <agent-id> --model <provider/model> --message "用一句话介绍你自己"

The 3rd command runs a full agent turn from the terminal (forwarded via the Gateway). Note that openclaw agent must include at least one session selector: --agent, --to, --session-key, or --session-id, with --agent <id> being the most common; --model accepts a provider/model reference, effective only for that turn, without changing the session default.

You should see:

  • models list: The provider and model you just connected appear in the catalog — for a custom endpoint, the model ID saved during onboarding is shown (auto-discovery stores every model returned by /models)
  • models status: The default model points to the model you chose, and the custom provider's credential source displays correctly; there is no "Unavailable auth profiles" text (if there were, the entry would include the reason and a recovery action — just follow it). To verify the endpoint address: openclaw config get models.providers.<id>.baseUrl
  • agent: The model replies with a message and the command exits with code 0 — errors, timeouts, and cancellations all exit with 1. The relay chain works end to end

Once the test passes, set the model you like as your daily default:

bash
openclaw models set <provider/model>
  • The test message gets a reply and openclaw agent exits with code 0 — the relay chain works end to end

Checkpoint ✅ ​

  • Install only what you use: openclaw models list --provider stepfun (or xiaomi / longcat) can list the model catalog
  • Remember the negative results: Spark, Baichuan, 01.AI Yi, and SenseTime SenseChat have no official provider — go directly through the custom-api-key custom endpoint or an aggregator route, and don't waste time looking for plugins
  • Custom endpoint connected: openclaw models status shows the provider's credential source, and openclaw config get models.providers.<id>.baseUrl reveals the endpoint address
  • openclaw agent test message gets a reply and exits with code 0 — the OpenClaw relay chain works end to end
  • If you hit compatibility issues, you know where to look: the compat switch table in step 3 (reasoning_effort returns 400, intranet endpoints rejected, vendor-private fields passed through)

Pitfall warnings ​

❌ baseUrl missing /v1, all requests 404 ​

The baseUrl of an OpenAI-compatible endpoint generally needs to go up to .../v1: model discovery requests <baseUrl>/models (the official documentation gives /v1/models as an example), and chat requests are likewise appended to the baseUrl (e.g. /v1/chat/completions). All baseUrls in the official examples end with /v1. When you get a relay station's address, first check the ending; if unsure, copy its documented "Base URL" verbatim.

❌ Model auto-discovery fails, or the default model isn't the one you want ​

When --custom-model-id is omitted, onboarding requests <baseUrl>/models for auto-discovery (5-second timeout), saves all discovered models and uses the first as the default. It fails if the endpoint is unavailable, returns invalid data, or the list is empty — rerun and explicitly specify --custom-model-id. The first discovered model not suitable? No need to reconfigure; just openclaw models set <provider/model> to switch the default.

❌ A StepFun China Key configured with the international endpoint (or vice versa) ​

StepFun Keys are region-specific: China Keys use the .com endpoint and international Keys use the .ai endpoint, and the official documentation explicitly says not to mix them. The endpoint is decided when auth-choice picks stepfun-standard-api-key-cn or -intl — if authentication fails, first check whether you picked the wrong region.

❌ Anthropic-compatible endpoint missing --custom-model-id ​

The --custom-compatibility anthropic setup must include --custom-model-id — Anthropic-compatible endpoints have no model auto-discovery step, and omitting it fails outright.

❌ auth: "none" doesn't take effect ​

Two hard rules: ① automatic no-auth detection only covers loopback and RFC1918 addresses — endpoints on a tailnet / VPN must explicitly declare auth: "none" (in onboarding that's --custom-no-auth, which cannot be combined with --custom-api-key); ② auth: "none" only works for the openai-completions adapter — Responses, Azure OpenAI, and Anthropic-compatible endpoints need a placeholder Key even without auth.

❌ After the Gateway runs as a daemon, Keys from export "don't take effect" ​

When the Gateway runs as a launchd / systemd service, it cannot see the environment variables you set with export in your terminal. Write the Key into ~/.openclaw/.env, or provide it to that process via env.shellEnv in the configuration (the warning box in Method A of step 3 covered this; it's a common pitfall, so here's one more reminder).

❌ The relay station doesn't recognize reasoning_effort, and turning on thinking yields 400 ​

When thinking is enabled for a custom model with reasoning: true, the reasoning_effort field is sent by default, which some relay stations don't recognize. Set compat.supportsReasoningEffort: false for that model. For other compatibility issues (developer role rejected, private fields passed through, intranet endpoints rejected), see the compat switch table in step 3.

❌ Relay station balance insufficient / billing misconfigured ​

Even with the chain fully configured, you can still fail on billing: an insufficient relay station balance or a bound model not activated will make requests fail. To use OpenClaw's built-in liveness check: openclaw models status --probe sends real requests to the configured credentials (may consume tokens, trigger rate limits), and billing-type failures are grouped into the billing status bucket; note that it requires exclusive use of the state directory — first openclaw gateway stop to stop the Gateway before running it. For daily troubleshooting, checking the balance and model activation status in the relay station's dashboard is more direct.

Next steps ​

The domestic-models page ends here: you've completed all three paths — official plugins (DeepSeek, Qwen, GLM, Kimi, MiniMax, Doubao, Hunyuan, Qianfan, StepFun, MiMo, LongCat), custom endpoints, and aggregator routes. OpenClaw's universal solution for relays — remember one sentence: if there's an official plugin, install it; if there's no official provider, use custom-api-key; if you want one Key for multiple vendors, use an aggregator route. Next:

Related tutorials ​

gaodong.aiAboutPrivacyContact

Independent tutorials, not affiliated with any product mentioned. Product names and trademarks belong to their owners. Check official pages for prices and policies.