-
Notifications
You must be signed in to change notification settings - Fork 1.7k
LLM Configuration
This tutorial will detail how to configure various large language models in AionUi, including Gemini, OpenAI, ModelScope, OpenRouter and other platforms, as well as advanced features like multi-API key rotation.
AionUi supports multiple LLM platforms, each with different configuration methods:
| Platform | Authentication | Multi-Key Support | Special Features |
|---|---|---|---|
| Gemini | API Key / Google Login | โ | Image generation, tool calling |
| OpenAI | API Key | โ | Function calling, image generation |
| ModelScope | API Key | โ | Chinese optimization |
| OpenRouter | API Key | โ | Multi-model aggregation |
| Custom Platform | API Key | โ | OpenAI-compatible interface |
- No API Key Required: Direct Google account login
- Auto Update: Token automatically refreshes, no manual maintenance
- Secure & Reliable: Uses OAuth 2.0 standard authentication
- Complete Features: Supports all Gemini functionality
-
Enter Gemini Settings
- Click the "Settings" icon in the left sidebar
- Select "Gemini Settings"
-
Google Login
- Click the "Google Login" button
- Complete Google account login in the popup browser window
- Authorize AionUi to access your Google account

-
Verify Login Status
- After successful login, the interface will display your Google account information
- You can click "Logout" button to switch accounts

If you encounter problems with Google login, try the following solutions:
- VPN Setup: It's recommended to set VPN to US region
- Proxy Configuration: Fill in proxy address in Gemini settings
- Network Check: Ensure stable network connection and normal access to Google services
- Register Project: Need to create Google Cloud Project, see detailed tutorial below
If you encounter Project ID issues, follow these steps to create a Google Cloud Project:
- Open your browser and visit Google Cloud Console
- Sign in with your Google account
- At the top of the page, click the project selector (dropdown menu showing current project name)
- Click "New Project" button
- Fill in project information:
- Project Name: Enter a descriptive name (e.g., "AionUi-Gemini-Project")
- Organization: Select your organization (if any)
- Location: Choose project location
- Click "Create" button
- After project creation, you can see the newly created project in the project selector
- Click the project name to enter the project details page
- In the project information card, find "Project ID" (format like:
my-project-123456) - Copy this Project ID
- Return to AionUi's Gemini settings page
- Paste the copied Project ID in the Project ID input box
- Click save configuration
To ensure complete functionality, it's recommended to enable the following APIs:
- In Google Cloud Console, click "APIs & Services" > "Library" in the left menu
- Search and enable:
- Generative Language API
- AI Platform API
- Vertex AI API
Reference Documentation: Gemini CLI Authentication Documentation

-
Get Gemini API Key
- Visit Google AI Studio
- Login with Google account
- Create new API Key in "API Keys" page
-
Configure in AionUi
- Click the "Settings" icon in the left sidebar
- Select "Model Settings"
- Click "Add Model" button
- Select platform: Gemini
- Enter API Key
- System will automatically fetch available model list
-
Get API Key
- Visit the corresponding platform's API Key management page
- Login to account and create new API Key
- Copy API Key for later use
-
Configure in AionUi
- Select platform: Custom Platform
- Enter corresponding Base URL
- Enter API Key
- Select models to use
Common Platform Base URLs:
-
OpenAI:
https://api.openai.com/v1 -
Anthropic:
https://api.anthropic.com/v1 -
xAI:
https://api.x.ai/v1 -
DeepSeek:
https://api.deepseek.com -
Moonshot:
https://api.moonshot.cn/v1 -
Zhipu:
https://open.bigmodel.cn/api/paas/v4
-
Get ModelScope API Key
- Visit ModelScope
- Login with Alibaba Cloud account
- Create access token
-
Configure in AionUi
- Select platform: ModelScope
- Base URL:
https://api-inference.modelscope.cn/v1 - Enter ModelScope API Key
- Select models (like qwen-turbo, qwen-plus, etc.)
-
Get OpenRouter API Key
- Visit OpenRouter
- Register OpenRouter account
- Create API Key
-
Configure in AionUi
- Select platform: OpenRouter
- Base URL:
https://openrouter.ai/api/v1 - Enter OpenRouter API Key
- Select models (supports various open-source and commercial models)
AionUi supports automatic multi-API key rotation to improve service reliability and availability:
- Automatic Rotation: Automatically switch to next key when current key encounters errors
- Smart Blacklist: Failed keys are temporarily blacklisted for 90 seconds
- Error Recovery: Blacklisted keys automatically recover after expiration
- Load Balancing: Randomly select starting key to distribute request pressure
-
Enter Multiple Keys in API Key Field
sk-xxx1,sk-xxx2,sk-xxx3Or use line breaks:
sk-xxx1 sk-xxx2 sk-xxx3 -
Supported Platforms
- โ Gemini: Supports multi-key rotation
- โ OpenAI: Supports multi-key rotation
- โ ModelScope: Not currently supported
- โ OpenRouter: Not currently supported

-
Error Detection
- Detect errors like 401 (authentication failed), 429 (rate limit), 503 (service unavailable)
- Automatically add current key to blacklist
-
Automatic Switching
- Randomly select next key from available key list
- Update environment variables, reinitialize client
-
Blacklist Management
- Failed keys are blacklisted for 90 seconds
- Blacklisted keys automatically recover after expiration
- Avoid performance issues from frequent switching
A: Check methods:
- Can see configured platforms and models in model list
- Can select configured models in conversation interface
- Can receive normal replies when sending messages
A: Check points:
- Ensure key format is correct (comma or line break separated)
- Check if platform supports multi-key (currently only Gemini and OpenAI support)
- Check console logs to understand rotation status
A: Possible reasons:
- API key invalid or expired
- Base URL configuration error
- Network connection issues
- Platform service temporarily unavailable
A: Switching methods:
- Select different models when starting a new conversation
- Model switching during current conversation is not currently supported
- System will remember your selection preferences
A: Check configuration:
- Ensure model supports
function_callingcapability - Re-save configuration and restart application
- Quick Start: Quick Start Guide
- Image Generation Configuration: Image Generation Setup
- Multi-Agent Mode Configuration: Multi-Agent Mode Setup
- Common Questions: FAQ
Need Help?
- ๐ Report Issues
- ๐ฌ Community Discussions
- ๐ Complete Documentation
After configuration, you can enjoy multi-platform, multi-model AI experience!
Welcome to the comprehensive AionUi documentation! Find everything you need to configure, use, and master AionUi.
- โ๏ธ LLM Configuration
- ๐ค Multi-Agent Mode Setup
- ๐จ Image Generation Setup
- ๐ MCP Configuration
- ๐ป WebUI Configuration(by Commond Line)
- ๐ AionUi Remote Internet Access Tutorial
- ๐ค DingTalk Bot Setup
- โฐ Scheduled Tasks Guide
- ๐ ๏ธ AI Assistants & Skills Ecosystem
- ๐ Preview Panel Guide
- ๐ File Management
- ๐ Excel Smart Processing
- ๐ Smart Information Gathering
- ๐ Local Knowledge Base Application
- โ AI Learning Assistant
- โ๏ธ Writing & Content Creation
- ๐ Getting Started
- โ๏ธ LLM Configuration
- ๐ค Multi-Agent Mode Setup
- ๐จ Image Generation
- ๐ MCP Configuration
- ๐ WebUI Configuration
- โฐ Scheduled Tasks
- ๐ ๏ธ AI Assistants & Skills
- ๐ Preview Panel
- โ FAQ