3.0 KiB
3.0 KiB
LiteLLM Model Registration Mapping Architecture and Plan
This document records the large model routing and unified mapping architecture of openclaw -> litellm (AI Gateway) -> register_mainstream_models.sh.
Architecture Principles
- Multi-endpoint Native Simulation and Unified Routing: To be compatible with OpenClaw's native route hijacking feature for different providers, we have deprecated the monolithic
litellmnode in the OpenClaw configuration, and instead directly simulate the three native providers:deepseek,nvidia,ollama. - Underlying Convergence: All API Endpoints and Auth Tokens of these three providers point entirely to the local LiteLLM gateway (
http://127.0.0.1:4000/v1) and the unifiedAI_WORKSPACE_AUTH_TOKEN. LiteLLM acts as the true gateway, converging various heterogeneous platforms into a unified OpenAI standard format. - Prefix Routing and Precision Striking: In
register_mainstream_models.sh, we forcefully add the correspondingprovider/prefix (e.g.nvidia/glm-5.2) to the models of each platform. This naming perfectly bypasses OpenClaw's built-inNo API key foundProvider parsing limitation, allowing requests to seamlessly penetrate and reach the gateway.
Channel Registration Matrix
To account for resource allocation of different proxy pools/distribution channels, the current architecture designs a full-matrix registration channel. As long as the corresponding environment variable Key is configured, the installation script will immediately register the corresponding node to LiteLLM.
1. DEEPSEEK_API_KEY (DeepSeek Official Channel)
Mainly proxies basic models provided by the official:
deepseek/deepseek-v4-flashdeepseek/deepseek-v4-prodeepseek/deepseek-chatdeepseek/deepseek-reasoner
2. NVIDIA_API_KEY (NVIDIA NIM / Proxy Channel)
As a high-speed concurrent or third-party proxy aggregation interface:
nvidia/deepseek-v4-flashnvidia/deepseek-v4-pronvidia/glm-5.2nvidia/minimax-m3nvidia/qwen3.5nvidia/kimi-k2.7-code
3. OLLAMA_API_KEY (OLLAMA Cloud / Proxy Channel)
As another alternate distribution channel:
ollama/deepseek-v4-flashollama/deepseek-v4-proollama/glm-5.2ollama/minimax-m3ollama/qwen3.5ollama/kimi-k2.7-code
Updates and Workflow
- Set Authentication: Use commands like
export DEEPSEEK_API_KEY="sk-xxx"to set target environment variables. - One-click Deployment: Run
curl -sfL https://install.svc.plus/ai-workspace | bash -to deploy the entire AI Workspace. - Registration Channels: The
register_mainstream_models.shscript is triggered during installation, opening up LiteLLM's routing table based on the keys you configured (non-empty). - Direct Frontend Experience: After OpenClaw restarts, it will automatically pull the latest category form, and users can directly click on
glm-5.2ordeepseek-v4-flashunder the category (like NVIDIA) in the UI interface for high-concurrency inference.