Overview of Xiaomi Large Model and Z.AI
With the thriving development of China's AI industry, an increasing number of technology companies have launched their own large language models. Xiaomi and Z.AI are two notable providers worth paying attention to.
Xiaomi Large Model: An AI model developed by Xiaomi Group based on its own technological expertise and rich user scenarios, with unique advantages in vertical domains such as smart home control and consumer electronics assistants. Xiaomi's large model deeply integrates data and contextual understanding from the Xiaomi ecosystem.
Z.AI: A platform focused on providing high-quality AI inference services, offering multiple model choices. It has built a solid reputation in the developer community for its stable service quality and reasonable pricing.
OpenClaw supports both of these providers. This article covers how to configure each one.
Xiaomi Large Model Configuration
Obtaining an API Key
- Visit the Xiaomi AI Open Platform and register a developer account.
- Create an application in the console and obtain an API key.
- Save your credentials securely.
Configuration via Onboard
openclaw onboard
Select Xiaomi as the model provider and follow the prompts to complete the configuration.
Manual Configuration
Configure the Xiaomi large model in openclaw.json:
{
"agents": {
"defaults": {
"model": {
"primary": "xiaomi/mi-llm-pro"
}
}
}
}
Authentication configuration:
{
"providers": {
"xiaomi": {
"auth": [
{
"key": "your-xiaomi-ai-api-key"
}
]
}
}
}
Multi-account rotation:
{
"providers": {
"xiaomi": {
"auth": [
{ "key": "key-A", "profile": "primary-account" },
{ "key": "key-B", "profile": "backup-account" }
]
}
}
}
Xiaomi Model Strengths
The Xiaomi large model's advantages are primarily reflected in:
- IoT Scenario Understanding: Excellent comprehension of smart home control commands, with the ability to accurately parse user intent for device control.
- Consumer Scenario Optimization: Strong performance in consumer scenarios such as product recommendations and customer service.
- Chinese Colloquial Understanding: Strong ability to understand colloquial Chinese expressions.
Z.AI Configuration
Obtaining an API Key
- Visit the Z.AI official platform and register an account.
- Generate an API key in the developer console.
- Choose an appropriate plan based on your needs.
Manual Configuration
Configure Z.AI in openclaw.json:
{
"agents": {
"defaults": {
"model": {
"primary": "zai/zai-large"
}
}
}
}
Authentication configuration:
{
"providers": {
"zai": {
"auth": [
{
"key": "your-zai-api-key"
}
]
}
}
}
Multi-account configuration is also supported:
{
"providers": {
"zai": {
"auth": [
{ "key": "key-A", "profile": "primary" },
{ "key": "key-B", "profile": "backup" }
]
}
}
}
Z.AI Model Selection
Available models on the Z.AI platform include:
- zai/zai-large: Large-scale model with strong overall capabilities, suitable for complex tasks.
- zai/zai-standard: Standard version with excellent cost-effectiveness.
Multi-Account Authentication and Cooldown Tracking
Whether using Xiaomi or Z.AI, OpenClaw's multi-account authentication mechanism fully applies. When you configure multiple keys in the auth array:
- The system uses the first profile by default to send requests.
- When that profile encounters rate limiting or service errors, it automatically switches to the next one.
- The failed profile enters a cooldown state, with the cooldown tracking system recording the failure time and type.
- The profile automatically becomes available again once the cooldown period expires.
This mechanism ensures that even if a single API key encounters issues, the service will not be interrupted.
Failover Configuration
It is recommended to configure cross-provider failover for both Xiaomi and Z.AI:
Xiaomi Failover
{
"agents": {
"defaults": {
"model": {
"primary": "xiaomi/mi-llm-pro",
"fallback": "qwen/qwen-plus"
}
}
}
}
Z.AI Failover
{
"agents": {
"defaults": {
"model": {
"primary": "zai/zai-large",
"fallback": "glm/glm-4"
}
}
}
}
Using Chinese-optimized domestic models as fallbacks for each other ensures a consistent user experience.
Using Xiaomi and Z.AI Simultaneously
You can also use these two providers in different channels:
{
"agents": {
"channels": {
"smart-home-support": {
"model": {
"primary": "xiaomi/mi-llm-pro"
}
},
"general-chat": {
"model": {
"primary": "zai/zai-large"
}
}
}
}
}
Use the Xiaomi model for smart home-related inquiries, while using Z.AI for general conversation scenarios.
The Value of Domestic Model Ecosystem
Choosing domestic model providers offers several important advantages:
- Low Latency: Servers are typically deployed domestically, resulting in lower access latency for domestic users.
- Chinese Optimization: Domestic models generally undergo extensive optimization for Chinese language understanding and generation.
- Data Compliance: Data storage and processing occur entirely within China, meeting data localization compliance requirements.
- Price Advantage: Compared to overseas providers, domestic models typically offer more competitive pricing.
OpenClaw's unified provider-agnostic architecture allows you to freely switch between domestic and overseas models to find the combination that best suits your needs.
Verification and Testing
After completing the configuration, send test messages to verify that both the Xiaomi large model and Z.AI respond correctly. Check the OpenClaw logs to confirm that requests are being routed to the correct providers. If you need to compare the performance of different models, you can use OpenClaw's per-channel configuration feature to test them simultaneously across different channels.