docs/usage/providers/modelscope.mdx
ModelScope is an open-source AI model community by Alibaba, offering access to a wide range of AI models. This guide will walk you through setting up the ModelScope provider in LobeHub.
Before using the ModelScope API, you need to:
Create a ModelScope Account
Link Your Alibaba Cloud Account
Obtain an API Token
Add the following environment variables to your .env file:
# Enable ModelScope provider
ENABLED_MODELSCOPE=1
# ModelScope API key (required)
MODELSCOPE_API_KEY=your_modelscope_api_token
# Optional: Custom model list (comma-separated)
MODELSCOPE_MODEL_LIST=deepseek-ai/DeepSeek-V3-0324,Qwen/Qwen3-235B-A22B
# Optional: Proxy URL (if needed)
MODELSCOPE_PROXY_URL=https://your-proxy-url
If you're using Docker, add the ModelScope environment variables to your docker-compose.yml:
environment:
- ENABLED_MODELSCOPE=1
- MODELSCOPE_API_KEY=your_modelscope_api_token
- MODELSCOPE_MODEL_LIST=deepseek-ai/DeepSeek-V3-0324,Qwen/Qwen3-235B-A22B
ModelScope provides access to a variety of models, including:
"Please link your Alibaba Cloud account first" error
401 Unauthorized Error
Model Unavailable
Enable debug mode to view detailed logs:
DEBUG_MODELSCOPE_CHAT_COMPLETION=1
For ModelScope-specific issues:
For LobeHub integration issues:
ModelScope uses a namespace-prefixed format for model IDs, for example:
deepseek-ai/DeepSeek-V3-0324
deepseek-ai/DeepSeek-R1-0528
Qwen/Qwen3-235B-A22B
Qwen/Qwen3-32B
When configuring the model list, be sure to use the full model ID format.