Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/docs/en/guide/console/playground.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ title: Playground

Here you can quickly engage in AI chat, facilitating testing and use.

![Playground](/assets/guide/playground.png)
![Playground](/assets/guide/feature-guide/playground.png)
64 changes: 64 additions & 0 deletions content/docs/en/guide/feature-guide/admin/channel.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: Channel Management
description: Channels are the core configuration unit for connecting AI providers
---

import { Callout } from 'fumadocs-ui/components/callout';

Channels are the core configuration unit for connecting AI providers — each channel corresponds to one provider's API key. Log in with an admin account, then click "Channels" in the left sidebar or visit `/console/channel` directly.

The channel list shows all configured AI provider channels with their name, type, status (green = active / red = disabled), response time, and used quota.

## Add a Channel

1. Click the "Add Channel" button in the top-right of the channel list page — a configuration dialog appears
2. Select the provider type (e.g. OpenAI, Claude, Gemini)
3. Enter the channel name and API key

4. Check the models this channel supports in the model list, or click "Fill Default Models" to auto-populate
5. Expand the advanced config section as needed and fill in optional fields:

| Option | Description |
| --- | --- |
| Base URL | Custom endpoint URL for proxies or self-hosted deployments |
| Priority | Higher value = higher selection priority, default 0 |
| Weight | Random weight among same-priority channels, default 0 |
| Model Mapping | Map user-requested model names to actual model names (JSON) |
| Parameter Override | Force-override certain request parameters (JSON) |
| Auto Disable | When enabled, automatically disables the channel after consecutive failures |

6. Click "Submit" — the new channel appears in the list

## Test a Channel

1. Find the target channel in the list and click the "Test" button in the action column on the right
2. Wait for the test request to complete — a dialog shows the response time and success/failure status

Lower response time means faster performance. You can also click "Test All Channels" at the top of the list for one-click batch testing.

## Batch Operations

1. Check the checkboxes on the left side of multiple channel rows
2. A batch operation toolbar appears at the top of the page

3. Click the corresponding button to perform the batch operation:
- **Batch Enable**: Set selected channels to active
- **Batch Disable**: Set selected channels to disabled
- **Batch Tag**: Assign a tag to selected channels for categorized management

## Multi-Key Mode

Multi-Key mode lets a single channel use multiple API keys with automatic polling. A failed key is skipped automatically and re-enabled when it recovers.

1. Click the "Edit" button on the right side of the target channel row
2. Find the "Multi-Key Management" section in the edit dialog

3. Click "Add Key" to enter multiple API keys one by one
4. Select a polling mode:

| Polling Mode | Description |
| --- | --- |
| Round Robin | Use each key in sequence |
| Weighted Random | Select keys randomly by weight |

5. Click "Save" to complete the configuration
16 changes: 16 additions & 0 deletions content/docs/en/guide/feature-guide/admin/custom-oauth.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Custom OAuth Providers
description: Add any OIDC-compliant custom login method
---

In addition to built-in OAuth providers, Root can add any OIDC-compliant custom login method. Log in with a Root account, go to System Settings (`/console/setting`), and find the "Custom OAuth" section.

## Add a Custom OAuth Provider

1. Click "Add Provider" — a configuration dialog appears

2. Enter the OIDC provider's Discovery URL (usually ending in `/.well-known/openid-configuration`) in the "Discovery URL" field, then click "Auto Discover" — the system auto-fills the Authorization Endpoint, Token Endpoint, and other config

3. Enter the Client ID and Client Secret (obtained from the OAuth provider's app management page)
4. Enter a display name (the button text users see on the login page)
5. Click "Save" — the new login option appears on the user login page
31 changes: 31 additions & 0 deletions content/docs/en/guide/feature-guide/admin/docs-config.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: Docs & About Page Configuration
description: Configure the documentation link and About page content in the left sidebar
---

import { Callout } from 'fumadocs-ui/components/callout';

The "Docs" button and "About" page in the left sidebar can both be customized by Root in System Settings. Log in with a Root account and visit `/console/setting`.

## Configure the Documentation Link

1. Click the "Operation Settings" tab in System Settings
2. Find the "Documentation URL" input field

3. Enter the full URL of your documentation site (e.g. `https://docs.example.com`)
4. Click "Save"
5. Return to the homepage — a "Docs" button appears in the left sidebar, linking to the URL you entered

<Callout type="info">
When the Documentation URL is empty, the "Docs" button will not appear in the left sidebar.
</Callout>

## Configure the About Page

1. Click the "Other Settings" tab in System Settings
2. Find the About content editor area

3. Enter Markdown-formatted content in the text box (supports headings, links, images, lists, etc.)
4. Click "Save"
5. Users who click "About" in the left sidebar will see the configured content

20 changes: 20 additions & 0 deletions content/docs/en/guide/feature-guide/admin/group.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Group Management
description: Groups isolate channel access permissions and billing multipliers for different users
---

import { Callout } from 'fumadocs-ui/components/callout';

Groups isolate channel access permissions and billing multipliers for different users — users in different groups can only access channels assigned to their group. Log in with an admin account and find the "Groups" entry in System Settings or the admin panel.

The group list shows all configured group names. Both users and tokens can be assigned to a specific group, and channels can be restricted to specific groups.

## How Groups Are Used

- **User group**: Assign a group to a user when editing them in User Management
- **Token group**: Specify the channel group a token uses when creating a token
- **Channel group**: Enter the allowed group name(s) in the "Group" field when adding a channel

<Callout type="info">
When a token's group is set to `auto`, the system automatically selects an available group in priority order — useful for cross-group failover scenarios.
</Callout>
30 changes: 30 additions & 0 deletions content/docs/en/guide/feature-guide/admin/log.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Logs & Statistics
description: View platform-wide API call records and consumption statistics
---

View platform-wide API call records and consumption statistics with multi-dimensional analysis by user, model, and channel. Log in with an admin account, then click "Logs" in the left sidebar or visit `/console/log` directly.

The admin log list includes two extra columns not visible to regular users: "Username" and "Channel Name", showing call records for all users.

## Search & Filter

1. Click the "Filter" button at the top of the log page to expand the filter options
2. Set any of the following conditions:
- **Time range**: Select start and end dates
- **Username**: Enter a username keyword
- **Model**: Enter a model name keyword
- **Channel**: Select a specific channel
- **Token name**: Enter a token name
3. Click "Query" — the list refreshes to show filtered results

## Log Statistics Panel

View the summary statistics area at the top of the log page — it shows platform-wide call volume totals.

## Platform Consumption Trends

1. Click "Dashboard" in the left sidebar, or visit `/console` directly (admin view)

2. The admin dashboard shows a platform-wide consumption trend line chart and per-user consumption distribution
3. Hover over the chart to view detailed data for a specific date
17 changes: 17 additions & 0 deletions content/docs/en/guide/feature-guide/admin/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"title": "Admin Guide",
"defaultOpen": false,
"pages": [
"channel",
"user",
"redemption",
"log",
"subscription",
"model",
"group",
"system-setting",
"custom-oauth",
"performance",
"docs-config"
]
}
26 changes: 26 additions & 0 deletions content/docs/en/guide/feature-guide/admin/model.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Model Management
description: Manage metadata and pricing for all platform models
---

Manage metadata and pricing for all platform models, with support for syncing the latest model lists from upstream providers. Log in with an admin account, then click "Models" in the left sidebar or visit `/console/models` directly.

The model list shows all configured models with their name, type, input/output pricing, and provider.

## Add / Edit a Model

1. Click "Add Model", or click the "Edit" button on an existing model

2. Fill in the model name, input price, output price, and other fields
3. Click "Save" to complete the configuration

## Sync Upstream Models

The sync feature fetches the latest model list from each provider. Preview the changes before deciding whether to apply them.

1. Click the "Sync Upstream" button on the model management page
2. The system requests the upstream provider's model list and shows a preview dialog

3. The preview dialog lists models under "Added", "Changed", and "Deleted" categories
4. After confirming, click "Apply" — the model list updates

21 changes: 21 additions & 0 deletions content/docs/en/guide/feature-guide/admin/performance.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Performance Monitoring
description: View real-time server resource usage and perform system maintenance
---

View real-time server resource usage and perform system maintenance operations. Log in with a Root account, go to System Settings (`/console/setting`), and find the "Performance Monitoring" tab.

The performance monitoring page shows the server's current CPU usage, memory consumption, request volume, and other real-time metrics.

## Perform Maintenance Operations

Find the corresponding operation buttons on the performance monitoring page and click to execute immediately:

| Operation | Description | When to Use |
| --- | --- | --- |
| Clear Disk Cache | Free up disk cache space | When disk usage is too high |
| Reset Statistics | Zero out performance counters | When you need to restart tracking |
| Force GC | Manually trigger Go garbage collection to free memory | When memory usage is abnormally high |
| Clean Log Files | Delete old log files to free disk space | When log files have accumulated too much |

After clicking an operation button, the page shows the result and the metrics refresh.
20 changes: 20 additions & 0 deletions content/docs/en/guide/feature-guide/admin/redemption.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Redemption Code Management
description: Batch generate and manage quota redemption codes
---

Batch generate and manage quota redemption codes for giveaways or user top-ups. Log in with an admin account, then click "Redemption Codes" in the left sidebar or visit `/console/redemption` directly.

The list shows all generated codes with their value (partially masked), face value, usage status (unused / used), and creation time.

## Batch Generate Codes

1. Click the "Generate Codes" button on the redemption code list page — a generation dialog appears

2. Fill in the following parameters:
- **Name**: A batch label for easy identification
- **Face Value**: The quota amount each code is worth
- **Quantity**: Number of codes to generate in this batch
3. Click "Generate" — the system creates the codes and they appear in the list

4. Click the "Export" button in the list to export the codes to a file for bulk distribution
31 changes: 31 additions & 0 deletions content/docs/en/guide/feature-guide/admin/subscription.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: Subscription Plan Management
description: Create and manage subscription plans
---

Create and manage subscription plans, control which plans are visible to users, and manually activate subscriptions for users. Log in with an admin account and visit `/console/subscription` directly (the admin view differs from the user purchase view).

The plan list shows all created subscription plans with their name, price, duration, and status (published / unpublished).

## Create a Plan

1. Click the "Create Plan" button on the subscription management page — a creation dialog appears

2. Fill in the following:
- **Plan Name**: The name users see when purchasing
- **Price**: The plan's selling price
- **Duration Type**: Select daily / weekly / monthly / custom days
- **Included Quota**: The quota amount included in the plan
3. Click "Submit" — the plan is created and defaults to unpublished status

## Publish / Unpublish a Plan

1. Find the target plan in the list and click the "Publish" or "Unpublish" button on the right

2. Published plans are visible and purchasable by users; unpublished plans are hidden from users but existing subscriptions are not affected

## Manually Activate a Subscription for a User

1. Click the "Manual Bind" button on the subscription management page
2. Enter the target user's username or email, then select the plan to activate
3. Click "Confirm" — the system creates a subscription record for that user, effective immediately
50 changes: 50 additions & 0 deletions content/docs/en/guide/feature-guide/admin/system-setting.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: System Settings
description: Root-only global configuration center
---

import { Callout } from 'fumadocs-ui/components/callout';

Root-only global configuration center covering site information, billing rules, payment config, and all other system-level parameters. Log in with a Root account, then click "Settings" in the left sidebar or visit `/console/setting` directly.

The system settings page has multiple tabs at the top — click a tab to switch to that configuration area.

## General Settings

1. Click the "General Settings" tab

2. You can configure:
- **Site Name**: The name shown in the browser tab and page header
- **Homepage Announcement**: Announcement text shown on the homepage, supports Markdown
- **Documentation URL**: When filled in, a "Docs" button appears in the left sidebar linking to this URL
- **Top-up Link**: Custom redirect URL for the top-up page
3. Click "Save" when done

<Callout type="info">
When the Documentation URL is empty, the "Docs" button will not appear in the left sidebar.
</Callout>

## Billing & Multiplier Settings

1. Click the "Billing Settings" or "Multiplier Settings" tab

2. Find the target model in the multiplier list and modify its input/output multiplier values
3. In the group multiplier section, set differentiated billing multipliers for different groups
4. Click "Save" when done

## Registration & Security Settings

1. Click the "Security Settings" or "Registration Settings" tab

2. You can configure:
- **Open Registration**: Toggle to allow or prevent new users from self-registering
- **Email Allowlist**: Restrict registration to specific email domains
- **Turnstile Verification**: Enter Cloudflare Turnstile Site Key and Secret Key to enable CAPTCHA
3. Click "Save" when done

## OAuth Configuration

1. Click the "OAuth Settings" tab

2. Enter the Client ID and Client Secret for each third-party login platform you want to enable
3. Click "Save" — the corresponding login buttons appear on the user login page
26 changes: 26 additions & 0 deletions content/docs/en/guide/feature-guide/admin/user.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: User Management
description: View and manage all registered users on the platform
---

View and manage all registered users, including modifying roles, quotas, groups, and account status. Log in with an admin account, then click "Users" in the left sidebar or visit `/console/user` directly.

The user list shows all registered users with their username, email, role, group, quota balance, and status.

## Edit a User

1. Find the target user in the list and click the "Edit" button on the right — an edit dialog appears

2. You can modify the following:
- **Role**: Regular User / Admin — takes effect immediately
- **Group**: Assign the user to a channel group
- **Quota Balance**: Set the user's quota value directly
- **Status**: Enable or disable the account — disabled users cannot log in
3. Click "Save" when done

## Search Users

1. Find the search box at the top of the user list
2. Enter a username or email keyword

3. The list filters in real time to show matching user records
Loading