mirror of
https://github.com/lobehub/lobehub.git
synced 2026-09-20 04:56:13 +08:00
191f3fe776
* 📝 docs: fix outdated content across the docs site Audited docs/ against the current codebase and fixed stale content that drifted after major refactors (Clerk/NextAuth → Better Auth, src/server → apps/server, src/{config,envs,locales} → packages/*, model-bank updates). - self-hosting/auth: mark removed NextAuth/Clerk pages with deprecation warnings; fix microsoft/zitadel alias claims and the Logto callback path - environment-variables & advanced: correct wrong defaults (S3_SET_ACL, AI_IMAGE_DEFAULT_IMAGE_NUM, index/proxy URLs), drop non-existent env vars and fictional feature flags, fix OIDC config guidance - development: update refactored paths, Better Auth, .mjs configs, remove the MSW section (msw is not a dependency) - providers & model examples: replace retired model ids with in-bank ones; fix comfyui frontmatter corruption - usage: rename Moderator→Orchestrator, GTD→Task, correct shortcut keys, channel capability tables, Feishu/Lark WebSocket mode - platform/migration: fix dead links, docker service name, npx/npm → bun EN and zh-CN pairs updated together. * 📝 docs: fix Logto callback path and AUTH_SECRET deprecation guidance - Revert Logto/Sealos callback URLs to /api/auth/callback/logto to match the runtime SSO redirectURI override - Narrow legacy auth Callout: AUTH_SECRET remains required for Better Auth; mark NEXT_AUTH_SECRET as deprecated in zh-CN * 📝 docs: refresh agent skills for locales, env, auth, and agentRun paths Align OSS agent guidance with post-refactor layout: - packages/locales/src/default + bun run i18n - packages/env/src for env schemas (@/envs alias) - spa-auth shell + src/routes/auth segments - chat agentRun/transports/hetero instead of aiChat * 📝 docs: document APP_URL as required for Better Auth base URL Self-hosted auth uses appEnv.APP_URL as baseURL, not request-header auto-detection. NEXT_PUBLIC_AUTH_URL remains deprecated. * 📝 docs: note self-host search provider setup for web search Built-in lobe-web-browsing needs no client plugin, but self-hosted servers still require SEARCH_PROVIDERS / SEARXNG_URL (default SearXNG). * 📝 docs: point feature guide welcome UI at AgentHome Opening message/questions on the agent chat page live in src/features/AgentHome, not Onboarding WelcomeMessage.
137 lines
3.8 KiB
Plaintext
137 lines
3.8 KiB
Plaintext
---
|
|
title: ModelScope Provider Configuration
|
|
description: Learn how to configure and use the ModelScope provider in LobeHub
|
|
tags:
|
|
- ModelScope
|
|
---
|
|
|
|
# ModelScope Provider Configuration
|
|
|
|
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.
|
|
|
|
## Prerequisites
|
|
|
|
Before using the ModelScope API, you need to:
|
|
|
|
1. **Create a ModelScope Account**
|
|
|
|
- Visit [ModelScope](https://www.modelscope.cn/)
|
|
- Sign up for an account
|
|
|
|
2. **Link Your Alibaba Cloud Account**
|
|
|
|
- **Important**: Accessing the ModelScope API requires linking your Alibaba Cloud account
|
|
- Go to your [ModelScope Access Token Page](https://www.modelscope.cn/my/myaccesstoken)
|
|
- Follow the instructions to link your Alibaba Cloud account
|
|
- This step is mandatory for API access
|
|
|
|
3. **Obtain an API Token**
|
|
- After linking your Alibaba Cloud account, generate an API token
|
|
- Copy the token for use in LobeHub
|
|
|
|
## Configuration
|
|
|
|
### Environment Variables
|
|
|
|
Add the following environment variables to your `.env` file:
|
|
|
|
```bash
|
|
# 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.2,Qwen/Qwen3-235B-A22B
|
|
|
|
# Optional: Proxy URL (if needed)
|
|
MODELSCOPE_PROXY_URL=https://your-proxy-url
|
|
```
|
|
|
|
### Docker Configuration
|
|
|
|
If you're using Docker, add the ModelScope environment variables to your `docker-compose.yml`:
|
|
|
|
```yaml
|
|
environment:
|
|
- ENABLED_MODELSCOPE=1
|
|
- MODELSCOPE_API_KEY=your_modelscope_api_token
|
|
- MODELSCOPE_MODEL_LIST=deepseek-ai/DeepSeek-V3.2,Qwen/Qwen3-235B-A22B
|
|
```
|
|
|
|
## Available Models
|
|
|
|
ModelScope provides access to a variety of models, including:
|
|
|
|
- **DeepSeek Models**: DeepSeek-V3.2, DeepSeek-V3.1 series
|
|
- **Qwen Models**: Qwen3 series (including Qwen3-Next)
|
|
- **Other Models**: Various open-source models
|
|
|
|
## Troubleshooting
|
|
|
|
### Common Issues
|
|
|
|
1. **"Please link your Alibaba Cloud account first" error**
|
|
|
|
- This means your Alibaba Cloud account is not yet linked to ModelScope
|
|
- Visit the [ModelScope Access Token Page](https://www.modelscope.cn/my/myaccesstoken)
|
|
- Complete the account linking process
|
|
|
|
2. **401 Unauthorized Error**
|
|
|
|
- Check if your API token is correct
|
|
- Ensure the token has not expired
|
|
- Verify that your Alibaba Cloud account is properly linked
|
|
|
|
3. **Model Unavailable**
|
|
- Some models may require additional permissions
|
|
- Check the model's page on ModelScope for access requirements
|
|
|
|
### Debug Mode
|
|
|
|
Enable debug mode to view detailed logs:
|
|
|
|
```bash
|
|
DEBUG_MODELSCOPE_CHAT_COMPLETION=1
|
|
```
|
|
|
|
## Notes
|
|
|
|
- The ModelScope API is compatible with the OpenAI API format
|
|
- This service is primarily designed for users in China
|
|
- Some models may have usage restrictions or require additional verification
|
|
- API responses for certain models may default to Chinese
|
|
|
|
## Support
|
|
|
|
For ModelScope-specific issues:
|
|
|
|
- Visit the [ModelScope Documentation](https://www.modelscope.cn/docs)
|
|
- Check out the [ModelScope Community](https://www.modelscope.cn/community)
|
|
|
|
For LobeHub integration issues:
|
|
|
|
- Browse our [GitHub Issues](https://github.com/lobehub/lobehub/issues)
|
|
- Join our community discussions
|
|
|
|
## Model ID Format
|
|
|
|
ModelScope uses a namespace-prefixed format for model IDs, for example:
|
|
|
|
```
|
|
deepseek-ai/DeepSeek-V3.2
|
|
deepseek-ai/DeepSeek-V3.1
|
|
Qwen/Qwen3-235B-A22B
|
|
Qwen/Qwen3-32B
|
|
```
|
|
|
|
When configuring the model list, be sure to use the full model ID format.
|
|
|
|
## API Limitations
|
|
|
|
- The ModelScope API is subject to rate limits
|
|
- Some models may require special permissions
|
|
- It's recommended to monitor API usage in production environments
|
|
- Certain advanced models may require a paid subscription to access
|