Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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)
76 changes: 76 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,76 @@
---
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.

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Channel list page</div>

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Add channel dialog (basic info)</div>

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:

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Add channel dialog (advanced config)</div>

| 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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Channel test result dialog</div>

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Batch operation toolbar after selecting multiple channels</div>

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Multi-Key mode configuration section</div>

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
22 changes: 22 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,22 @@
---
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.

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Custom OAuth provider list</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Custom OAuth guide still contains placeholder screenshots.

Line 8, Line 14, and Line 18 should use real screenshots rather than placeholders, otherwise this setup flow is harder to follow and validate.

Also applies to: 14-14, 18-18

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/docs/en/guide/feature-guide/admin/custom-oauth.mdx` at line 8,
Replace the placeholder divs that read "📷 Screenshot placeholder: Custom OAuth
provider list" (the styled <div> used as screenshot placeholders in the MDX)
with actual screenshot image elements: add the real screenshot files to the docs
assets, insert them using the project's MDX/Image component or a plain <img
src="..." alt="Custom OAuth provider — step X"> with appropriate alt text and
captions, and ensure the three occurrences (the placeholder at the div with
inline styles and the other two similar placeholder divs) are all updated to
point to the committed image files so the setup flow shows real screenshots.


## Add a Custom OAuth Provider

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Add custom OAuth dialog</div>

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Config fields auto-filled after discovery</div>

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
38 changes: 38 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,38 @@
---
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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Operation Settings tab — Documentation URL input field</div>

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Homepage left sidebar showing the "Docs" button</div>

<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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Other Settings tab — About content editor</div>

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: About page display result</div>
22 changes: 22 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,22 @@
---
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.

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Group list</div>

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>
38 changes: 38 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,38 @@
---
title: Logs & Statistics
description: View platform-wide API call records and consumption statistics
---
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

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.

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Platform-wide log list</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Replace screenshot placeholders with real images.

These sections still use placeholder boxes instead of screenshots, which makes the admin workflow guide incomplete for end users.

Also applies to: 23-23, 29-29, 35-35

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/docs/en/guide/feature-guide/admin/log.mdx` at line 8, Replace the
placeholder screenshot boxes with real images: locate the JSX/HTML snippet that
renders the dashed placeholder div (the element containing "📷 Screenshot
placeholder: Platform-wide log list" with inline style and dashed border) and
swap it for an <img> element (or the project's responsive image component)
pointing to the actual screenshot asset, ensure alt text describes the image
(e.g., "Platform-wide log list"), and apply consistent styling; repeat the same
replacement for the other placeholder occurrences mentioned (the placeholders at
the other three divs on the page).


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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Log filter options expanded</div>

## Log Statistics Panel

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Log statistics panel (total calls, total quota consumed, etc.)</div>

## Platform Consumption Trends

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Platform-wide consumption trend chart</div>

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"
]
}
33 changes: 33 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,33 @@
---
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.

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Model list page</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Replace screenshot placeholders with actual images before release.

Line 8, Line 16, Line 28, and Line 33 still use placeholder blocks. For an admin operation guide, these should be real screenshots to keep the workflow verifiable and consistent with the PR’s documentation goals.

Also applies to: 16-16, 28-28, 33-33

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/docs/en/guide/feature-guide/admin/model.mdx` at line 8, Replace each
screenshot placeholder div (e.g., the element containing "📷 Screenshot
placeholder: Model list page" with inline styles) with real screenshots using
the project's MDX/image component or standard Markdown image syntax; insert
appropriately named image files, provide descriptive alt text (e.g., "Model list
page - admin"), set sensible display size or responsive attributes, and ensure
images are stored in the repo's docs/assets/ or images directory so the MDX
renders correctly—apply this change for the other placeholder divs with the same
pattern in the file.


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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Add/edit model dialog</div>

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Sync upstream models preview dialog</div>

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Model list after sync</div>
25 changes: 25 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,25 @@
---
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.

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Performance monitoring tab</div>

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:

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Maintenance operation buttons area</div>

| 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.
26 changes: 26 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,26 @@
---
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.

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Redemption code list page</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Use final screenshots instead of placeholder blocks.

Line 8, Line 16, and Line 24 are still placeholders. Please replace them with actual UI captures so the batch generation/export workflow is fully documented.

Also applies to: 16-16, 24-24

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/docs/en/guide/feature-guide/admin/redemption.mdx` at line 8, Replace
the placeholder divs that read "📷 Screenshot placeholder: Redemption code list
page" (and the other two placeholder blocks in this document) with the final UI
screenshots: add properly named image files to the docs assets, import or
reference them in the MDX using an <img> (or the project's Image component) with
descriptive alt text (e.g., "Redemption code list - batch export"), appropriate
responsive sizing and lazy loading, and include a short caption explaining what
the screenshot shows; remove the dashed placeholder div(s) entirely and ensure
filenames and captions reflect the batch generation/export workflow so the
screenshots replace the placeholder div elements.


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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Generate redemption codes dialog</div>

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Redemption code list after generation</div>

4. Click the "Export" button in the list to export the codes to a file for bulk distribution
37 changes: 37 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,37 @@
---
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).

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Subscription plan management list</div>

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Create subscription plan dialog</div>

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

<div style={{background:'#f3f4f6',borderRadius:'8px',padding:'48px 24px',textAlign:'center',color:'#9ca3af',marginBottom:'16px',border:'1px dashed #d1d5db'}}>📷 Screenshot placeholder: Plan publish/unpublish action</div>

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
Loading