🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
📝 docs: fix outdated content across the docs site (#16964)
YuTengjing191f3fe776c1
diff --git a/.agents/skills/add-setting-env/SKILL.md b/.agents/skills/add-setting-env/SKILL.mdindex fd17575d800..511d7e26797 100644--- a/.agents/skills/add-setting-env/SKILL.md+++ b/.agents/skills/add-setting-env/SKILL.md@@ -15,10 +15,10 @@ Add server-side environment variables to configure default values for user setti### 1. Define Environment Variable-Create `src/envs/<domain>.ts`:+Create `packages/env/src/<domain>.ts` (import path stays `@/envs/<domain>` — tsconfig maps to `packages/env/src/*` first):```typescript-import { createEnv } from '@t3-oss/env-nextjs';+import { createEnv } from '@t3-oss/env-core';import { z } from 'zod';export const get<Domain>Config = () => {@@ -88,10 +88,10 @@ const serverSettings: PartialDeep<UserSettings> = {- `docs/self-hosting/environment-variables/basic.mdx` (EN)- `docs/self-hosting/environment-variables/basic.zh-CN.mdx` (CN)-## Example: AI_IMAGE_DEFAULT_IMAGE_NUM+## Example: AI\_IMAGE\_DEFAULT\_IMAGE\_NUM```typescript-// src/envs/image.ts+// packages/env/src/image.ts (import as @/envs/image)AI_IMAGE_DEFAULT_IMAGE_NUM: z.coerce.number().min(1).max(20).optional(),// packages/types/src/serverConfig.tsdiff --git a/.agents/skills/builtin-tool/SKILL.md b/.agents/skills/builtin-tool/SKILL.mdindex 8eb8b39a1a5..8978f0409bc 100644--- a/.agents/skills/builtin-tool/SKILL.md+++ b/.agents/skills/builtin-tool/SKILL.md@@ -50,7 +50,7 @@ A builtin tool is a package the agent runtime can call. It ships **five faces**:- `src/client/executor/` — `BaseExecutor` subclass that calls `ExecutionRuntime` (or stores/services directly when frontend-only).5. **UI defaults to "do nothing".** Inspector is required (the header strip). Render/Placeholder/Streaming/Intervention/Portal are added **only when there's something specific to show** — empty registries are fine.6. **Style with `createStaticStyles + cssVar.*`** (zero-runtime). Fall back to `createStyles + token` only when you genuinely need runtime values. Use `@lobehub/ui` components, not raw antd.-7. **i18n keys live in `src/locales/default/plugin.ts`.** Inspector titles must come from `t('builtins.<identifier>.apiName.<api>')` so something renders while args stream.+7. **i18n keys live in `packages/locales/src/default/plugin.ts`.** Inspector titles must come from `t('builtins.<identifier>.apiName.<api>')` so something renders while args stream.---@@ -110,7 +110,7 @@ Before opening the PR:- [ ] Streaming added for APIs that emit incremental output (run command, write file, code execution).- [ ] Intervention added if `humanIntervention` is set in the manifest.- [ ] All registry files updated (see [architecture.md → Registry wiring](references/architecture.md#registry-wiring)).-- [ ] i18n keys in `src/locales/default/plugin.ts` plus dev seeds in `en-US`/`zh-CN`.+- [ ] i18n keys in `packages/locales/src/default/plugin.ts` plus dev seeds in `en-US`/`zh-CN`.- [ ] `bunx vitest run --silent='passed-only' 'packages/builtin-tool-<name>'` passes.- [ ] `bun run type-check` passes.diff --git a/.agents/skills/builtin-tool/references/architecture.md b/.agents/skills/builtin-tool/references/architecture.mdindex 68fdb04e18b..118f7d98e23 100644--- a/.agents/skills/builtin-tool/references/architecture.md+++ b/.agents/skills/builtin-tool/references/architecture.md@@ -223,7 +223,7 @@ The runtime hands every executor method an optional `BuiltinToolContext` as the## i18n Integration-Source of truth: `src/locales/default/plugin.ts`. Keys follow `builtins.<identifier>.<topic>.<…>`:+Source of truth: `packages/locales/src/default/plugin.ts`. Keys follow `builtins.<identifier>.<topic>.<…>`:| Key | Use || ------------------------------------- | ------------------------------------------------------------ |@@ -232,7 +232,7 @@ Source of truth: `src/locales/default/plugin.ts`. Keys follow `builtins.<identif| `builtins.<identifier>.inspector.<…>` | Extra Inspector strings ("no results", chips, counters) || `builtins.<identifier>.<feature>.<…>` | Render / Intervention strings, free-form per tool |-For dev preview, also seed `locales/zh-CN/plugin.json` and `locales/en-US/plugin.json`. Run `pnpm i18n` before opening a PR — it's slow, so do it once at the end. (See the **i18n** skill for the full workflow.)+For dev preview, also seed `locales/zh-CN/plugin.json` and `locales/en-US/plugin.json`. Run `bun run i18n` before opening a PR — it's slow, so do it once at the end. (See the **i18n** skill for the full workflow.)---diff --git a/.agents/skills/builtin-tool/references/ui/diagnostics.md b/.agents/skills/builtin-tool/references/ui/diagnostics.mdindex 2e13f1d42ac..9a1171a202f 100644--- a/.agents/skills/builtin-tool/references/ui/diagnostics.md+++ b/.agents/skills/builtin-tool/references/ui/diagnostics.md@@ -11,5 +11,5 @@| Approval dialog never appears | Manifest missing `humanIntervention`, or Intervention not in registry || Approval click doesn't wait for inline edit | Missing `registerBeforeApprove(id, flushFn)` || Portal opens but blank | Switch in `Portal/index.tsx` doesn't cover the apiName |-| Strings show as `builtins.lobe-foo.apiName.bar` | Missing i18n key in `src/locales/default/plugin.ts` (or not seeded in dev locale files) |+| Strings show as `builtins.lobe-foo.apiName.bar` | Missing i18n key in `packages/locales/src/default/plugin.ts` (or not seeded in dev locale files) || Wrong color shade on `<Text type="secondary">` | `type='secondary'` is lighter than `colorTextSecondary` — pass via `style={{ color: cssVar.colorTextSecondary }}` |diff --git a/.agents/skills/deep-review/references/dimensions/code-style.md b/.agents/skills/deep-review/references/dimensions/code-style.mdindex 53cb857c98f..5300bb9e48c 100644--- a/.agents/skills/deep-review/references/dimensions/code-style.md+++ b/.agents/skills/deep-review/references/dimensions/code-style.md@@ -12,7 +12,7 @@ Fragment-level readability and convention adherence. Look at each changed hunk i- Leftover `console.log` / `console.debug` — use the `debug` package or remove- Missing `return await` inside try/catch (the rejection escapes the catch) — <https://typescript-eslint.io/rules/return-await/>-- Hardcoded user-facing strings — must go through i18n keys (`src/locales/default/<namespace>.ts`, named `{feature}.{context}.{action|status}`)+- Hardcoded user-facing strings — must go through i18n keys (`packages/locales/src/default/<namespace>.ts`, named `{feature}.{context}.{action|status}`)- `antd` imports where `@lobehub/ui` (or `@lobehub/ui/base-ui`) wraps the same component — base-ui first, then `@lobehub/ui`, antd last- Hardcoded colors / raw CSS values — use `antd-style` tokens; prefer `createStaticStyles` + `cssVar.*` over `createStyles` + `token` unless styles need runtime computation- Dead code, commented-out blocks, unused exports introduced by this diffdiff --git a/.agents/skills/deep-review/references/dimensions/compatibility.md b/.agents/skills/deep-review/references/dimensions/compatibility.mdindex 734ee9fb11b..b780371e7a2 100644--- a/.agents/skills/deep-review/references/dimensions/compatibility.md+++ b/.agents/skills/deep-review/references/dimensions/compatibility.md@@ -31,7 +31,7 @@ The same change must work across every surface this product ships to. Authors (a- Serverless-hostile code: local file writes, in-memory state expected to survive requests, long-running work beyond function limits- Workspace-blind logic: new data reads/writes, permission checks, or list scoping that silently assume the personal context — must respect the active workspace scope (`useActiveWorkspaceId` / `workspaceSlug`) or be explicitly personal-only by design- Cloud-only assumption: logic that only works when a business slot has its cloud override — must still function against the slot's open-source no-op default (feature hidden or gracefully degraded, not broken)-- Renamed backend route paths (`src/app/(backend)/webapi/...`) or SSR page paths (`src/app/[variants]/(auth)/...`), or changed `@lobechat/business-*` exports — downstream deployments override/extend these paths; flag so they can adapt+- Renamed backend route paths (`src/app/(backend)/webapi/...`) or auth surfaces (`src/app/spa-auth/...`, `src/routes/auth/...`), or changed `@lobechat/business-*` exports — downstream deployments override/extend these paths; flag so they can adapt- Dependency major bumps (`next`, `drizzle-orm`, ...) — downstream lockstep required; call out in the PR description## Rule sources (deep mode: read before reviewing)diff --git a/.agents/skills/heterogeneous-agent/SKILL.md b/.agents/skills/heterogeneous-agent/SKILL.mdindex cd3f0792613..c0da2a02a54 100644--- a/.agents/skills/heterogeneous-agent/SKILL.md+++ b/.agents/skills/heterogeneous-agent/SKILL.md@@ -33,8 +33,8 @@ Use this skill when the bug or feature lives in the external CLI agent pipeline,- `apps/desktop/src/main/modules/heterogeneousAgent/drivers/codex.ts`- `packages/heterogeneous-agents/src/adapters/claudeCode.ts`- `packages/heterogeneous-agents/src/adapters/codex.ts`-- `src/store/chat/slices/aiChat/actions/heterogeneousAgentExecutor.ts`-- `src/store/chat/slices/aiChat/actions/__tests__/heterogeneousAgentExecutor.test.ts`+- `src/store/chat/slices/agentRun/actions/transports/hetero/heterogeneousAgentExecutor.ts`+- `src/store/chat/slices/agentRun/actions/__tests__/heterogeneousAgentExecutor.test.ts`## Default Debug Orderdiff --git a/.agents/skills/heterogeneous-agent/references/debug-workflow.md b/.agents/skills/heterogeneous-agent/references/debug-workflow.mdindex b39a818b321..6b7b047482f 100644--- a/.agents/skills/heterogeneous-agent/references/debug-workflow.md+++ b/.agents/skills/heterogeneous-agent/references/debug-workflow.md@@ -220,7 +220,7 @@ The executor only cuts a new assistant message when it receives a step-boundaryRelevant files:- `packages/heterogeneous-agents/src/adapters/codex.ts`-- `src/store/chat/slices/aiChat/actions/heterogeneousAgentExecutor.ts`+- `src/store/chat/slices/agentRun/actions/transports/hetero/heterogeneousAgentExecutor.ts`## 5. Check Tool Persistence Invariants@@ -263,14 +263,14 @@ Run the smallest useful test set first.```bashbunx vitest run --silent='passed-only' 'packages/heterogeneous-agents/src/adapters/codex.test.ts'bunx vitest run --silent='passed-only' 'packages/heterogeneous-agents/src/adapters/claudeCode.test.ts'-bunx vitest run --silent='passed-only' 'src/store/chat/slices/aiChat/actions/__tests__/heterogeneousAgentExecutor.test.ts'+bunx vitest run --silent='passed-only' 'src/store/chat/slices/agentRun/actions/__tests__/heterogeneousAgentExecutor.test.ts'```Especially useful places:- `packages/heterogeneous-agents/src/adapters/codex.test.ts`- `packages/heterogeneous-agents/src/adapters/claudeCode.test.ts`-- `src/store/chat/slices/aiChat/actions/__tests__/heterogeneousAgentExecutor.test.ts`+- `src/store/chat/slices/agentRun/actions/__tests__/heterogeneousAgentExecutor.test.ts`Claude Code-specific assertions worth adding when fixing bugs:diff --git a/.agents/skills/hotkey/SKILL.md b/.agents/skills/hotkey/SKILL.mdindex f056e83f407..0a7f862e837 100644--- a/.agents/skills/hotkey/SKILL.md+++ b/.agents/skills/hotkey/SKILL.md@@ -38,7 +38,7 @@ export const HOTKEYS_REGISTRATION: HotkeyRegistration = [### 3. Add i18n Translation-In `src/locales/default/hotkey.ts`:+In `packages/locales/src/default/hotkey.ts`:```typescriptconst hotkey: HotkeyI18nTranslations = {@@ -86,6 +86,6 @@ const clearChatHotkey = useUserStore(settingsSelectors.getHotkeyById(HotkeyEnum.## Troubleshooting- **Not working**: Check scope and RegisterHotkeys hook-- **Not in settings**: Verify HOTKEYS_REGISTRATION config+- **Not in settings**: Verify HOTKEYS\_REGISTRATION config- **Conflict**: HotkeyInput component shows warnings- **Page-specific**: Ensure correct scope activationdiff --git a/.agents/skills/i18n/SKILL.md b/.agents/skills/i18n/SKILL.mdindex b331133b7bd..a1d2ce8c9cd 100644--- a/.agents/skills/i18n/SKILL.md+++ b/.agents/skills/i18n/SKILL.md@@ -1,6 +1,6 @@---name: i18n-description: 'LobeHub i18n with react-i18next. Use for user-facing strings, locale keys, namespaces, useTranslation, t(), interpolation, zh-CN/en-US previews, hardcoded UI copy, or pnpm i18n.'+description: 'LobeHub i18n with react-i18next. Use for user-facing strings, locale keys, namespaces, useTranslation, t(), interpolation, zh-CN/en-US previews, hardcoded UI copy, or bun run i18n.'user-invocable: false---@@ -8,8 +8,8 @@ user-invocable: false- Default language: English (en-US)- Framework: react-i18next-- **Only edit files in `src/locales/default/`** - Never edit JSON files in `locales/`-- Run `pnpm i18n` to generate translations (or manually translate zh-CN/en-US for dev preview)+- **Only edit files in `packages/locales/src/default/`** - Never edit JSON files in `locales/` (except hand-written en-US/zh-CN previews)+- Run `bun run i18n` to generate translations (or manually translate zh-CN/en-US for dev preview)## Key Naming Convention@@ -51,10 +51,10 @@ export default {## Workflow-1. Add keys to `src/locales/default/{namespace}.ts`-2. Export new namespace in `src/locales/default/index.ts`+1. Add keys to `packages/locales/src/default/{namespace}.ts`+2. Export new namespace in `packages/locales/src/default/index.ts`3. For dev preview: manually translate `locales/zh-CN/{namespace}.json` and `locales/en-US/{namespace}.json`-4. Remind the user to run `pnpm i18n` before creating PR — do NOT run it yourself (very slow)+4. Remind the user to run `bun run i18n` before creating PR — do NOT run it yourself (very slow)## Usagediff --git a/.agents/skills/project-overview/SKILL.md b/.agents/skills/project-overview/SKILL.mdindex 091669f978a..52bcafb033c 100644--- a/.agents/skills/project-overview/SKILL.md+++ b/.agents/skills/project-overview/SKILL.md@@ -70,6 +70,9 @@ git submodules.│ ├── database/ # src/{models,schemas,repositories}│ ├── model-bank/ # Model definitions & provider cards│ ├── model-runtime/ # src/{core,providers}+│ ├── locales/ # i18n source of truth: packages/locales/src/default/+│ ├── env/ # env schemas (@/envs/* → packages/env/src/*)+│ ├── app-config/│ ├── business/ # Open-source stubs (config, const, model-bank, model-runtime) — overridden by cloud│ ├── types/│ └── utils/@@ -77,9 +80,9 @@ git submodules.├── app/│ ├── (backend)/ # api, f, market, middleware, oidc, trpc, webapi│ ├── spa/ # SPA HTML template service- │ └── [variants]/(auth)/ # Auth pages (SSR required)+ │ └── spa-auth/ # Auth HTML shell (SSR)├── routes/ # SPA page segments (thin — delegate to features/)- │ └── (main)/ (mobile)/ (desktop)/ (popup)/ onboarding/ share/+ │ └── (main)/ (mobile)/ (desktop)/ (popup)/ auth/ onboarding/ share/├── spa/ # SPA entries + router config│ ├── entry.{web,mobile,desktop,popup}.tsx│ └── router/@@ -87,7 +90,7 @@ git submodules.├── features/ # Domain business components├── store/ # ~30 zustand stores — `ls` for the full set├── server/ # standalone-Hono server pieces only: agent-hono, workflows-hono (main backend lives in `apps/server`)- └── ... # components, hooks, layout, libs, locales, services, types, utils+ └── ... # components, hooks, layout, libs, services, types, utils```## Architecture Mapdiff --git a/.agents/skills/react/SKILL.md b/.agents/skills/react/SKILL.mdindex 9d0632f2921..cf8e80bb9f6 100644--- a/.agents/skills/react/SKILL.md+++ b/.agents/skills/react/SKILL.md@@ -100,7 +100,8 @@ Files with a `.desktop.ts(x)` variant must be edited **in sync**. Drift causes b| Route Type | Use Case | Implementation || ------------------ | ---------- | -------------------------------------------------- |-| Next.js App Router | Auth pages | `src/app/[variants]/(auth)/` |+| Next.js App Router | Auth shell | `src/app/spa-auth/` (HTML shell; see spa-routes) |+| React Router DOM | Auth pages | `src/routes/auth/` (signin, signup, oauth, …) || React Router DOM | Main SPA | `desktopRouter.config.tsx` + `.desktop.tsx` (pair) |Router utilities:diff --git a/.agents/skills/zustand/references/slice-organization.md b/.agents/skills/zustand/references/slice-organization.mdindex 09912084a8b..d43bf765c4d 100644--- a/.agents/skills/zustand/references/slice-organization.md+++ b/.agents/skills/zustand/references/slice-organization.md@@ -90,12 +90,13 @@ export const topicSelectors = {## Complex Actions Sub-directory```plaintext-src/store/chat/slices/aiChat/+src/store/chat/slices/agentRun/├── actions/-│ ├── generateAIChat.ts-│ ├── rag.ts-│ ├── memory.ts-│ └── index.ts+│ ├── entries/ # conversation lifecycle / command bus+│ ├── dispatch/ # agent dispatchers+│ ├── transports/ # gateway / client / hetero executors+│ ├── lifecycle/+│ └── state/├── initialState.ts└── selectors.ts```diff --git a/AGENTS.md b/AGENTS.mdindex 1a3d9550beb..11c70d6287e 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -23,28 +23,24 @@ lobehub/├── packages/ # Shared packages (@lobechat/*)│ ├── database/ # Database schemas, models, repositories│ ├── agent-runtime/ # Agent runtime+│ ├── locales/ # i18n source: packages/locales/src/default/+│ ├── env/ # env schemas (@/envs/* → packages/env/src/*)│ └── ...├── src/-│ ├── app/ # Next.js App Router (backend API + auth)-│ │ ├── (backend)/ # API routes (trpc, webapi, etc.)+│ ├── app/ # Next.js App Router (backend API + auth shell)+│ │ ├── (backend)/ # API routes (trpc, webapi, etc.)│ │ ├── spa/ # SPA HTML template service-│ │ └── [variants]/(auth)/ # Auth pages (SSR required)-│ ├── routes/ # SPA page components (Vite)-│ │ ├── (main)/ # Desktop pages-│ │ ├── (mobile)/ # Mobile pages-│ │ ├── (desktop)/ # Desktop-specific pages-│ │ ├── (popup)/ # Popup window pages-│ │ ├── onboarding/ # Onboarding pages-│ │ └── share/ # Share pages+│ │ └── spa-auth/ # Auth HTML shell (SSR)+│ ├── routes/ # SPA page segments (thin — delegate to features/)+│ │ ├── (main)/ (mobile)/ (desktop)/ (popup)/+│ │ ├── auth/ # Auth page segments (signin, signup, …)+│ │ ├── onboarding/ share/│ ├── spa/ # SPA entry points and router config-│ │ ├── entry.web.tsx # Web entry-│ │ ├── entry.mobile.tsx-│ │ ├── entry.desktop.tsx-│ │ ├── entry.popup.tsx+│ │ ├── entry.{web,mobile,desktop,popup}.tsx│ │ └── router/ # React Router configuration│ ├── store/ # Zustand stores│ ├── services/ # Client services-│ ├── server/ # Server services and routers+│ ├── server/ # standalone-Hono pieces only (main backend: apps/server)│ └── ...└── e2e/ # E2E tests (Cucumber + Playwright)```@@ -118,8 +114,8 @@ bun run check [changed-files...]### i18n-- Add keys to a namespace file under `src/locales/default/` (e.g. `agent.ts`, `auth.ts`)-- Hand-write en-US + zh-CN for dev preview: author the English source in `src/locales/default/*.ts`, mirror it to `locales/en-US/`, and hand-translate `locales/zh-CN/`.+- Add keys to a namespace file under `packages/locales/src/default/` (e.g. `agent.ts`, `auth.ts`)+- Hand-write en-US + zh-CN for dev preview: author the English source in `packages/locales/src/default/*.ts`, mirror it to `locales/en-US/`, and hand-translate `locales/zh-CN/`.- Before opening the PR, run `bun run i18n` (slow) to fill the remaining locales with the script — don't hand-translate those.### Code Stylediff --git a/docs/development/basic/add-new-authentication-providers.mdx b/docs/development/basic/add-new-authentication-providers.mdxindex e308484056d..3d2b1166bc7 100644--- a/docs/development/basic/add-new-authentication-providers.mdx+++ b/docs/development/basic/add-new-authentication-providers.mdx@@ -1,34 +1,34 @@---title: New Authentication Provider Guide-description: Learn how to implement a new authentication provider using Auth.js in LobeHub.+description: Learn how to implement a new authentication provider using Better Auth in LobeHub.tags:- Authentication- - Auth.js+ - Better Auth- LobeHub- - Okta- OAuth+ - OIDC---# New Authentication Provider Guide-LobeHub uses [Auth.js v5](https://authjs.dev/) as the external authentication service. Auth.js is an open-source authentication library that provides a simple way to implement authentication and authorization features. This document will introduce how to use Auth.js to implement a new authentication provider.+LobeHub uses [Better Auth](https://www.better-auth.com/) as the external authentication service. Better Auth is an open-source authentication library that provides a simple way to implement authentication and authorization features. This document will introduce how to use Better Auth to implement a new authentication provider.## Architecture Overview-To add a new authentication provider in LobeHub (for example, adding Okta), you need to follow the steps below:+To add a new authentication provider in LobeHub (for example, adding GitLab), you need to follow the steps below:| Type | Description | Examples || --------- | ------------------------------------------- | -------------------------------- || `builtin` | Providers natively supported by Better Auth | Google, GitHub, Microsoft, Apple |-| `generic` | Implemented via Generic OIDC/OAuth plugin | Okta, Auth0, Keycloak, etc. |+| `generic` | Implemented via Generic OIDC/OAuth plugin | Auth0, Keycloak, Okta, etc. |## Adding a New SSO Provider-Using **Okta** as an example, here's how to add a `generic` type provider.+Using **GitLab** as an example (not yet implemented in the codebase), here's how to add a `generic` type provider.### Step 1: Create Provider Definition File-Create `okta.ts` in `src/libs/better-auth/sso/providers/`:+Create `gitlab.ts` in `src/libs/better-auth/sso/providers/`:```tsimport { authEnv } from '@/envs/auth';@@ -37,16 +37,16 @@ import { buildOidcConfig } from '../helpers';import type { GenericProviderDefinition } from '../types';const provider: GenericProviderDefinition<{- AUTH_OKTA_ID: string;- AUTH_OKTA_ISSUER: string;- AUTH_OKTA_SECRET: string;+ AUTH_GITLAB_ID: string;+ AUTH_GITLAB_ISSUER: string;+ AUTH_GITLAB_SECRET: string;}> = {// Build OIDC configurationbuild: (env) =>buildOidcConfig({- clientId: env.AUTH_OKTA_ID,- clientSecret: env.AUTH_OKTA_SECRET,- issuer: env.AUTH_OKTA_ISSUER,+ clientId: env.AUTH_GITLAB_ID,+ clientSecret: env.AUTH_GITLAB_SECRET,+ issuer: env.AUTH_GITLAB_ISSUER,overrides: {// Optional: customize user profile mappingmapProfileToUser: (profile) => ({@@ -54,22 +54,22 @@ const provider: GenericProviderDefinition<{name: profile.name ?? profile.preferred_username ?? profile.email ?? profile.sub,}),},- providerId: 'okta',+ providerId: 'gitlab',}),// Environment variable validationcheckEnvs: () => {- return !!(authEnv.AUTH_OKTA_ID && authEnv.AUTH_OKTA_SECRET && authEnv.AUTH_OKTA_ISSUER)+ return !!(authEnv.AUTH_GITLAB_ID && authEnv.AUTH_GITLAB_SECRET && authEnv.AUTH_GITLAB_ISSUER)? {- AUTH_OKTA_ID: authEnv.AUTH_OKTA_ID,- AUTH_OKTA_ISSUER: authEnv.AUTH_OKTA_ISSUER,- AUTH_OKTA_SECRET: authEnv.AUTH_OKTA_SECRET,+ AUTH_GITLAB_ID: authEnv.AUTH_GITLAB_ID,+ AUTH_GITLAB_ISSUER: authEnv.AUTH_GITLAB_ISSUER,+ AUTH_GITLAB_SECRET: authEnv.AUTH_GITLAB_SECRET,}: false;},// Provider ID (used in AUTH_SSO_PROVIDERS)- id: 'okta',+ id: 'gitlab',type: 'generic',};@@ -82,34 +82,34 @@ Import and register in `src/libs/better-auth/sso/index.ts`:```ts// Import provider-import Okta from './providers/okta';+import GitLab from './providers/gitlab';// Add to providerDefinitions arrayconst providerDefinitions = [// ... other providers- Okta,+ GitLab,] as const;```### Step 3: Add Environment Variable Types-Add type declarations in `src/envs/auth.ts`:+Add type declarations in `packages/env/src/auth.ts`:```ts// Add to ProcessEnv interface-AUTH_OKTA_ID?: string;-AUTH_OKTA_SECRET?: string;-AUTH_OKTA_ISSUER?: string;+AUTH_GITLAB_ID?: string;+AUTH_GITLAB_SECRET?: string;+AUTH_GITLAB_ISSUER?: string;// Add to getAuthConfig server schema-AUTH_OKTA_ID: z.string().optional(),-AUTH_OKTA_SECRET: z.string().optional(),-AUTH_OKTA_ISSUER: z.string().optional(),+AUTH_GITLAB_ID: z.string().optional(),+AUTH_GITLAB_SECRET: z.string().optional(),+AUTH_GITLAB_ISSUER: z.string().optional(),// Add to runtimeEnv-AUTH_OKTA_ID: process.env.AUTH_OKTA_ID,-AUTH_OKTA_SECRET: process.env.AUTH_OKTA_SECRET,-AUTH_OKTA_ISSUER: process.env.AUTH_OKTA_ISSUER,+AUTH_GITLAB_ID: process.env.AUTH_GITLAB_ID,+AUTH_GITLAB_SECRET: process.env.AUTH_GITLAB_SECRET,+AUTH_GITLAB_ISSUER: process.env.AUTH_GITLAB_ISSUER,```### Step 4: Update Documentation (Optional)@@ -177,10 +177,10 @@ When configuring OAuth applications, use these callback URL formats:After configuring environment variables, enable in `AUTH_SSO_PROVIDERS`:```bash-AUTH_SSO_PROVIDERS=google,github,okta-AUTH_OKTA_ID=your-client-id-AUTH_OKTA_SECRET=your-client-secret-AUTH_OKTA_ISSUER=https://your-domain.okta.com+AUTH_SSO_PROVIDERS=google,github,gitlab+AUTH_GITLAB_ID=your-client-id+AUTH_GITLAB_SECRET=your-client-secret+AUTH_GITLAB_ISSUER=https://gitlab.example.com```-Now, you can use Okta as your provider to implement the authentication feature in LobeHub.+Now, you can use GitLab as your provider to implement the authentication feature in LobeHub.diff --git a/docs/development/basic/add-new-authentication-providers.zh-CN.mdx b/docs/development/basic/add-new-authentication-providers.zh-CN.mdxindex 9afb60f9136..58609cd95ed 100644--- a/docs/development/basic/add-new-authentication-providers.zh-CN.mdx+++ b/docs/development/basic/add-new-authentication-providers.zh-CN.mdx@@ -1,35 +1,33 @@---title: 新身份验证方式开发指南-description: 学习如何在 LobeHub 中使用 Auth.js v5 添加新的身份验证提供者。+description: 学习如何在 LobeHub 中使用 Better Auth 添加新的身份验证提供者。tags:- 身份验证- - Auth.js- - Okta+ - Better Auth+ - OAuth- 开发指南---# 新身份验证方式开发指南-LobeHub 使用 [Auth.js v5](https://authjs.dev/) 作为外部身份验证服务。Auth.js 是一个开源的身份验证库,它提供了一种简单的方式来实现身份验证和授权功能。本文档将介绍如何使用 Auth.js 来实现新的身份验证方式。+LobeHub 使用 [Better Auth](https://www.better-auth.com) 作为外部身份验证服务。Better Auth 是一个开源的身份验证库,它提供了一种简单的方式来实现身份验证和授权功能。本文档将介绍如何添加新的 SSO 身份验证提供商。-LobeHub 使用 [Better Auth](https://www.better-auth.com) 作为身份验证服务。本文档介绍如何添加新的 SSO 身份验证提供商。--为了在 LobeHub 中添加新的身份验证提供者(例如添加 Okta),你需要完成以下步骤:+为了在 LobeHub 中添加新的身份验证提供者(例如添加 GitLab),你需要完成以下步骤:Better Auth SSO 提供商分为两类:| 类型 | 说明 | 示例 || --------- | -------------------------- | ----------------------------- || `builtin` | Better Auth 内置支持的提供商 | Google、GitHub、Microsoft、Apple |-| `generic` | 通过 Generic OIDC/OAuth 插件实现 | Okta、Auth0、Keycloak 等 |+| `generic` | 通过 Generic OIDC/OAuth 插件实现 | Auth0、Keycloak、Okta 等 |## 添加新的 SSO 提供商-以添加 **Okta** 为例,介绍添加 `generic` 类型提供商的完整步骤。+以添加 **GitLab**(代码库中尚未实现)为例,介绍添加 `generic` 类型提供商的完整步骤。### 步骤 1: 创建提供商定义文件-在 `src/libs/better-auth/sso/providers/` 目录下创建 `okta.ts`:+在 `src/libs/better-auth/sso/providers/` 目录下创建 `gitlab.ts`:```tsimport { authEnv } from '@/envs/auth';@@ -38,16 +36,16 @@ import { buildOidcConfig } from '../helpers';import type { GenericProviderDefinition } from '../types';const provider: GenericProviderDefinition<{- AUTH_OKTA_ID: string;- AUTH_OKTA_ISSUER: string;- AUTH_OKTA_SECRET: string;+ AUTH_GITLAB_ID: string;+ AUTH_GITLAB_ISSUER: string;+ AUTH_GITLAB_SECRET: string;}> = {// 构建 OIDC 配置build: (env) =>buildOidcConfig({- clientId: env.AUTH_OKTA_ID,- clientSecret: env.AUTH_OKTA_SECRET,- issuer: env.AUTH_OKTA_ISSUER,+ clientId: env.AUTH_GITLAB_ID,+ clientSecret: env.AUTH_GITLAB_SECRET,+ issuer: env.AUTH_GITLAB_ISSUER,overrides: {// 可选:自定义用户信息映射mapProfileToUser: (profile) => ({@@ -55,22 +53,22 @@ const provider: GenericProviderDefinition<{name: profile.name ?? profile.preferred_username ?? profile.email ?? profile.sub,}),},- providerId: 'okta',+ providerId: 'gitlab',}),// 环境变量检查checkEnvs: () => {- return !!(authEnv.AUTH_OKTA_ID && authEnv.AUTH_OKTA_SECRET && authEnv.AUTH_OKTA_ISSUER)+ return !!(authEnv.AUTH_GITLAB_ID && authEnv.AUTH_GITLAB_SECRET && authEnv.AUTH_GITLAB_ISSUER)? {- AUTH_OKTA_ID: authEnv.AUTH_OKTA_ID,- AUTH_OKTA_ISSUER: authEnv.AUTH_OKTA_ISSUER,- AUTH_OKTA_SECRET: authEnv.AUTH_OKTA_SECRET,+ AUTH_GITLAB_ID: authEnv.AUTH_GITLAB_ID,+ AUTH_GITLAB_ISSUER: authEnv.AUTH_GITLAB_ISSUER,+ AUTH_GITLAB_SECRET: authEnv.AUTH_GITLAB_SECRET,}: false;},// 提供商 ID(用于 AUTH_SSO_PROVIDERS 配置)- id: 'okta',+ id: 'gitlab',type: 'generic',};@@ -83,34 +81,34 @@ export default provider;```ts// 导入提供商-import Okta from './providers/okta';+import GitLab from './providers/gitlab';// 添加到 providerDefinitions 数组const providerDefinitions = [// ... 其他提供商- Okta,+ GitLab,] as const;```### 步骤 3: 添加环境变量类型声明-在 `src/envs/auth.ts` 中添加类型声明:+在 `packages/env/src/auth.ts` 中添加类型声明:```ts// ProcessEnv 接口中添加-AUTH_OKTA_ID?: string;-AUTH_OKTA_SECRET?: string;-AUTH_OKTA_ISSUER?: string;+AUTH_GITLAB_ID?: string;+AUTH_GITLAB_SECRET?: string;+AUTH_GITLAB_ISSUER?: string;// getAuthConfig server schema 中添加-AUTH_OKTA_ID: z.string().optional(),-AUTH_OKTA_SECRET: z.string().optional(),-AUTH_OKTA_ISSUER: z.string().optional(),+AUTH_GITLAB_ID: z.string().optional(),+AUTH_GITLAB_SECRET: z.string().optional(),+AUTH_GITLAB_ISSUER: z.string().optional(),// runtimeEnv 中添加-AUTH_OKTA_ID: process.env.AUTH_OKTA_ID,-AUTH_OKTA_SECRET: process.env.AUTH_OKTA_SECRET,-AUTH_OKTA_ISSUER: process.env.AUTH_OKTA_ISSUER,+AUTH_GITLAB_ID: process.env.AUTH_GITLAB_ID,+AUTH_GITLAB_SECRET: process.env.AUTH_GITLAB_SECRET,+AUTH_GITLAB_ISSUER: process.env.AUTH_GITLAB_ISSUER,```### 步骤 4: 更新文档(可选)@@ -178,10 +176,10 @@ export const BUILTIN_BETTER_AUTH_PROVIDERS = [配置环境变量后,在 `AUTH_SSO_PROVIDERS` 中启用:```bash-AUTH_SSO_PROVIDERS=google,github,okta-AUTH_OKTA_ID=your-client-id-AUTH_OKTA_SECRET=your-client-secret-AUTH_OKTA_ISSUER=https://your-domain.okta.com+AUTH_SSO_PROVIDERS=google,github,gitlab+AUTH_GITLAB_ID=your-client-id+AUTH_GITLAB_SECRET=your-client-secret+AUTH_GITLAB_ISSUER=https://gitlab.example.com```## 调试技巧@@ -199,5 +197,5 @@ AUTH_OKTA_ISSUER=https://your-domain.okta.com| `src/libs/better-auth/sso/types.ts` | 类型定义 || `src/libs/better-auth/sso/helpers.ts` | 辅助函数 || `src/libs/better-auth/constants.ts` | 内置提供商常量 |-| `src/envs/auth.ts` | 环境变量定义 |+| `packages/env/src/auth.ts` | 环境变量定义 || `src/libs/better-auth/define-config.ts` | Better Auth 配置 |diff --git a/docs/development/basic/add-new-bot-platform.mdx b/docs/development/basic/add-new-bot-platform.mdxindex 31fed3c3d7d..6589fa049b8 100644--- a/docs/development/basic/add-new-bot-platform.mdx+++ b/docs/development/basic/add-new-bot-platform.mdx@@ -13,12 +13,12 @@ tags:# Adding a New Bot Platform-This guide walks through the steps to add a new bot platform to LobeHub's channel system. The platform architecture is modular — each platform is a self-contained directory under `src/server/services/bot/platforms/`.+This guide walks through the steps to add a new bot platform to LobeHub's channel system. The platform architecture is modular — each platform is a self-contained directory under `apps/server/src/services/bot/platforms/`.## Architecture Overview```-src/server/services/bot/platforms/+apps/server/src/services/bot/platforms/├── types.ts # Core interfaces (FieldSchema, PlatformClient, ClientFactory, etc.)├── registry.ts # PlatformRegistry class├── index.ts # Singleton registry + platform registration@@ -86,7 +86,7 @@ Key points for developing a custom adapter:## Step 1: Create the Platform Directory```bash-mkdir src/server/services/bot/platforms/<platform-name>+mkdir apps/server/src/services/bot/platforms/<platform-name>```You will create four files:@@ -353,7 +353,7 @@ export const myPlatform: PlatformDefinition = {## Step 6: Register the Platform-Edit `src/server/services/bot/platforms/index.ts`:+Edit `apps/server/src/services/bot/platforms/index.ts`:```tsimport { myPlatform } from './<platform>/definition';@@ -367,7 +367,7 @@ platformRegistry.register(myPlatform);## Step 7: Add i18n Keys-### Default keys (`src/locales/default/agent.ts`)+### Default keys (`packages/locales/src/default/agent.ts`)Add platform-specific keys. Reuse generic keys where possible:@@ -417,13 +417,13 @@ The `BotMessageRouter` handles routing, on-demand bot loading, and Chat SDK inte## Checklist- [ ] Ensure a Chat SDK adapter exists (`@chat-adapter/*` on npm or custom `packages/chat-adapter-<platform>`)-- [ ] Create `src/server/services/bot/platforms/<platform>/`+- [ ] Create `apps/server/src/services/bot/platforms/<platform>/`- [ ] `schema.ts` — Field definitions for credentials and settings- [ ] `api.ts` — Outbound API client- [ ] `client.ts` — `ClientFactory` + `PlatformClient`- [ ] `definition.ts` — `PlatformDefinition` export-- [ ] Register in `src/server/services/bot/platforms/index.ts`-- [ ] Add i18n keys in `src/locales/default/agent.ts`+- [ ] Register in `apps/server/src/services/bot/platforms/index.ts`+- [ ] Add i18n keys in `packages/locales/src/default/agent.ts`- [ ] Add translations in `locales/zh-CN/agent.json` and `locales/en-US/agent.json`- [ ] Add setup docs in `docs/usage/channels/<platform>.mdx` (en + zh-CN)- [ ] Verify icon resolves in `const.ts` (or add alias)diff --git a/docs/development/basic/add-new-bot-platform.zh-CN.mdx b/docs/development/basic/add-new-bot-platform.zh-CN.mdxindex fa3f478282b..40b988a53a7 100644--- a/docs/development/basic/add-new-bot-platform.zh-CN.mdx+++ b/docs/development/basic/add-new-bot-platform.zh-CN.mdx@@ -10,12 +10,12 @@ tags:# 添加新的 Bot 平台-本指南介绍如何向 LobeHub 的渠道系统添加新的 Bot 平台。平台架构是模块化的 —— 每个平台是 `src/server/services/bot/platforms/` 下的一个独立目录。+本指南介绍如何向 LobeHub 的渠道系统添加新的 Bot 平台。平台架构是模块化的 —— 每个平台是 `apps/server/src/services/bot/platforms/` 下的一个独立目录。## 架构概览```-src/server/services/bot/platforms/+apps/server/src/services/bot/platforms/├── types.ts # 核心接口(FieldSchema、PlatformClient、ClientFactory 等)├── registry.ts # PlatformRegistry 类├── index.ts # 单例注册表 + 平台注册@@ -83,7 +83,7 @@ packages/chat-adapter-<platform>/## 第一步:创建平台目录```bash-mkdir src/server/services/bot/platforms/<platform-name>+mkdir apps/server/src/services/bot/platforms/<platform-name>```需要创建四个文件:@@ -350,7 +350,7 @@ export const myPlatform: PlatformDefinition = {## 第六步:注册平台-编辑 `src/server/services/bot/platforms/index.ts`:+编辑 `apps/server/src/services/bot/platforms/index.ts`:```tsimport { myPlatform } from './<platform>/definition';@@ -364,7 +364,7 @@ platformRegistry.register(myPlatform);## 第七步:添加 i18n 键-### 默认键(`src/locales/default/agent.ts`)+### 默认键(`packages/locales/src/default/agent.ts`)添加平台特有键。尽量复用通用键:@@ -414,13 +414,13 @@ POST /api/agent/webhooks/[platform]/[appId]## 检查清单- [ ] 确保 Chat SDK Adapter 可用(npm 上的 `@chat-adapter/*` 或自定义的 `packages/chat-adapter-<platform>`)-- [ ] 创建 `src/server/services/bot/platforms/<platform>/`+- [ ] 创建 `apps/server/src/services/bot/platforms/<platform>/`- [ ] `schema.ts` — 凭据和设置的字段定义- [ ] `api.ts` — 出站 API 客户端- [ ] `client.ts` — `ClientFactory` + `PlatformClient`- [ ] `definition.ts` — `PlatformDefinition` 导出-- [ ] 在 `src/server/services/bot/platforms/index.ts` 中注册-- [ ] 在 `src/locales/default/agent.ts` 中添加 i18n 键+- [ ] 在 `apps/server/src/services/bot/platforms/index.ts` 中注册+- [ ] 在 `packages/locales/src/default/agent.ts` 中添加 i18n 键- [ ] 在 `locales/zh-CN/agent.json` 和 `locales/en-US/agent.json` 中添加翻译- [ ] 在 `docs/usage/channels/<platform>.mdx` 中添加配置教程(中英文)- [ ] 验证图标在 `const.ts` 中能正确解析(或添加别名)diff --git a/docs/development/basic/architecture.mdx b/docs/development/basic/architecture.mdxindex dcd95f00011..22c2db1f883 100644--- a/docs/development/basic/architecture.mdx+++ b/docs/development/basic/architecture.mdx@@ -59,7 +59,7 @@ Frontend code is organized by responsibility under `src/`. See [Directory StructThe backend provides two API styles:- **RESTful WebAPI** (`src/app/(backend)/webapi/`): Handles endpoints requiring special processing such as chat streaming, TTS, and file serving-- **tRPC Routers** (`src/server/routers/`): Type-safe main business routes, grouped by runtime:+- **tRPC Routers** (`apps/server/src/routers/`): Type-safe main business routes, grouped by runtime:- `lambda/` — Main business (agent, session, message, topic, file, knowledge, settings, etc.)- `async/` — Long-running async operations (file processing, image generation, RAG evaluation)- `tools/` — Tool invocations (search, MCP, market)diff --git a/docs/development/basic/architecture.zh-CN.mdx b/docs/development/basic/architecture.zh-CN.mdxindex 012abee5502..880af876971 100644--- a/docs/development/basic/architecture.zh-CN.mdx+++ b/docs/development/basic/architecture.zh-CN.mdx@@ -57,7 +57,7 @@ LobeHub 的整体架构由以下核心层组成:后端提供两种 API 形式:- **RESTful WebAPI**(`src/app/(backend)/webapi/`):处理 chat 流式响应、TTS、文件服务等需要特殊处理的端点-- **tRPC Routers**(`src/server/routers/`):类型安全的主要业务路由,按运行时分组:+- **tRPC Routers**(`apps/server/src/routers/`):类型安全的主要业务路由,按运行时分组:- `lambda/` — 主业务(agent、session、message、topic、file、knowledge、settings 等)- `async/` — 耗时异步操作(文件处理、图像生成、RAG 评估)- `tools/` — 工具调用(search、MCP、market)diff --git a/docs/development/basic/chat-api.mdx b/docs/development/basic/chat-api.mdxindex 4a4c31282da..ec76b81c571 100644--- a/docs/development/basic/chat-api.mdx+++ b/docs/development/basic/chat-api.mdx@@ -70,7 +70,7 @@ sequenceDiagram### 1. Client Initiates RequestAfter the user sends a message, `sendMessage()`-(`src/store/chat/slices/aiChat/actions/conversationLifecycle.ts`)+(`src/store/chat/slices/agentRun/actions/entries/conversationLifecycle.ts`)creates the user message and assistant message placeholder,then calls `executeClientAgent()`.@@ -82,7 +82,7 @@ of the entire chat flow. Every chat interactionis driven by the `AgentRuntime.step()` loop.**Initialization**-(`src/store/chat/slices/aiChat/actions/streamingExecutor.ts`):+(`src/store/chat/slices/agentRun/actions/transports/client/streamingExecutor.ts`):1. Resolve agent config (model, provider, plugin list, etc.)2. Create the tool registry via `createAgentToolsEngine()`@@ -132,7 +132,7 @@ the executor calls ChatService:receives the request- Calls `initModelRuntimeFromDB` to read user's providerconfig from the database and initialize ModelRuntime-- A tRPC route `src/server/routers/lambda/aiChat.ts`+- A tRPC route `apps/server/src/routers/lambda/aiChat.ts`also exists for server-side message sendingand structured output scenarios@@ -326,14 +326,14 @@ depends on the scenario:continue generation, group orchestration decisions.The loop runs in the browser, entry point is`executeClientAgent()`- (`src/store/chat/slices/aiChat/actions/streamingExecutor.ts`)+ (`src/store/chat/slices/agentRun/actions/transports/client/streamingExecutor.ts`)- **Server-side loop** (queue/local):Group chat supervisor agent, sub-agent tasks,API/Cron triggers. The loop runs on the server,streaming events to the client via SSE, entry point is`AgentRuntimeService.executeStep()`- (`src/server/services/agentRuntime/AgentRuntimeService.ts`),- tRPC route at `src/server/routers/lambda/aiAgent.ts`+ (`apps/server/src/services/agentRuntime/AgentRuntimeService.ts`),+ tRPC route at `apps/server/src/routers/lambda/aiAgent.ts`## Model Runtimediff --git a/docs/development/basic/chat-api.zh-CN.mdx b/docs/development/basic/chat-api.zh-CN.mdxindex af7ac93a186..87e71be03e0 100644--- a/docs/development/basic/chat-api.zh-CN.mdx+++ b/docs/development/basic/chat-api.zh-CN.mdx@@ -67,7 +67,7 @@ sequenceDiagram### 1. 客户端发起请求用户发送消息后,`sendMessage()`-(`src/store/chat/slices/aiChat/actions/conversationLifecycle.ts`)+(`src/store/chat/slices/agentRun/actions/entries/conversationLifecycle.ts`)创建用户消息和助手消息占位,然后调用 `executeClientAgent()`。### 2. Agent Runtime 驱动循环@@ -77,7 +77,7 @@ Agent Runtime 是整个 chat 流程的**核心执行引擎**。`AgentRuntime.step()` 循环驱动。**初始化**-(`src/store/chat/slices/aiChat/actions/streamingExecutor.ts`):+(`src/store/chat/slices/agentRun/actions/transports/client/streamingExecutor.ts`):1. 解析 agent 配置(模型、provider、插件列表等)2. 通过 `createAgentToolsEngine()` 创建工具注册表@@ -122,7 +122,7 @@ while (state.status !== 'done' && state.status !== 'error') {- 调用 `initModelRuntimeFromDB` 从数据库读取用户的provider 配置,初始化 ModelRuntime- 同时存在 tRPC 路由- `src/server/routers/lambda/aiChat.ts`,+ `apps/server/src/routers/lambda/aiChat.ts`,用于服务端消息发送和结构化输出等场景### 5. 模型调用与响应处理@@ -294,13 +294,13 @@ Agent Runtime 循环的执行位置取决于场景:- **客户端循环**(浏览器):常规 1:1 对话、继续生成、群组编排决策。循环在浏览器中运行,入口为 `executeClientAgent()`- (`src/store/chat/slices/aiChat/actions/streamingExecutor.ts`)+ (`src/store/chat/slices/agentRun/actions/transports/client/streamingExecutor.ts`)- **服务端循环**(队列 / 本地):群聊 supervisor agent、子 agent 任务、API/Cron 触发。循环在服务端运行,通过 SSE 流式推送事件到客户端,入口为 `AgentRuntimeService.executeStep()`- (`src/server/services/agentRuntime/AgentRuntimeService.ts`),- tRPC 路由为 `src/server/routers/lambda/aiAgent.ts`+ (`apps/server/src/services/agentRuntime/AgentRuntimeService.ts`),+ tRPC 路由为 `apps/server/src/routers/lambda/aiAgent.ts`## Model Runtimediff --git a/docs/development/basic/comfyui-development.mdx b/docs/development/basic/comfyui-development.mdxindex 3ea5bf06d5b..88b71b226eb 100644--- a/docs/development/basic/comfyui-development.mdx+++ b/docs/development/basic/comfyui-development.mdx@@ -52,7 +52,7 @@ packages/model-runtime/src/providers/comfyui/├── workflowError.ts # Workflow errors└── servicesError.ts # Service errors-src/server/services/comfyui/ # Server-side implementation+apps/server/src/services/comfyui/ # Server-side implementation├── core/ # Core server services│ ├── comfyUIAuthService.ts # Authentication service│ ├── comfyUIClientService.ts # Client service@@ -933,7 +933,7 @@ describe('Model Registry', () => {### Basic Image Generation```typescript-import { LobeComfyUI } from '@/libs/model-runtime/comfyui';+import { LobeComfyUI } from '@lobechat/model-runtime';const comfyUI = new LobeComfyUI({baseURL: 'http://localhost:8000',diff --git a/docs/development/basic/comfyui-development.zh-CN.mdx b/docs/development/basic/comfyui-development.zh-CN.mdxindex ccd4d235301..734e3f375d4 100644--- a/docs/development/basic/comfyui-development.zh-CN.mdx+++ b/docs/development/basic/comfyui-development.zh-CN.mdx@@ -50,7 +50,7 @@ packages/model-runtime/src/providers/comfyui/├── workflowError.ts # 工作流错误└── servicesError.ts # 服务错误-src/server/services/comfyui/ # 服务端实现+apps/server/src/services/comfyui/ # 服务端实现├── core/ # 核心服务器服务│ ├── comfyUIAuthService.ts # 认证服务│ ├── comfyUIClientService.ts # 客户端服务@@ -931,7 +931,7 @@ describe('Model Registry', () => {### 基础图像生成```typescript-import { LobeComfyUI } from '@/libs/model-runtime/comfyui';+import { LobeComfyUI } from '@lobechat/model-runtime';const comfyUI = new LobeComfyUI({baseURL: 'http://localhost:8000',diff --git a/docs/development/basic/contributing-guidelines.mdx b/docs/development/basic/contributing-guidelines.mdxindex 7ef4f648952..96bae51eeb3 100644--- a/docs/development/basic/contributing-guidelines.mdx+++ b/docs/development/basic/contributing-guidelines.mdx@@ -21,13 +21,13 @@ In LobeHub, we use the [@lobehub/lint](https://github.com/lobehub/lobe-lint) pac### ESLint-We use ESLint to check for issues in our JavaScript code. You can find the `.eslintrc.js` file in the project's root directory, which contains our extensions and custom rules for the ESLint configuration of `@lobehub/lint`.+We use ESLint to check for issues in our JavaScript code. You can find the `eslint.config.mjs` flat config file in the project's root directory, which contains our extensions and custom rules for the ESLint configuration of `@lobehub/lint`.To ensure your code aligns with the project's standards, run ESLint before committing your code.### Prettier-Prettier is responsible for code formatting to maintain consistency. Our Prettier configuration can be found in `.prettierrc.js`, imported from `@lobehub/lint`.+Prettier is responsible for code formatting to maintain consistency. Our Prettier configuration can be found in `prettier.config.mjs`, imported from `@lobehub/lint`.It's recommended to configure your editor to run Prettier automatically when saving files.@@ -72,7 +72,7 @@ We use semantic release to automate version control and release processes. When### Commitlint-To ensure consistency in commit messages, we use `commitlint` to check the format of commit messages. You can find the relevant rules in the `.commitlintrc.js` configuration file.+To ensure consistency in commit messages, we use `commitlint` to check the format of commit messages. You can find the relevant rules in the `commitlint.config.mjs` configuration file.Before committing your code, ensure that your commit messages adhere to our standards.diff --git a/docs/development/basic/contributing-guidelines.zh-CN.mdx b/docs/development/basic/contributing-guidelines.zh-CN.mdxindex b512f11bf2d..591038d6db9 100644--- a/docs/development/basic/contributing-guidelines.zh-CN.mdx+++ b/docs/development/basic/contributing-guidelines.zh-CN.mdx@@ -19,13 +19,13 @@ tags:### ESLint-我们的项目使用 ESLint 来检查 JavaScript 代码中的问题。您可以在项目根目录下找到 `.eslintrc.js` 文件,其中包含了我们对 `@lobehub/lint` 的 ESLint 配置的扩展和自定义规则。+我们的项目使用 ESLint 来检查 JavaScript 代码中的问题。您可以在项目根目录下找到 `eslint.config.mjs` flat config 文件,其中包含了我们对 `@lobehub/lint` 的 ESLint 配置的扩展和自定义规则。为了与 Next.js 框架兼容,我们在配置中添加了 `plugin:@next/next/recommended`。此外,我们禁用了一些规则,以适应我们项目的特定需求。### Prettier-Prettier 负责代码格式化,以保证代码的一致性。您可以在 `.prettierrc.js` 中找到我们的 Prettier 配置,它是从 `@lobehub/lint` 导入的。+Prettier 负责代码格式化,以保证代码的一致性。您可以在 `prettier.config.mjs` 中找到我们的 Prettier 配置,它是从 `@lobehub/lint` 导入的。在保存文件时,建议您配置您的编辑器以自动运行 Prettier。@@ -70,7 +70,7 @@ Gitmoji commit messages 使用特定的 emoji 来表示提交的类型或意图### Commitlint-为了确保提交信息的一致性,我们使用 `commitlint` 来检查提交信息格式。您可以在 `.commitlintrc.js` 配置文件中找到相关规则。+为了确保提交信息的一致性,我们使用 `commitlint` 来检查提交信息格式。您可以在 `commitlint.config.mjs` 配置文件中找到相关规则。在您提交代码之前,请确保您的提交信息遵循我们的规范。diff --git a/docs/development/basic/feature-development.mdx b/docs/development/basic/feature-development.mdxindex 3fd0393a5bb..698f9039511 100644--- a/docs/development/basic/feature-development.mdx+++ b/docs/development/basic/feature-development.mdx@@ -98,9 +98,9 @@ The project is divided into multiple frontend and backend layers by responsibili+-------------------+--------------------------------------+------------------------------------------------------+| Client Service | src/services/ | Reusable frontend business logic, often multiple tRPC || WebAPI | src/app/(backend)/webapi/ | REST API endpoints |-| tRPC Router | src/server/routers/ | tRPC entry, validates input, routes to service |-| Server Service | src/server/services/ | Server-side business logic, with DB access |-| Server Module | src/server/modules/ | Server-side modules, no direct DB access |+| tRPC Router | apps/server/src/routers/ | tRPC entry, validates input, routes to service |+| Server Service | apps/server/src/services/ | Server-side business logic, with DB access |+| Server Module | apps/server/src/modules/ | Server-side modules, no direct DB access || Repository | packages/database/src/repositories/ | Complex queries, cross-table operations || DB Model | packages/database/src/models/ | Single-table CRUD operations |+-------------------+--------------------------------------+------------------------------------------------------+@@ -116,7 +116,7 @@ export class SessionService {}```-**tRPC Router** is the backend entry point (`src/server/routers/lambda/`), validates input and calls Server Service for business logic:+**tRPC Router** is the backend entry point (`apps/server/src/routers/lambda/`), validates input and calls Server Service for business logic:```typescriptexport const sessionRouter = router({@@ -153,7 +153,7 @@ The latter listens for and updates the current session's agent configuration thr#### Update AgentSetting/store-First, we update the initialState. After reading `src/features/AgentSetting/store/initialState.ts`, we learn that the initial agent configuration is saved in `DEFAULT_AGENT_CONFIG` in `src/const/settings/agent.ts`:+First, we update the initialState. After reading `src/features/AgentSetting/store/initialState.ts`, we learn that the initial agent configuration is saved in `DEFAULT_AGENT_CONFIG` in `packages/const/src/settings/agent.ts`:```diffexport const DEFAULT_AGENT_CONFIG: LobeAgentConfig = {@@ -200,7 +200,7 @@ export const store: StateCreator<Store, [['zustand/devtools', never]]> = (set, gIn the display component we use `src/store/agent` to get the current agent configuration. Simply add two selectors:-Update `src/store/agent/slices/chat/selectors/agent.ts`:+Update `src/store/agent/selectors/selectors.ts`:```diff+const openingQuestions = (s: AgentStoreState) =>@@ -219,10 +219,10 @@ export const agentSelectors = {LobeHub is an internationalized project using [react-i18next](https://github.com/i18next/react-i18next). Newly added UI text needs to:-1. Add keys to the corresponding namespace file in `src/locales/default/` (default language is English):+1. Add keys to the corresponding namespace file in `packages/locales/src/default/` (default language is English):```typescript-// src/locales/default/setting.ts+// packages/locales/src/default/setting.tsexport default {// ...'settingOpening.title': 'Opening Settings',@@ -235,9 +235,9 @@ export default {};```-2. If a new namespace is added, export it in `src/locales/default/index.ts`+2. If a new namespace is added, export it in `packages/locales/src/default/index.ts`3. For dev preview: manually translate the corresponding JSON files in `locales/zh-CN/` and `locales/en-US/`-4. CI will automatically run `pnpm i18n` to generate translations for other languages+4. CI will automatically run `bun run i18n` to generate translations for other languagesKey naming convention uses flat dot notation: `{feature}.{context}.{action|status}`.@@ -299,35 +299,27 @@ Key points:- Update config via the `setAgentConfig` action- Use `useTranslation('setting')` for i18n text-We also need to display the opening configuration set by the user on the chat page. The corresponding component is in `src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/WelcomeMessage.tsx`:+We also need to display the opening configuration set by the user on the chat page. Agent chat uses `src/features/AgentHome` (`AgentInfo.tsx` for `openingMessage`, `OpeningQuestions.tsx` for questions). Group chat has a parallel welcome under `src/routes/(main)/group/features/Conversation/AgentWelcome`. Do **not** use `src/features/Onboarding/Agent/WelcomeMessage.tsx` — that is the onboarding flow only.```typescript-const WelcomeMessage = () => {- const { t } = useTranslation('chat');+// src/features/AgentHome/AgentInfo.tsx (simplified)+const AgentInfo = () => {+ const { t } = useTranslation(['chat', 'welcome']);- // Get current opening configuration from store/agent- const openingMessage = useAgentStore(agentSelectors.openingMessage);- const openingQuestions = useAgentStore(agentSelectors.openingQuestions);-- const meta = useSessionStore(sessionMetaSelectors.currentAgentMeta, isEqual);+ // Prefer conversation-scoped agent config (openingMessage on agent config)+ const openingMessage = useAgentStore(+ (s) => agentSelectors.getAgentConfigById(agentId)(s)?.openingMessage || '',+ );const message = useMemo(() => {- // Use user-set message if availableif (openingMessage) return openingMessage;- return !!meta.description ? agentSystemRoleMsg : agentMsg;- }, [openingMessage, agentSystemRoleMsg, agentMsg, meta.description]);-- return openingQuestions.length > 0 ? (- <Flexbox>- <ChatItem avatar={meta} message={message} placement="left" />- {/* Render guiding questions */}- <OpeningQuestions questions={openingQuestions} />--</Flexbox>- ) : (- <ChatItem avatar={meta} message={message} placement="left" />- );+ return t('agentDefaultMessageWithSystemRole', { name: displayTitle });+ }, [openingMessage, displayTitle, t]);++ // render avatar + Markdown(message) ...};++// src/features/AgentHome/index.tsx wires AgentInfo + OpeningQuestions```## 5. Testing@@ -351,7 +343,7 @@ Since our two new configuration fields are both optional, theoretically tests woIt's recommended to run related tests locally first to see which fail, then update as needed. For example:```bash-bunx vitest run --silent='passed-only' 'src/store/agent/slices/chat/selectors/agent.test.ts'+bunx vitest run --silent='passed-only' 'src/store/agent/selectors/selectors.test.ts'```If you just want to check whether existing tests pass without running locally, you can also check the GitHub Actions test results directly.diff --git a/docs/development/basic/feature-development.zh-CN.mdx b/docs/development/basic/feature-development.zh-CN.mdxindex 48375da4f4d..96bc27a109d 100644--- a/docs/development/basic/feature-development.zh-CN.mdx+++ b/docs/development/basic/feature-development.zh-CN.mdx@@ -97,9 +97,9 @@ export interface LobeAgentConfig {+-------------------+--------------------------------------+------------------------------------------------------+| Client Service | src/services/ | 封装前端可复用的业务逻辑,一般涉及多个后端请求(tRPC) || WebAPI | src/app/(backend)/webapi/ | REST API 端点 |-| tRPC Router | src/server/routers/ | tRPC 入口,校验输入,路由到 service |-| Server Service | src/server/services/ | 服务端业务逻辑,可访问数据库 |-| Server Module | src/server/modules/ | 服务端模块,不直接访问数据库 |+| tRPC Router | apps/server/src/routers/ | tRPC 入口,校验输入,路由到 service |+| Server Service | apps/server/src/services/ | 服务端业务逻辑,可访问数据库 |+| Server Module | apps/server/src/modules/ | 服务端模块,不直接访问数据库 || Repository | packages/database/src/repositories/ | 封装复杂查询、跨表操作 || DB Model | packages/database/src/models/ | 封装单表的 CRUD 操作 |+-------------------+--------------------------------------+------------------------------------------------------+@@ -115,7 +115,7 @@ export class SessionService {}```-**tRPC Router** 是后端入口(`src/server/routers/lambda/`),校验输入后调用 Server Service 处理业务逻辑:+**tRPC Router** 是后端入口(`apps/server/src/routers/lambda/`),校验输入后调用 Server Service 处理业务逻辑:```typescriptexport const sessionRouter = router({@@ -152,7 +152,7 @@ LobeHub 使用 [zustand](https://zustand.docs.pmnd.rs/getting-started/introducti#### 更新 AgentSetting/store-首先我们更新 initialState,阅读 `src/features/AgentSetting/store/initialState.ts` 后得知初始 agent 配置保存在 `src/const/settings/agent.ts` 中的 `DEFAULT_AGENT_CONFIG`:+首先我们更新 initialState,阅读 `src/features/AgentSetting/store/initialState.ts` 后得知初始 agent 配置保存在 `packages/const/src/settings/agent.ts` 中的 `DEFAULT_AGENT_CONFIG`:```diffexport const DEFAULT_AGENT_CONFIG: LobeAgentConfig = {@@ -199,7 +199,7 @@ export const store: StateCreator<Store, [['zustand/devtools', never]]> = (set, g在展示组件中我们使用 `src/store/agent` 获取当前 agent 配置,简单加两个 selectors:-更新 `src/store/agent/slices/chat/selectors/agent.ts`:+更新 `src/store/agent/selectors/selectors.ts`:```diff+const openingQuestions = (s: AgentStoreState) =>@@ -218,10 +218,10 @@ export const agentSelectors = {LobeHub 是国际化项目,使用 [react-i18next](https://github.com/i18next/react-i18next) 作为 i18n 框架。新增的 UI 文案需要:-1. 在 `src/locales/default/` 对应的 namespace 文件中添加 key(默认语言为英文):+1. 在 `packages/locales/src/default/` 对应的 namespace 文件中添加 key(默认语言为英文):```typescript-// src/locales/default/setting.ts+// packages/locales/src/default/setting.tsexport default {// ...'settingOpening.title': 'Opening Settings',@@ -234,9 +234,9 @@ export default {};```-2. 如果新增了 namespace,需要在 `src/locales/default/index.ts` 中导出+2. 如果新增了 namespace,需要在 `packages/locales/src/default/index.ts` 中导出3. 开发预览时手动翻译 `locales/zh-CN/` 和 `locales/en-US/` 对应的 JSON 文件-4. CI 会自动运行 `pnpm i18n` 生成其他语言的翻译+4. CI 会自动运行 `bun run i18n` 生成其他语言的翻译key 的命名规范为扁平的 dot notation:`{feature}.{context}.{action|status}`。@@ -298,35 +298,27 @@ const OpeningQuestions = memo(() => {- 通过 `setAgentConfig` action 更新配置- 使用 `useTranslation('setting')` 获取 i18n 文案-同时我们需要将用户设置的开场配置展示出来,这个是在 chat 页面,对应组件在 `src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/WelcomeMessage.tsx`:+同时我们需要将用户设置的开场配置展示在 chat 页面。Agent 会话使用 `src/features/AgentHome`(`AgentInfo.tsx` 读 `openingMessage`,`OpeningQuestions.tsx` 渲染问题列表);群聊有对应欢迎区 `src/routes/(main)/group/features/Conversation/AgentWelcome`。**不要**改 `src/features/Onboarding/Agent/WelcomeMessage.tsx` —— 那只是 onboarding 流程。```typescript-const WelcomeMessage = () => {- const { t } = useTranslation('chat');+// src/features/AgentHome/AgentInfo.tsx(简化)+const AgentInfo = () => {+ const { t } = useTranslation(['chat', 'welcome']);- // 从 store/agent 获取当前开场配置- const openingMessage = useAgentStore(agentSelectors.openingMessage);- const openingQuestions = useAgentStore(agentSelectors.openingQuestions);-- const meta = useSessionStore(sessionMetaSelectors.currentAgentMeta, isEqual);+ // 优先会话作用域下的 agent 配置(openingMessage 在 agent config 上)+ const openingMessage = useAgentStore(+ (s) => agentSelectors.getAgentConfigById(agentId)(s)?.openingMessage || '',+ );const message = useMemo(() => {- // 用户设置了就用用户设置的if (openingMessage) return openingMessage;- return !!meta.description ? agentSystemRoleMsg : agentMsg;- }, [openingMessage, agentSystemRoleMsg, agentMsg, meta.description]);-- return openingQuestions.length > 0 ? (- <Flexbox>- <ChatItem avatar={meta} message={message} placement="left" />- {/* 渲染引导性问题 */}- <OpeningQuestions questions={openingQuestions} />--</Flexbox>- ) : (- <ChatItem avatar={meta} message={message} placement="left" />- );+ return t('agentDefaultMessageWithSystemRole', { name: displayTitle });+ }, [openingMessage, displayTitle, t]);++ // 渲染头像 + Markdown(message) ...};++// src/features/AgentHome/index.tsx 组装 AgentInfo + OpeningQuestions```## 五、测试@@ -350,7 +342,7 @@ cd packages/database && bunx vitest run --silent='passed-only' '[file]'建议先本地跑下相关测试,看哪些失败了再针对性更新。例如:```bash-bunx vitest run --silent='passed-only' 'src/store/agent/slices/chat/selectors/agent.test.ts'+bunx vitest run --silent='passed-only' 'src/store/agent/selectors/selectors.test.ts'```如果只是想确认现有测试是否通过而不想本地跑,也可以直接查看 GitHub Actions 的测试结果。diff --git a/docs/development/basic/folder-structure.mdx b/docs/development/basic/folder-structure.mdxindex b7151b86f94..96ddc6c49cf 100644--- a/docs/development/basic/folder-structure.mdx+++ b/docs/development/basic/folder-structure.mdx@@ -19,18 +19,24 @@ The top-level directory structure is as follows:```bashlobehub/├── apps/-│ └── desktop/ # Electron desktop app+│ ├── cli/ # LobeHub CLI+│ ├── desktop/ # Electron desktop app+│ └── server/ # Standalone server (tRPC routers, services, modules)├── packages/ # Shared packages (@lobechat/*)│ ├── agent-runtime/ # Agent runtime│ ├── database/ # Database schemas, models, repositories│ ├── model-runtime/ # Model runtime (AI provider adapters)│ ├── builtin-tool-*/ # Built-in tool packages+│ ├── builtin-tools/ # Built-in tools registry (inspectors, interventions, renders, etc.)│ ├── business/ # Cloud business slot packages│ ├── context-engine/ # Context engine│ ├── conversation-flow/ # Conversation flow│ ├── editor-runtime/ # Editor runtime│ ├── file-loaders/ # File loaders│ ├── prompts/ # Prompt templates+│ ├── app-config/ # App configuration (client and server env vars)+│ ├── env/ # Environment variable definitions and validation+│ ├── locales/ # i18n default language files (English) and resources│ └── ... # More shared packages├── src/ # Main app source code (see below)├── locales/ # i18n translation files (zh-CN, en-US, etc.)@@ -40,30 +46,42 @@ lobehub/## src Directory+`config/`, `envs/`, `locales/`, and `tools/` have moved out of `src/` into standalone packages —+`packages/app-config`, `packages/env`, `packages/locales`, and `packages/builtin-tools`.+The `@/config/*`, `@/envs/*`, and `@/locales/*` path aliases resolve to those packages first+(see `tsconfig.json`), so most imports don't need to change.+```bashsrc/-├── app/ # Next.js App Router (route groups and API routes)+├── app/ # Next.js App Router: backend API routes + SPA/auth HTML shell serving+│ ├── (backend)/ # Backend API routes (auth, webhooks, trpc, webapi, oidc, oauth)+│ ├── spa/ # SPA HTML template route (serves the Vite-built SPA bundle)+│ └── spa-auth/ # Auth pages HTML template route├── business/ # Cloud-only business logic (client/server)├── components/ # Reusable UI components-├── config/ # App configuration (client and server env vars)├── const/ # Application constants and enums-├── envs/ # Environment variable definitions and validation├── features/ # Business feature modules (Agent settings, plugin dev, etc.)├── helpers/ # Utility helper functions├── hooks/ # Reusable custom Hooks├── layout/ # Global layout components (AuthProvider, GlobalProvider)├── libs/ # Third-party integrations (better-auth, OIDC, tRPC, MCP, etc.)-├── locales/ # i18n default language files (English)-├── server/ # Server-side modules-│ ├── featureFlags/ # Feature flags-│ ├── globalConfig/ # Global configuration-│ ├── modules/ # Server modules (no DB access)-│ ├── routers/ # tRPC routers (async, lambda, mobile, tools)-│ └── services/ # Server services (with DB access)+├── routes/ # SPA page segments (layout + page files), grouped by platform+│ ├── (main)/ # Desktop routes+│ ├── (mobile)/ # Mobile routes+│ ├── (desktop)/ # Desktop-only routes (e.g. desktop onboarding)+│ ├── (popup)/ # Popup window routes+│ ├── auth/ # Auth pages (signin, signup, oauth, ...)+│ ├── onboarding/ # Onboarding flow+│ └── share/ # Share pages+├── server/ # Remaining server-side modules not yet moved to apps/server+│ # (SEO metadata, SPA HTML rendering, composio services, workflows-hono)├── services/ # Client-side service interfaces+├── spa/ # SPA entry points and React Router config+│ ├── entry.web.tsx / entry.mobile.tsx / entry.desktop.tsx / entry.popup.tsx / entry.auth.tsx+│ └── router/ # Router configs (desktopRouter.config.tsx, mobileRouter.config.tsx,+│ # popupRouter.config.tsx, authRouter.config.tsx)├── store/ # Zustand state management├── styles/ # Global styles and CSS-in-JS configurations-├── tools/ # Built-in tools (artifacts, inspectors, etc.)├── types/ # TypeScript type definitions├── utils/ # General utility functions├── auth.ts # Authentication configuration (Better Auth)@@ -71,12 +89,18 @@ src/└── proxy.ts # Next.js middleware proxy configuration```-## app Directory+## app, routes, and spa Directories++Page routing is now split across three directories:-The `app` directory follows Next.js App Router conventions,-using [Route Groups](https://nextjs.org/docs/app/building-your-application/routing/route-groups)-to organize backend services, platform variants,-and application routes:+- **`src/app/`** — Next.js App Router. Only handles backend API routes (`(backend)/`) and+ the two Next.js routes that serve the SPA's HTML shell: `spa/[variants]/[[...path]]/route.ts`+ (main app) and `spa-auth/[locale]/[[...path]]/route.ts` (auth pages).+- **`src/routes/`** — SPA page segments, grouped by platform route group+ (`(main)`, `(mobile)`, `(desktop)`, `(popup)`), plus `auth/`, `onboarding/`, and `share/`.+ These are thin files that delegate to `src/features/*` for actual UI and business logic.+- **`src/spa/`** — SPA entry points (`entry.web.tsx`, `entry.mobile.tsx`, `entry.desktop.tsx`,+ `entry.popup.tsx`, `entry.auth.tsx`) and React Router config under `router/`.```bashapp/@@ -85,6 +109,7 @@ app/│ ├── f/ # File service│ ├── market/ # Market service│ ├── middleware/ # Request middleware+│ ├── oauth/ # OAuth routes│ ├── oidc/ # OpenID Connect routes│ ├── trpc/ # tRPC API endpoints│ │ ├── async/ # Async tRPC routes@@ -92,25 +117,38 @@ app/│ │ ├── lambda/ # Lambda tRPC routes│ │ └── tools/ # Tools tRPC routes│ └── webapi/ # Web API endpoints (chat, models, tts, etc.)-├── [variants]/ # Platform and device variants-│ ├── (auth)/ # Auth pages (login, signup)-│ ├── (desktop)/ # Desktop-specific routes-│ ├── (main)/ # Main application routes (SPA)-│ │ ├── _layout/ # Layout components-│ │ ├── agent/ # Agent pages-│ │ ├── home/ # Home page-│ │ ├── image/ # Image generation-│ │ ├── memory/ # Memory management-│ │ ├── resource/ # Resource management-│ │ └── settings/ # Application settings-│ ├── (mobile)/ # Mobile-specific routes-│ ├── onboarding/ # Onboarding flow-│ ├── router/ # SPA router configuration-│ └── share/ # Share pages-├── manifest.ts # PWA manifest-├── robots.tsx # Robots.txt generation-├── sitemap.tsx # Sitemap generation-└── sw.ts # Service Worker+├── spa/[variants]/[[...path]]/route.ts # Serves the main SPA HTML shell+├── spa-auth/[locale]/[[...path]]/route.ts # Serves the auth pages HTML shell+├── [variants]/metadata.ts # Shared SEO metadata for variant routes+├── manifest.ts # PWA manifest+├── robots.tsx # Robots.txt generation+└── sitemap.tsx # Sitemap generation+```++```bash+src/routes/+├── (main)/ # Desktop routes: agent, group, home, resource, settings, memory, ...+├── (mobile)/ # Mobile routes: (home), chat, community, me, settings+├── (desktop)/ # Desktop-only routes (e.g. desktop-onboarding)+├── (popup)/ # Popup window routes: agent, group+├── auth/ # Auth pages: signin, signup, oauth, reset-password, verify-email, ...+├── onboarding/ # Onboarding flow+└── share/ # Share pages: t/[id], page/[id]+```++```bash+src/spa/+├── entry.web.tsx # Desktop web entry+├── entry.mobile.tsx # Mobile entry+├── entry.desktop.tsx # Electron desktop entry+├── entry.popup.tsx # Popup window entry+├── entry.auth.tsx # Auth pages entry+└── router/+ ├── desktopRouter.config.tsx # Desktop React Router routes+ ├── desktopRouter.config.desktop.tsx # Desktop (Electron) variant, kept in sync+ ├── mobileRouter.config.tsx # Mobile React Router routes+ ├── popupRouter.config.tsx # Popup window routes+ └── authRouter.config.tsx # Auth pages routes```### Architecture Explanation@@ -118,8 +156,7 @@ app/**Route Groups:**- `(backend)` — All server-side API routes, middleware, and backend services-- `[variants]` — Dynamic route group for platform variants-- `(main)` — Main SPA using React Router DOM+- `(main)` / `(mobile)` / `(desktop)` / `(popup)` — Platform-specific SPA route groups under `src/routes/`**Platform Organization:**@@ -131,7 +168,7 @@ app/**API Architecture:**- REST APIs: `(backend)/api/` and `(backend)/webapi/`-- tRPC endpoints (`src/server/routers/`): grouped by runtime+- tRPC endpoints (`apps/server/src/routers/`): grouped by runtime- `lambda/` — Main business routers (agent, session, message,topic, file, knowledge, settings, etc.)- `async/` — Long-running async operations@@ -144,7 +181,7 @@ app/Using a typical user action (e.g., updating Agent config) as an example, here's how data flows through each layer:```plaintext-React UI (src/features/, src/app/)+React UI (src/features/, src/routes/)│ User interaction triggers event▼Store Actions (src/store/)@@ -153,10 +190,10 @@ Store Actions (src/store/)Client Service (src/services/)│ Wraps tRPC client call, prepares request params▼-tRPC Router (src/server/routers/lambda/)+tRPC Router (apps/server/src/routers/lambda/)│ Validates input (zod), routes to service▼-Server Service (src/server/services/)+Server Service (apps/server/src/services/)│ Executes business logic, calls DB model▼DB Model (packages/database/src/models/)@@ -170,16 +207,20 @@ For data reads, the flow is reversed: UI consumes data via store selectors, and### Routing ArchitectureThe project uses hybrid routing:-Next.js App Router handles static pages (e.g., auth pages),-while React Router DOM powers the main SPA.+Next.js App Router serves the SPA's HTML shell and static/auth pages,+while React Router DOM powers the main SPA once the bundle loads in the browser.-**Entry**: `src/app/[variants]/page.tsx`-dispatches to desktop or mobile router based on device type.+**Entry**: The Next.js route `src/app/spa/[variants]/[[...path]]/route.ts`+renders the HTML shell (desktop or mobile template based on device type),+which then boots the matching Vite entry in `src/spa/` (`entry.web.tsx`, `entry.mobile.tsx`,+or `entry.desktop.tsx`) to mount the React Router app.**Key configuration files:**-- Desktop router: `src/app/[variants]/router/desktopRouter.config.tsx`-- Mobile router: `src/app/[variants]/(mobile)/router/mobileRouter.config.tsx`+- Desktop router: `src/spa/router/desktopRouter.config.tsx` (kept in sync with `desktopRouter.config.desktop.tsx`)+- Mobile router: `src/spa/router/mobileRouter.config.tsx`+- Popup router: `src/spa/router/popupRouter.config.tsx`+- Auth router: `src/spa/router/authRouter.config.tsx`- Router utilities: `src/utils/router.tsx`**Desktop SPA Routes (React Router DOM):**diff --git a/docs/development/basic/folder-structure.zh-CN.mdx b/docs/development/basic/folder-structure.zh-CN.mdxindex 3f06e7fccd0..64da4f35126 100644--- a/docs/development/basic/folder-structure.zh-CN.mdx+++ b/docs/development/basic/folder-structure.zh-CN.mdx@@ -17,18 +17,24 @@ LobeHub 采用 Monorepo 架构(`@lobechat/` 命名空间),```bashlobehub/├── apps/-│ └── desktop/ # Electron 桌面应用+│ ├── cli/ # LobeHub CLI+│ ├── desktop/ # Electron 桌面应用+│ └── server/ # 独立服务端(tRPC routers、services、modules)├── packages/ # 共享包(@lobechat/*)│ ├── agent-runtime/ # Agent 运行时│ ├── database/ # 数据库 schemas、models、repositories│ ├── model-runtime/ # 模型运行时(各 AI 提供商适配)│ ├── builtin-tool-*/ # 内置工具包+│ ├── builtin-tools/ # 内置工具注册表(inspectors、interventions、renders 等)│ ├── business/ # Cloud 业务插槽 packages│ ├── context-engine/ # 上下文引擎│ ├── conversation-flow/ # 会话流程│ ├── editor-runtime/ # 编辑器运行时│ ├── file-loaders/ # 文件加载器│ ├── prompts/ # Prompt 模板+│ ├── app-config/ # 应用配置(客户端与服务端环境变量)+│ ├── env/ # 环境变量定义和校验+│ ├── locales/ # 国际化默认语言文件(英文)和 resources│ └── ... # 更多共享包├── src/ # 主应用源码(见下方详细说明)├── locales/ # i18n 翻译文件(zh-CN、en-US 等)@@ -38,30 +44,42 @@ lobehub/## src 目录+`config/`、`envs/`、`locales/`、`tools/` 已从 `src/` 迁出,独立为 packages ——+`packages/app-config`、`packages/env`、`packages/locales`、`packages/builtin-tools`。+`@/config/*`、`@/envs/*`、`@/locales/*` 路径别名会优先解析到这些 packages(见 `tsconfig.json`),+所以大部分 import 不需要改动。+```bashsrc/-├── app/ # Next.js App Router(路由组和 API 路由)+├── app/ # Next.js App Router:后端 API 路由 + SPA/认证页 HTML 外壳服务+│ ├── (backend)/ # 后端 API 路由(auth、webhooks、trpc、webapi、oidc、oauth)+│ ├── spa/ # SPA HTML 模板路由(服务 Vite 构建的 SPA bundle)+│ └── spa-auth/ # 认证页 HTML 模板路由├── business/ # Cloud 版专用业务逻辑(客户端/服务端)├── components/ # 可复用的 UI 组件-├── config/ # 应用配置(客户端与服务端环境变量)├── const/ # 应用常量和枚举-├── envs/ # 环境变量定义和校验├── features/ # 业务功能模块(Agent 设置、插件开发弹窗等)├── helpers/ # 工具辅助函数├── hooks/ # 全应用复用的自定义 Hooks├── layout/ # 全局布局组件(AuthProvider、GlobalProvider)├── libs/ # 第三方集成(better-auth、OIDC、tRPC、MCP 等)-├── locales/ # 国际化默认语言文件(英文)-├── server/ # 服务端模块-│ ├── featureFlags/ # Feature Flags-│ ├── globalConfig/ # 全局配置-│ ├── modules/ # 服务端模块(不访问数据库)-│ ├── routers/ # tRPC 路由(async、lambda、mobile、tools)-│ └── services/ # 服务端服务(可访问数据库)+├── routes/ # SPA 页面片段(layout + page 文件),按平台分组+│ ├── (main)/ # 桌面端路由+│ ├── (mobile)/ # 移动端路由+│ ├── (desktop)/ # 桌面端专属路由(如 desktop-onboarding)+│ ├── (popup)/ # 弹出窗口路由+│ ├── auth/ # 认证页面(signin、signup、oauth 等)+│ ├── onboarding/ # 新用户引导+│ └── share/ # 分享页面+├── server/ # 尚未迁移到 apps/server 的剩余服务端模块+│ # (SEO metadata、SPA HTML 渲染、composio services、workflows-hono)├── services/ # 客户端服务接口+├── spa/ # SPA 入口和 React Router 配置+│ ├── entry.web.tsx / entry.mobile.tsx / entry.desktop.tsx / entry.popup.tsx / entry.auth.tsx+│ └── router/ # 路由配置(desktopRouter.config.tsx、mobileRouter.config.tsx、+│ # popupRouter.config.tsx、authRouter.config.tsx)├── store/ # zustand 状态管理├── styles/ # 全局样式和 CSS-in-JS 配置-├── tools/ # 内置工具(artifacts、inspectors 等)├── types/ # TypeScript 类型定义├── utils/ # 通用工具函数├── auth.ts # 认证配置(Better Auth)@@ -69,11 +87,18 @@ src/└── proxy.ts # Next.js 中间件代理配置```-## app 目录+## app、routes 和 spa 目录++页面路由现在拆分到三个目录中:-`app` 目录遵循 Next.js App Router 约定,-使用[路由组](https://nextjs.org/docs/app/building-your-application/routing/route-groups)-来组织后端服务、平台变体和应用路由:+- **`src/app/`** — Next.js App Router,仅负责后端 API 路由(`(backend)/`)以及两条负责渲染+ SPA HTML 外壳的 Next.js 路由:`spa/[variants]/[[...path]]/route.ts`(主应用)+ 和 `spa-auth/[locale]/[[...path]]/route.ts`(认证页)。+- **`src/routes/`** — SPA 页面片段,按平台路由组分组+ (`(main)`、`(mobile)`、`(desktop)`、`(popup)`),以及 `auth/`、`onboarding/`、`share/`。+ 这些文件很薄,只负责委托给 `src/features/*` 中的实际 UI 和业务逻辑。+- **`src/spa/`** — SPA 入口(`entry.web.tsx`、`entry.mobile.tsx`、`entry.desktop.tsx`、+ `entry.popup.tsx`、`entry.auth.tsx`)和 `router/` 下的 React Router 配置。```bashapp/@@ -82,6 +107,7 @@ app/│ ├── f/ # 文件服务│ ├── market/ # 市场服务│ ├── middleware/ # 请求中间件+│ ├── oauth/ # OAuth 路由│ ├── oidc/ # OpenID Connect 路由│ ├── trpc/ # tRPC API 端点│ │ ├── async/ # 异步 tRPC 路由@@ -89,25 +115,38 @@ app/│ │ ├── lambda/ # Lambda tRPC 路由│ │ └── tools/ # 工具 tRPC 路由│ └── webapi/ # Web API 端点(chat、models、tts 等)-├── [variants]/ # 平台和设备变体-│ ├── (auth)/ # 身份验证页面(login、signup)-│ ├── (desktop)/ # 桌面端专用路由-│ ├── (main)/ # 主应用路由(SPA)-│ │ ├── _layout/ # 布局组件-│ │ ├── agent/ # Agent 页面-│ │ ├── home/ # 首页-│ │ ├── image/ # 图像生成-│ │ ├── memory/ # 记忆管理-│ │ ├── resource/ # 资源管理-│ │ └── settings/ # 应用设置-│ ├── (mobile)/ # 移动端专用路由-│ ├── onboarding/ # 新用户引导-│ ├── router/ # SPA 路由配置-│ └── share/ # 分享页面-├── manifest.ts # PWA 清单-├── robots.tsx # Robots.txt 生成-├── sitemap.tsx # 站点地图生成-└── sw.ts # Service Worker+├── spa/[variants]/[[...path]]/route.ts # 渲染主 SPA 的 HTML 外壳+├── spa-auth/[locale]/[[...path]]/route.ts # 渲染认证页的 HTML 外壳+├── [variants]/metadata.ts # 变体路由共享的 SEO metadata+├── manifest.ts # PWA 清单+├── robots.tsx # Robots.txt 生成+└── sitemap.tsx # 站点地图生成+```++```bash+src/routes/+├── (main)/ # 桌面端路由:agent、group、home、resource、settings、memory 等+├── (mobile)/ # 移动端路由:(home)、chat、community、me、settings+├── (desktop)/ # 桌面端专属路由(如 desktop-onboarding)+├── (popup)/ # 弹出窗口路由:agent、group+├── auth/ # 认证页面:signin、signup、oauth、reset-password、verify-email 等+├── onboarding/ # 新用户引导+└── share/ # 分享页面:t/[id]、page/[id]+```++```bash+src/spa/+├── entry.web.tsx # 桌面 Web 入口+├── entry.mobile.tsx # 移动端入口+├── entry.desktop.tsx # Electron 桌面端入口+├── entry.popup.tsx # 弹出窗口入口+├── entry.auth.tsx # 认证页入口+└── router/+ ├── desktopRouter.config.tsx # 桌面端 React Router 路由+ ├── desktopRouter.config.desktop.tsx # 桌面端(Electron)变体,需与上者保持同步+ ├── mobileRouter.config.tsx # 移动端 React Router 路由+ ├── popupRouter.config.tsx # 弹出窗口路由+ └── authRouter.config.tsx # 认证页路由```### 架构说明@@ -115,8 +154,7 @@ app/**路由组:**- `(backend)` — 所有服务端 API 路由、中间件和后端服务-- `[variants]` — 处理不同平台变体的动态路由组-- `(main)` — 主应用 SPA,使用 React Router DOM+- `(main)` / `(mobile)` / `(desktop)` / `(popup)` — `src/routes/` 下按平台划分的 SPA 路由组**平台组织:**@@ -128,7 +166,7 @@ app/**API 架构:**- REST API:`(backend)/api/` 和 `(backend)/webapi/`-- tRPC 端点(`src/server/routers/`):按运行时分组+- tRPC 端点(`apps/server/src/routers/`):按运行时分组- `lambda/` — 主要业务路由(agent、session、message、topic、file、knowledge、settings 等)- `async/` — 耗时异步操作(文件处理、图像生成、RAG 评估)@@ -140,7 +178,7 @@ app/以一个典型的用户操作(如更新 Agent 配置)为例,数据在各层之间的流转:```plaintext-React UI (src/features/, src/app/)+React UI (src/features/, src/routes/)│ 用户交互触发事件▼Store Actions (src/store/)@@ -149,10 +187,10 @@ Store Actions (src/store/)Client Service (src/services/)│ 封装 tRPC 客户端调用,处理请求参数▼-tRPC Router (src/server/routers/lambda/)+tRPC Router (apps/server/src/routers/lambda/)│ 校验输入(zod),路由到对应 service▼-Server Service (src/server/services/)+Server Service (apps/server/src/services/)│ 执行业务逻辑,调用 DB model▼DB Model (packages/database/src/models/)@@ -166,16 +204,20 @@ PostgreSQL### 路由架构项目采用混合路由:-Next.js App Router 处理静态页面(如认证页),-React Router DOM 承载主应用 SPA。+Next.js App Router 负责渲染 SPA 的 HTML 外壳和静态 / 认证页面,+React Router DOM 在浏览器中加载 bundle 后承载主应用 SPA。-**入口**:`src/app/[variants]/page.tsx`-根据设备类型分发到桌面端或移动端路由。+**入口**:Next.js 路由 `src/app/spa/[variants]/[[...path]]/route.ts`+渲染 HTML 外壳(根据设备类型选择桌面端或移动端模板),+随后加载 `src/spa/` 下对应的 Vite 入口(`entry.web.tsx`、`entry.mobile.tsx`+或 `entry.desktop.tsx`)来挂载 React Router 应用。**关键配置文件:**-- 桌面端路由:`src/app/[variants]/router/desktopRouter.config.tsx`-- 移动端路由:`src/app/[variants]/(mobile)/router/mobileRouter.config.tsx`+- 桌面端路由:`src/spa/router/desktopRouter.config.tsx`(需与 `desktopRouter.config.desktop.tsx` 保持同步)+- 移动端路由:`src/spa/router/mobileRouter.config.tsx`+- 弹出窗口路由:`src/spa/router/popupRouter.config.tsx`+- 认证页路由:`src/spa/router/authRouter.config.tsx`- 路由工具:`src/utils/router.tsx`**桌面端 SPA 路由(React Router DOM):**diff --git a/docs/development/basic/test.mdx b/docs/development/basic/test.mdxindex 11dd9a6d1c6..11894883a0a 100644--- a/docs/development/basic/test.mdx+++ b/docs/development/basic/test.mdx@@ -471,28 +471,6 @@ it('should use theme', () => {});```-### Testing API Calls with MSW--```typescript-import { rest } from 'msw';-import { setupServer } from 'msw/node';--const server = setupServer(- rest.get('/api/user', (req, res, ctx) => {- return res(ctx.json({ id: '1', name: 'Alice' }));- }),-);--beforeAll(() => server.listen());-afterEach(() => server.resetHandlers());-afterAll(() => server.close());--it('should fetch user data', async () => {- const user = await fetchUser('1');- expect(user.name).toBe('Alice');-});-```-## Coverage### Generate Coverage Reportdiff --git a/docs/development/basic/test.zh-CN.mdx b/docs/development/basic/test.zh-CN.mdxindex 53c5a891258..833b3034010 100644--- a/docs/development/basic/test.zh-CN.mdx+++ b/docs/development/basic/test.zh-CN.mdx@@ -469,28 +469,6 @@ it('应使用主题', () => {});```-### 使用 MSW 测试 API 调用--```typescript-import { rest } from 'msw';-import { setupServer } from 'msw/node';--const server = setupServer(- rest.get('/api/user', (req, res, ctx) => {- return res(ctx.json({ id: '1', name: 'Alice' }));- }),-);--beforeAll(() => server.listen());-afterEach(() => server.resetHandlers());-afterAll(() => server.close());--it('应获取用户数据', async () => {- const user = await fetchUser('1');- expect(user.name).toBe('Alice');-});-```-## 测试覆盖率### 生成覆盖率报告diff --git a/docs/development/internationalization/add-new-locale.mdx b/docs/development/internationalization/add-new-locale.mdxindex d4cbf44de60..8b6c0726055 100644--- a/docs/development/internationalization/add-new-locale.mdx+++ b/docs/development/internationalization/add-new-locale.mdx@@ -1,26 +1,26 @@---title: New Locale Guide-description: Learn how to add Vietnamese language support in LobeHub using lobe-i18n.+description: Learn how to add Thai language support in LobeHub using @lobehub/i18n-cli.tags:- LobeHub- i18n- language support- - Vietnamese+ - Thai- localization---# New Locale Guide-LobeHub uses [lobe-i18n](https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n) as the i18n solution, which allows for quick addition of new language support in the application.+LobeHub uses [@lobehub/i18n-cli](https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n) as the i18n solution, which allows for quick addition of new language support in the application.## Adding New Language Support-To add new language internationalization support in LobeHub (for example, adding Vietnamese `vi-VN`), please follow the steps below:+To add new language internationalization support in LobeHub (for example, adding Thai `th-TH`), please follow the steps below:### Step 1: Update the Internationalization Configuration File1. Open the `.i18nrc.js` file. You can find this file in the project's root directory.-2. Add the new language code to the configuration file. For example, to add Vietnamese, you need to add `'vi-VN'` to the configuration file.+2. Add the new language code to the configuration file. For example, to add Thai, you need to add `'th-TH'` to the configuration file.```jsmodule.exports = {@@ -28,27 +28,26 @@ module.exports = {outputLocales: ['zh-TW',- 'en-US','ru-RU','ja-JP',// ...Other languages- 'vi-VN', // Add 'vi-VN' to the array+ 'th-TH', // Add 'th-TH' to the array],};```### Step 2: Automatically Translate Language Files-LobeHub uses the `lobe-i18n` tool to automatically translate language files, so manual updating of i18n files is not required.+LobeHub uses the `@lobehub/i18n-cli` tool to automatically translate language files, so manual updating of i18n files is not required.-Run the following command to automatically translate and generate the Vietnamese language files:+Run the following command to automatically translate and generate the Thai language files:```bash-npm run i18n+bun run i18n```-This will utilize the `lobe-i18n` tool to process the language files.+This will utilize the `@lobehub/i18n-cli` tool to process the language files.### Step 3: Submit and Review Your Changesdiff --git a/docs/development/internationalization/add-new-locale.zh-CN.mdx b/docs/development/internationalization/add-new-locale.zh-CN.mdxindex 69db9ad8252..a713fce758d 100644--- a/docs/development/internationalization/add-new-locale.zh-CN.mdx+++ b/docs/development/internationalization/add-new-locale.zh-CN.mdx@@ -5,22 +5,22 @@ tags:- LobeHub- 国际化- 语言支持- - lobe-i18n- - 越南语+ - '@lobehub/i18n-cli'+ - 泰语---# 新语种添加指南-LobeHub 使用 [lobe-i18n](https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n) 作为 i18n 解决方案,可以在应用中快速添加新的语言支持。+LobeHub 使用 [@lobehub/i18n-cli](https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n) 作为 i18n 解决方案,可以在应用中快速添加新的语言支持。## 添加新的语言支持-为了在 LobeHub 中添加新的语言国际化支持,(例如添加越南语 `vi-VN`),请按照以下步骤操作:+为了在 LobeHub 中添加新的语言国际化支持,(例如添加泰语 `th-TH`),请按照以下步骤操作:### 步骤 1: 更新国际化配置文件1. 打开 `.i18nrc.js` 文件。你可以在项目的根目录中找到此文件。-2. 将新的语言代码添加到配置文件中。例如,为了添加越南语,你需要在配置文件中添加 `'vi-VN'`。+2. 将新的语言代码添加到配置文件中。例如,为了添加泰语,你需要在配置文件中添加 `'th-TH'`。```jsmodule.exports = {@@ -28,27 +28,26 @@ module.exports = {outputLocales: ['zh-TW',- 'en-US','ru-RU','ja-JP',// ...其他语言- 'vi-VN', // 在数组中添加 'vi-VN'+ 'th-TH', // 在数组中添加 'th-TH'],};```### 步骤 2: 自动翻译语言文件-LobeHub 使用 `lobe-i18n` 工具来自动翻译语言文件,因此不需要手动更新 i18n 文件。+LobeHub 使用 `@lobehub/i18n-cli` 工具来自动翻译语言文件,因此不需要手动更新 i18n 文件。-运行以下命令来自动翻译并生成越南语的语言文件:+运行以下命令来自动翻译并生成泰语的语言文件:```bash-npm run i18n+bun run i18n```-这将会利用 `lobe-i18n` 工具来处理语言文件。+这将会利用 `@lobehub/i18n-cli` 工具来处理语言文件。### 步骤 3: 提交和审查你的更改diff --git a/docs/development/internationalization/internationalization-implementation.mdx b/docs/development/internationalization/internationalization-implementation.mdxindex 01450f71c5f..87afab2512d 100644--- a/docs/development/internationalization/internationalization-implementation.mdx+++ b/docs/development/internationalization/internationalization-implementation.mdx@@ -13,7 +13,7 @@ tags:# Internationalization Implementation Guide-Welcome to the LobeHub Internationalization Implementation Guide. This document will guide you through understanding the internationalization mechanism of LobeHub, including file structure and how to add new languages. LobeHub uses `i18next` and `lobe-i18n` as the internationalization solution, aiming to provide users with seamless multilingual support.+Welcome to the LobeHub Internationalization Implementation Guide. This document will guide you through understanding the internationalization mechanism of LobeHub, including file structure and how to add new languages. LobeHub uses `i18next` and `@lobehub/i18n-cli` as the internationalization solution, aiming to provide users with seamless multilingual support.## Internationalization Overview@@ -23,29 +23,25 @@ Internationalization (i18n for short) is the process of enabling an applicationIn the LobeHub project, internationalization-related files are organized as follows:-- `src/locales/default`: Contains translation files for the default development language (Chinese), which we use as Chinese.-- `locales`: Contains folders for all supported languages, with each language folder containing the respective translation files generated by lobe-i18n.+- `packages/locales/src/default`: Contains translation files for the default development language (English), which we use as the source language (`entryLocale: 'en-US'` in `.i18nrc.js`).+- `locales`: Contains folders for all supported languages, with each language folder containing the respective translation files generated by `@lobehub/i18n-cli`.-In the directory structure of `src/locales`, the `default` folder contains the original translation files (Chinese), while each other language folder contains JSON translation files for the respective language. The files in each language folder correspond to the TypeScript files in the `default` folder, ensuring consistency in the structure of translation files across languages.+In the directory structure of `packages/locales/src/default`, each file is a TypeScript namespace module containing the source (English) strings, while each language folder under `locales/` contains JSON translation files for the respective language. The files in each language folder correspond to the TypeScript namespace files in `packages/locales/src/default`, ensuring consistency in the structure of translation files across languages.```bash-src/locales-├── create.ts-├── default-│ ├── chat.ts-│ ├── common.ts-│ ├── error.ts-│ ├── index.ts-│ ├── market.ts-│ ├── migration.ts-│ ├── plugin.ts-│ ├── setting.ts-│ ├── tool.ts-│ └── welcome.ts-└── resources.ts+packages/locales/src/default+├── index.ts+├── agent.ts+├── chat.ts+├── common.ts+├── error.ts+├── setting.ts+├── tool.ts+├── welcome.ts+└── ... (50+ namespace files)```-The file structure generated by lobe-i18n is as follows:+The file structure generated by `@lobehub/i18n-cli` is as follows:```bashlocales@@ -125,6 +121,6 @@ To add support for new languages, please refer to the detailed steps in the [New## Resources and Further Reading- [i18next Official Documentation](https://www.i18next.com/)-- [lobe-i18n Tool Description](https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n)+- [@lobehub/i18n-cli Tool Description](https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n)By following this guide, you can better understand and participate in the internationalization work of LobeHub, providing a seamless multilingual experience for global users.diff --git a/docs/development/internationalization/internationalization-implementation.zh-CN.mdx b/docs/development/internationalization/internationalization-implementation.zh-CN.mdxindex 6fd7702d52e..362b08055f2 100644--- a/docs/development/internationalization/internationalization-implementation.zh-CN.mdx+++ b/docs/development/internationalization/internationalization-implementation.zh-CN.mdx@@ -10,7 +10,7 @@ tags:# 国际化实现指南-欢迎阅读 LobeHub 国际化实现指南。本文档将指导你了解 LobeHub 的国际化机制,包括文件结构、如何添加新语种。LobeHub 采用 `i18next` 和 `lobe-i18n` 作为国际化解决方案,旨在为用户提供流畅的多语言支持。+欢迎阅读 LobeHub 国际化实现指南。本文档将指导你了解 LobeHub 的国际化机制,包括文件结构、如何添加新语种。LobeHub 采用 `i18next` 和 `@lobehub/i18n-cli` 作为国际化解决方案,旨在为用户提供流畅的多语言支持。## 国际化概述@@ -20,29 +20,25 @@ tags:在 LobeHub 的项目中,国际化相关的文件被组织如下:-- `src/locales/default`: 包含默认开发语言(中文)的翻译文件,我们作为中文。-- `locales`: 包含所有支持的语言文件夹,每个语言文件夹中包含相应语言的翻译文件,这些翻译文件通过 lobe-i18n 自动生成。+- `packages/locales/src/default`: 包含默认开发语言(英文)的翻译文件,作为源语言(`.i18nrc.js` 中的 `entryLocale: 'en-US'`)。+- `locales`: 包含所有支持的语言文件夹,每个语言文件夹中包含相应语言的翻译文件,这些翻译文件通过 `@lobehub/i18n-cli` 自动生成。-在 `src/locales` 这个目录结构中,`default` 文件夹包含了原始的翻译文件(中文),其他每个语言文件夹则包含了相应语言的 JSON 翻译文件。每个语言文件夹中的文件对应 `default` 文件夹中的 TypeScript 文件,确保了各语种之间的翻译文件结构一致性。+在 `packages/locales/src/default` 这个目录结构中,每个文件都是一个包含源语言(英文)文案的 TypeScript namespace 模块,而 `locales/` 下的每个语言文件夹则包含了相应语言的 JSON 翻译文件。每个语言文件夹中的文件对应 `packages/locales/src/default` 中的 TypeScript namespace 文件,确保了各语种之间的翻译文件结构一致性。```bash-src/locales-├── create.ts-├── default-│ ├── chat.ts-│ ├── common.ts-│ ├── error.ts-│ ├── index.ts-│ ├── market.ts-│ ├── migration.ts-│ ├── plugin.ts-│ ├── setting.ts-│ ├── tool.ts-│ └── welcome.ts-└── resources.ts+packages/locales/src/default+├── index.ts+├── agent.ts+├── chat.ts+├── common.ts+├── error.ts+├── setting.ts+├── tool.ts+├── welcome.ts+└── ... (50+ 个 namespace 文件)```-通过 lobe-i18n 自动生成的文件结构如下:+通过 `@lobehub/i18n-cli` 自动生成的文件结构如下:```bashlocales@@ -122,6 +118,6 @@ const createI18nInstance = (lang) => {## 资源和进一步阅读- [i18next 官方文档](https://www.i18next.com/)-- [lobe-i18n 工具说明](https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n)+- [@lobehub/i18n-cli 工具说明](https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n)通过遵循本指南,你可以更好地理解和参与到 LobeHub 的国际化工作中,为全球用户提供无缝的多语言体验。diff --git a/docs/development/start.mdx b/docs/development/start.mdxindex bbb3c49286a..fff44b8087b 100644--- a/docs/development/start.mdx+++ b/docs/development/start.mdx@@ -38,29 +38,34 @@ The top-level directory structure is as follows:```bashlobehub/-├── apps/desktop/ # Electron desktop app+├── apps/+│ ├── cli/ # LobeHub CLI+│ ├── desktop/ # Electron desktop app+│ └── server/ # Standalone server (tRPC routers, services, modules)├── packages/ # Shared packages (@lobechat/*)│ ├── database/ # Database schemas, models, repositories│ ├── agent-runtime/ # Agent runtime│ ├── model-runtime/ # Model runtime+│ ├── app-config/ # App configuration, client and server env vars+│ ├── env/ # Env var definitions and validation (analytics, auth, LLM, etc.)+│ ├── locales/ # Internationalization default language files+│ ├── builtin-tools/ # Built-in tools registry (inspectors, interventions, etc.)│ └── ... # More shared packages├── src/ # Main application source code-│ ├── app/ # Next.js App Router with route groups and API routes+│ ├── app/ # Next.js App Router: backend API routes + SPA/auth HTML shell serving│ ├── components/ # Reusable UI components-│ ├── config/ # App configuration, client and server env vars│ ├── const/ # Application constants and enums-│ ├── envs/ # Env var definitions and validation (analytics, auth, LLM, etc.)│ ├── features/ # Business feature modules (Agent settings, plugin dev, etc.)│ ├── helpers/ # Utility helper functions│ ├── hooks/ # Reusable custom Hooks│ ├── layout/ # Layout components (AuthProvider, GlobalProvider, etc.)│ ├── libs/ # Third-party integrations (better-auth, OIDC, tRPC, etc.)-│ ├── locales/ # Internationalization language files-│ ├── server/ # Server-side modules, routers, and services+│ ├── routes/ # SPA page segments, grouped by platform ((main)/(mobile)/(desktop)/(popup))+│ ├── server/ # Remaining server-side modules not yet moved to apps/server│ ├── services/ # Client-side service interfaces+│ ├── spa/ # SPA entry points and React Router config│ ├── store/ # Zustand state management│ ├── styles/ # Global styles and CSS-in-JS configurations-│ ├── tools/ # Built-in tools (artifacts, inspectors, interventions, etc.)│ ├── types/ # TypeScript type definitions│ └── utils/ # General utility functions├── locales/ # i18n translation files (zh-CN, en-US, etc.)@@ -93,10 +98,10 @@ For detailed code style and contribution guidelines, please refer to [Code StyleLobeHub uses `react-i18next` for multilingual support,ensuring a global user experience.-Default language files are located in `src/locales/default/`+Default language files are located in `packages/locales/src/default/`(English). Translation files are in the `locales/` directory.During development, you only need to edit keys in-`src/locales/default/` — CI automatically generates+`packages/locales/src/default/` — CI automatically generatestranslation files for other languages.If you want to add a new language, follow specific steps detailed in [New Language Addition Guide](/docs/development/internationalization/add-new-locale). We encourage you to participate in our internationalization efforts to provide better services to global users.diff --git a/docs/development/start.zh-CN.mdx b/docs/development/start.zh-CN.mdxindex 6bed8b6cae6..9e8d4716b57 100644--- a/docs/development/start.zh-CN.mdx+++ b/docs/development/start.zh-CN.mdx@@ -34,29 +34,34 @@ LobeHub 采用 Monorepo 架构(`@lobechat/` 命名空间),顶层目录结```bashlobehub/-├── apps/desktop/ # Electron 桌面应用+├── apps/+│ ├── cli/ # LobeHub CLI+│ ├── desktop/ # Electron 桌面应用+│ └── server/ # 独立服务端(tRPC routers、services、modules)├── packages/ # 共享包(@lobechat/*)│ ├── database/ # 数据库 schemas、models、repositories│ ├── agent-runtime/ # Agent 运行时│ ├── model-runtime/ # 模型运行时+│ ├── app-config/ # 应用配置文件,包含客户端与服务端环境变量+│ ├── env/ # 环境变量定义和校验(分析、认证、LLM 等)+│ ├── locales/ # 国际化默认语言文件+│ ├── builtin-tools/ # 内置工具注册表(inspectors、interventions 等)│ └── ... # 更多共享包├── src/ # 主应用源码-│ ├── app/ # Next.js App Router,包含路由组和 API 路由+│ ├── app/ # Next.js App Router:后端 API 路由 + SPA/认证页 HTML 外壳服务│ ├── components/ # 可复用的 UI 组件-│ ├── config/ # 应用配置文件,包含客户端与服务端环境变量│ ├── const/ # 应用常量和枚举-│ ├── envs/ # 环境变量定义和校验(分析、认证、LLM 等)│ ├── features/ # 业务功能模块,如 Agent 设置、插件开发弹窗等│ ├── helpers/ # 工具辅助函数│ ├── hooks/ # 全应用复用的自定义 Hooks│ ├── layout/ # 布局组件(AuthProvider、GlobalProvider 等)│ ├── libs/ # 第三方集成(better-auth、OIDC、tRPC 等)-│ ├── locales/ # 国际化的语言文件-│ ├── server/ # 服务端模块、路由和服务+│ ├── routes/ # SPA 页面片段,按平台分组((main)/(mobile)/(desktop)/(popup))+│ ├── server/ # 尚未迁移到 apps/server 的剩余服务端模块│ ├── services/ # 客户端服务接口+│ ├── spa/ # SPA 入口和 React Router 配置│ ├── store/ # zustand 状态管理│ ├── styles/ # 全局样式和 CSS-in-JS 配置-│ ├── tools/ # 内置工具(artifacts、inspectors、interventions 等)│ ├── types/ # TypeScript 类型定义│ └── utils/ # 通用工具函数├── locales/ # 国际化翻译文件(zh-CN、en-US 等)@@ -87,9 +92,9 @@ lobehub/LobeHub 采用 `react-i18next` 实现多语言支持,确保用户全球化体验。-默认语言文件位于 `src/locales/default/`(英文),+默认语言文件位于 `packages/locales/src/default/`(英文),翻译文件位于 `locales/` 目录。-开发时只需编辑 `src/locales/default/` 中的 key,+开发时只需编辑 `packages/locales/src/default/` 中的 key,CI 会自动生成其他语言的翻译文件。如果要添加新语种,需遵循特定步骤,详见 [新语种添加指南](/zh/docs/development/internationalization/add-new-locale)。 我们鼓励你参与我们的国际化努力,共同为全球用户提供更好的服务。diff --git a/docs/development/state-management/state-management-intro.mdx b/docs/development/state-management/state-management-intro.mdxindex 06388dbb7e2..2186470996b 100644--- a/docs/development/state-management/state-management-intro.mdx+++ b/docs/development/state-management/state-management-intro.mdx@@ -126,31 +126,30 @@ In the LobeHub application, session management is a complex functional module, s```bashsrc/store/session├── helpers.ts # Helper functions-├── hooks # Custom React hooks-│ ├── index.ts # Export file for hooks-│ ├── useEffectAfterHydrated.ts # Hook for effects after session hydration-│ ├── useOnFinishHydrationSession.ts # Hook for session hydration completion-│ ├── useSessionChatInit.ts # Hook for session chat initialization-│ └── useSessionHydrated.ts # Hook for session hydration status├── index.ts # Aggregated export file for SessionStore├── initialState.ts # Aggregated initialState for all slices├── selectors.ts # Selectors exported from various slices├── slices # Separated functional modules-│ ├── agent # State and operations related to agents-│ │ ├── action.ts # Action definitions related to agents-│ │ ├── index.ts # Entry file for agent slice-│ │ ├── selectors.test.ts # Tests for agent-related selectors-│ │ └── selectors.ts # Selector definitions related to agents-│ └── session # State and operations related to sessions-│ ├── action.test.ts # Tests for session-related actions-│ ├── action.ts # Action definitions related to sessions-│ ├── helpers.ts # Helper functions related to sessions-│ ├── initialState.ts # Initial state for session slice-│ └── selectors # Session-related selectors and their tests-│ ├── export.ts # Aggregated export for session selectors-│ ├── index.ts # Entry file for session selectors-│ ├── list.test.ts # Tests for list selectors-│ └── list.ts # Definitions for list-related selectors+│ ├── session # State and operations related to sessions+│ │ ├── action.test.ts # Tests for session-related actions+│ │ ├── action.ts # Action definitions related to sessions+│ │ ├── helpers.ts # Helper functions related to sessions+│ │ ├── initialState.ts # Initial state for session slice+│ │ ├── reducers.test.ts # Tests for session reducers+│ │ ├── reducers.ts # Reducer definitions for session state+│ │ └── selectors # Session-related selectors and their tests+│ │ ├── index.ts # Entry file for session selectors+│ │ ├── list.test.ts # Tests for list selectors+│ │ ├── list.ts # Definitions for list-related selectors+│ │ ├── meta.test.ts # Tests for meta selectors+│ │ └── meta.ts # Definitions for meta-related selectors+│ └── sessionGroup # State and operations related to session groups+│ ├── action.test.ts # Tests for session group actions+│ ├── action.ts # Action definitions related to session groups+│ ├── initialState.ts # Initial state for session group slice+│ ├── reducer.test.ts # Tests for the session group reducer+│ ├── reducer.ts # Reducer definitions for session group state+│ └── selectors.ts # Selector definitions related to session groups└── store.ts # Creation and usage of SessionStore```@@ -161,62 +160,60 @@ In LobeHub, the SessionStore is designed as the core module for managing session### store.ts```ts-import { PersistOptions, devtools, persist, subscribeWithSelector } from 'zustand/middleware';+import { subscribeWithSelector } from 'zustand/middleware';import { shallow } from 'zustand/shallow';-import { devtools } from 'zustand/middleware';import { createWithEqualityFn } from 'zustand/traditional';+import { type StateCreator } from 'zustand/vanilla';-import { SessionStoreState, initialState } from './initialState';-import { AgentAction, createAgentSlice } from './slices/agent/action';-import { SessionAction, createSessionSlice } from './slices/session/action';+import { isDev } from '@/utils/env';++import { createDevtools } from '../middleware/createDevtools';+import { flattenActions } from '../utils/flattenActions';+import { type SessionStoreState, initialState } from './initialState';+import { type SessionAction, createSessionSlice } from './slices/session/action';+import { type SessionGroupAction, createSessionGroupSlice } from './slices/sessionGroup/action';// =============== Aggregate createStoreFn ============ //-export type SessionStore = SessionAction & AgentAction & SessionStoreState;+export interface SessionStore extends SessionAction, SessionGroupAction, SessionStoreState {}+const createStore: StateCreator<SessionStore, [['zustand/devtools', never]]> = (...parameters) => ({...initialState,- ...createAgentSlice(...parameters),- ...createSessionSlice(...parameters),+ ...flattenActions([createSessionSlice(...parameters), createSessionGroupSlice(...parameters)]),});// =============== Implement useStore ============ //+const devtools = createDevtools('session');export const useSessionStore = createWithEqualityFn<SessionStore>()(- persist(- subscribeWithSelector(- devtools(createStore, {- name: 'LobeHub_Session' + (isDev ? '_DEV' : ''),- }),- ),- persistOptions,+ subscribeWithSelector(+ devtools(createStore, {+ name: 'LobeChat_Session' + (isDev ? '_DEV' : ''),+ }),),shallow,);-```-In this `store.ts` file, we create a `useSessionStore` hook that uses the `zustand` library to create a global state manager. We merge the initialState with the actions from each Slice to create a complete SessionStore.+In this `store.ts` file, we create a `useSessionStore` hook that uses the `zustand` library to create a global state manager. We merge the initialState with the actions from each Slice — via the shared `flattenActions` helper — to create a complete SessionStore. Note there is no `persist` middleware here: SessionStore data is fetched from the server via SWR, not persisted to local storage.### slices/session/action.ts```ts-import { StateCreator } from 'zustand';+import { type SWRResponse } from 'swr';-import { SessionStore } from '@/store/session';+import { type SessionStore } from '@/store/session';+import { type StoreSetter } from '@/store/types';-export interface SessionActions {+export interface SessionAction {/*** A custom hook that uses SWR to fetch sessions data.*/useFetchSessions: () => SWRResponse<any>;}-export const createSessionSlice: StateCreator<- SessionStore,- [['zustand/devtools', never]],- [],- SessionAction-> = (set, get) => ({+type Setter = StoreSetter<SessionStore>;+export const createSessionSlice = (set: Setter, get: () => SessionStore): SessionAction => ({useFetchSessions: () => {// ...logic for initializing sessions},@@ -224,6 +221,6 @@ export const createSessionSlice: StateCreator<});```-In the `action.ts` file, we define a `SessionActions` interface to describe session-related actions and implement a `useFetchSessions` function to create these actions. Then, we merge these actions with the initial state to form the session-related Slice.+In the `action.ts` file, we define a `SessionAction` interface to describe session-related actions and implement a `useFetchSessions` function to create these actions. Then, we merge these actions with the initial state to form the session-related Slice.Through this layered and modular approach, we can ensure that LobeHub's SessionStore is clear, maintainable, and easy to extend and test.diff --git a/docs/development/state-management/state-management-intro.zh-CN.mdx b/docs/development/state-management/state-management-intro.zh-CN.mdxindex 770a969df10..14acdfe9055 100644--- a/docs/development/state-management/state-management-intro.zh-CN.mdx+++ b/docs/development/state-management/state-management-intro.zh-CN.mdx@@ -129,19 +129,26 @@ src/store/session├── store.ts # SessionStore 的创建和使用├── helpers.ts # 辅助函数└── slices # 各个独立的功能切片- ├── agent # 助理 Slice- │ ├── action.ts- │ ├── index.ts- │ └── selectors.ts- └── session # 会话 Slice- ├── action.ts- ├── helpers.ts- ├── initialState.ts- └── selectors- ├── export.ts- ├── list.ts- └── index.ts-+ ├── session # 会话 Slice+ │ ├── action.ts+ │ ├── action.test.ts+ │ ├── helpers.ts+ │ ├── initialState.ts+ │ ├── reducers.ts+ │ ├── reducers.test.ts+ │ └── selectors+ │ ├── index.ts+ │ ├── list.ts+ │ ├── list.test.ts+ │ ├── meta.ts+ │ └── meta.test.ts+ └── sessionGroup # 会话分组 Slice+ ├── action.ts+ ├── action.test.ts+ ├── initialState.ts+ ├── reducer.ts+ ├── reducer.test.ts+ └── selectors.ts```## SessionStore 的实现@@ -151,62 +158,60 @@ src/store/session### store.ts```ts-import { PersistOptions, devtools, persist, subscribeWithSelector } from 'zustand/middleware';+import { subscribeWithSelector } from 'zustand/middleware';import { shallow } from 'zustand/shallow';-import { devtools } from 'zustand/middleware';import { createWithEqualityFn } from 'zustand/traditional';+import { type StateCreator } from 'zustand/vanilla';++import { isDev } from '@/utils/env';-import { SessionStoreState, initialState } from './initialState';-import { AgentAction, createAgentSlice } from './slices/agent/action';-import { SessionAction, createSessionSlice } from './slices/session/action';+import { createDevtools } from '../middleware/createDevtools';+import { flattenActions } from '../utils/flattenActions';+import { type SessionStoreState, initialState } from './initialState';+import { type SessionAction, createSessionSlice } from './slices/session/action';+import { type SessionGroupAction, createSessionGroupSlice } from './slices/sessionGroup/action';// =============== 聚合 createStoreFn ============ //-export type SessionStore = SessionAction & AgentAction & SessionStoreState;+export interface SessionStore extends SessionAction, SessionGroupAction, SessionStoreState {}+const createStore: StateCreator<SessionStore, [['zustand/devtools', never]]> = (...parameters) => ({...initialState,- ...createAgentSlice(...parameters),- ...createSessionSlice(...parameters),+ ...flattenActions([createSessionSlice(...parameters), createSessionGroupSlice(...parameters)]),});// =============== 实装 useStore ============ //+const devtools = createDevtools('session');export const useSessionStore = createWithEqualityFn<SessionStore>()(- persist(- subscribeWithSelector(- devtools(createStore, {- name: 'LobeHub_Session' + (isDev ? '_DEV' : ''),- }),- ),- persistOptions,+ subscribeWithSelector(+ devtools(createStore, {+ name: 'LobeChat_Session' + (isDev ? '_DEV' : ''),+ }),),shallow,);-```-在这个 `store.ts` 文件中,我们创建了一个 `useSessionStore` 钩子,它使用 `zustand` 库来创建一个全局状态管理器。我们将 initialState 和每个 Slice 的动作合并,以创建完整的 SessionStore。+在这个 `store.ts` 文件中,我们创建了一个 `useSessionStore` 钩子,它使用 `zustand` 库来创建一个全局状态管理器。我们通过共享的 `flattenActions` 工具函数,将 initialState 和每个 Slice 的动作合并,以创建完整的 SessionStore。这里没有使用 `persist` 中间件:SessionStore 的数据通过 SWR 从服务端获取,而不是持久化到本地存储。### slices/session/action.ts```ts-import { StateCreator } from 'zustand';+import { type SWRResponse } from 'swr';-import { SessionStore } from '@/store/session';+import { type SessionStore } from '@/store/session';+import { type StoreSetter } from '@/store/types';-export interface SessionActions {+export interface SessionAction {/*** A custom hook that uses SWR to fetch sessions data.*/useFetchSessions: () => SWRResponse<any>;}-export const createSessionSlice: StateCreator<- SessionStore,- [['zustand/devtools', never]],- [],- SessionAction-> = (set, get) => ({+type Setter = StoreSetter<SessionStore>;+export const createSessionSlice = (set: Setter, get: () => SessionStore): SessionAction => ({useFetchSessions: () => {// ...初始化会话的逻辑},@@ -214,6 +219,6 @@ export const createSessionSlice: StateCreator<});```-在 `action.ts` 文件中,我们定义了一个 `SessionActions` 接口来描述会话相关的动作,并且实现了一个 `useFetchSessions` 函数来创建这些动作。然后,我们将这些动作与初始状态合并,以形成会话相关的 Slice。+在 `action.ts` 文件中,我们定义了一个 `SessionAction` 接口来描述会话相关的动作,并且实现了一个 `useFetchSessions` 函数来创建这些动作。然后,我们将这些动作与初始状态合并,以形成会话相关的 Slice。通过这种结构分层和模块化的方法,我们可以确保 LobeHub 的 SessionStore 是清晰、可维护的,同时也便于扩展和测试。diff --git a/docs/development/state-management/state-management-selectors.mdx b/docs/development/state-management/state-management-selectors.mdxindex 2d9403ee234..7441e529a9b 100644--- a/docs/development/state-management/state-management-selectors.mdx+++ b/docs/development/state-management/state-management-selectors.mdx@@ -15,54 +15,59 @@ tags:Selectors are data retrieval modules under the LobeHub data flow development framework. Their role is to extract data from the store using specific business logic for consumption by components.-Taking `src/store/plugin/selectors.ts` as an example:+Taking `src/store/tool/slices/plugin/selectors.ts` as an example:-This TypeScript code snippet defines an object named `pluginSelectors`, which contains a series of selector functions used to retrieve data from the plugin storage state. Selectors are functions that extract and derive data from a Redux store (or similar state management library). This specific example is for managing the state related to the frontend application's plugin system.+This TypeScript code snippet defines an object named `pluginSelectors`, which contains a series of selector functions used to retrieve data from the plugin storage state. Selectors are functions that extract and derive data from a zustand store. This specific example is for managing the state related to the frontend application's plugin system.Here are some key points to note:-- `enabledSchema`: A function that returns an array of `ChatCompletionFunctions` filtered based on the enabled plugin list `enabledPlugins`. It appends the plugin identifier as a prefix to the API names to ensure uniqueness and uses the `uniqBy` function from the es-toolkit library to remove duplicates.-- `onlinePluginStore`: Returns the current online plugin list.-- `pluginList`: Returns the list of plugins, including custom plugins and standard plugins.+- `getCustomPluginById`: Returns the custom plugin based on the plugin ID.+- `getInstalledPluginById`: Returns the installed plugin based on the plugin ID.- `getPluginMetaById`: Returns the plugin metadata based on the plugin ID.-- `getDevPluginById`: Returns information about the custom plugins in development.-- `getPluginManifestById`: Returns the plugin manifest based on the plugin ID.- `getPluginSettingsById`: Returns the plugin settings based on the plugin ID.-- `getPluginManifestLoadingStatus`: Returns the loading status of the plugin manifest (loading, success, or error) based on the plugin ID.-- `isCustomPlugin`: Checks if the plugin with the given ID is a custom plugin.-- `displayPluginList`: Returns a processed plugin list, including author, avatar, creation time, description, homepage URL, identifier, and title.-- `hasPluginUI`: Determines if the plugin has UI components based on the plugin ID.+- `getToolManifestById`: Returns the plugin manifest based on the plugin ID.+- `installedCustomPluginMetaList`: Returns metadata for all installed custom plugins.+- `installedPluginManifestList`: Returns the manifests of all installed plugins.+- `installedPluginMetaList`: Returns a processed metadata list for all installed plugins.+- `installedPlugins`: Returns the list of all installed plugins.+- `isPluginHasUI`: Determines if the plugin has UI components based on the plugin ID.+- `isPluginInstalled`: Checks if the plugin with the given ID is installed.+- `storeAndInstallPluginsIdList`: Returns the identifiers of all installed plugins.Selectors are highly modular and maintainable. By encapsulating complex state selection logic in separate functions, they make the code more concise and intuitive when accessing state data in other parts of the application. Additionally, by using TypeScript, each function can have clear input and output types, which helps improve code reliability and development efficiency.-Taking the `displayPluginList` method as an example, its code is as follows:+Taking the `installedPluginMetaList` method as an example, its code is as follows:```ts-const pluginList = (s: PluginStoreState) => [...s.pluginList, ...s.customPluginList];--const displayPluginList = (s: PluginStoreState) =>- pluginList(s).map((p) => ({- author: p.author,- avatar: p.meta?.avatar,- createAt: p.createAt,- desc: pluginHelpers.getPluginDesc(p.meta),- homepage: p.homepage,- identifier: p.identifier,- title: pluginHelpers.getPluginTitle(p.meta),- }));+const installedPlugins = (s: ToolStoreState) => s.installedPlugins;++const installedPluginMetaList = (s: ToolStoreState) =>+ installedPlugins(s)+ // Filter out Composio plugins (they have their own display location)+ .filter((p) => !p.customParams?.composio)+ .filter((plugin) => isInstalledPluginAvailableInCurrentEnv(plugin))+ .map<InstallPluginMeta>((p) => ({+ author: p.manifest?.author,+ createdAt: p.manifest?.createdAt,+ homepage: p.manifest?.homepage,+ identifier: p.identifier,+ runtimeType: p.runtimeType,+ type: p.source || p.type,+ ...getPluginMetaById(p.identifier)(s),+ }));```-- `pluginList` method: Used to retrieve the list of all plugins from the plugin state storage `PluginStoreState`. It creates a new plugin list by combining two arrays: `pluginList` and `customPluginList`.-- `displayPluginList` method: Calls the `pluginList` method to retrieve the merged plugin list and transforms the `title` and `desc` into text displayed on the UI.+- `installedPlugins` selector: Used to retrieve the raw list of all installed plugins from the tool state storage `ToolStoreState`.+- `installedPluginMetaList` selector: Calls the `installedPlugins` selector, filters out Composio plugins and plugins unavailable in the current environment, and maps the remaining entries into the metadata shape consumed by the UI.In components, the final consumed data can be directly obtained by importing:```tsx | pure-import { usePluginStore } from '@/store/plugin';-import { pluginSelectors } from '@/store/plugin/selectors';+import { useToolStore } from '@/store/tool';+import { pluginSelectors } from '@/store/tool/selectors';-const Render = ({ plugins }) => {- const list = usePluginStore(pluginSelectors.displayPluginList);+const Render = () => {+ const list = useToolStore(pluginSelectors.installedPluginMetaList);return <> ...</>;diff --git a/docs/development/state-management/state-management-selectors.zh-CN.mdx b/docs/development/state-management/state-management-selectors.zh-CN.mdxindex f2e351c9b8e..d1db9982dc5 100644--- a/docs/development/state-management/state-management-selectors.zh-CN.mdx+++ b/docs/development/state-management/state-management-selectors.zh-CN.mdx@@ -21,8 +21,8 @@ selectors 是 LobeHub 数据流研发框架下的取数模块,它的作用是- `getCustomPluginById`: 根据插件 ID 返回自定义插件信息。- `getInstalledPluginById`: 根据插件 ID 返回已安装插件的信息。-- `getPluginManifestById`: 根据插件 ID 返回插件清单。- `getPluginMetaById`: 根据插件 ID 返回插件元数据。+- `getToolManifestById`: 根据插件 ID 返回插件清单。- `getPluginSettingsById`: 根据插件 ID 返回插件设置。- `installedCustomPluginMetaList`: 返回所有已安装的自定义插件的元数据列表。- `installedPluginManifestList`: 返回所有已安装插件的清单列表。diff --git a/docs/development/tests/integration-testing.mdx b/docs/development/tests/integration-testing.mdxindex 7c5edfa1f31..d8668dbbb59 100644--- a/docs/development/tests/integration-testing.mdx+++ b/docs/development/tests/integration-testing.mdx@@ -53,30 +53,32 @@ async create(data) {## Running Integration Tests```bash-# Run all integration tests-pnpm test:integration+# Run all integration tests (server package)+bunx vitest run --dir apps/server# Run a specific test file-pnpm vitest tests/integration/routers/message.integration.test.ts+bunx vitest run apps/server/src/routers/lambda/__tests__/integration/message.integration.test.ts# Watch mode-pnpm vitest tests/integration --watch+bunx vitest --dir apps/server --watch# Generate coverage report-pnpm test:integration --coverage+bunx vitest run --dir apps/server --coverage```## Directory Structure```-tests/integration/+apps/server/src/routers/lambda/__tests__/integration/├── README.md # Integration test documentation├── setup.ts # Common setup and utility functions-└── routers/ # Router layer integration tests- ├── message.integration.test.ts # Message Router tests- ├── session.integration.test.ts # Session Router tests- ├── topic.integration.test.ts # Topic Router tests- └── chat-flow.integration.test.ts # Full chat flow tests+├── message.integration.test.ts # Message Router tests+├── topic.integration.test.ts # Topic Router tests+├── task.integration.test.ts # Task Router tests+└── aiAgent/ # Agent Runtime integration tests+ ├── execAgent.integration.test.ts+ ├── execAgents.integration.test.ts+ └── execGroupAgent.integration.test.ts```## Writing Integration Tests@@ -85,18 +87,17 @@ tests/integration/```typescript// @vitest-environment node+import { type LobeChatDatabase } from '@lobechat/database';+import { messages, sessions, users } from '@lobechat/database/schemas';+import { getTestDB } from '@lobechat/database/test-utils';import { eq } from 'drizzle-orm';import { afterEach, beforeEach, describe, expect, it } from 'vitest';-import { getTestDB } from '@/database/models/__tests__/_util';-import { messages, sessions, users } from '@/database/schemas';-import { LobeHubDatabase } from '@/database/type';-import { messageRouter } from '@/server/routers/lambda/message';--import { cleanupTestUser, createTestContext, createTestUser } from '../setup';+import { messageRouter } from '../../message';+import { cleanupTestUser, createTestContext, createTestUser } from './setup';describe('Your Feature Integration Tests', () => {- let serverDB: LobeHubDatabase;+ let serverDB: LobeChatDatabase;let userId: string;beforeEach(async () => {diff --git a/docs/development/tests/integration-testing.zh-CN.mdx b/docs/development/tests/integration-testing.zh-CN.mdxindex 6f96e13e0ac..38fd462a361 100644--- a/docs/development/tests/integration-testing.zh-CN.mdx+++ b/docs/development/tests/integration-testing.zh-CN.mdx@@ -52,30 +52,32 @@ async create(data) {## 运行集成测试```bash-# 运行所有集成测试-pnpm test:integration+# 运行所有集成测试(server 包)+bunx vitest run --dir apps/server# 运行特定文件-pnpm vitest tests/integration/routers/message.integration.test.ts+bunx vitest run apps/server/src/routers/lambda/__tests__/integration/message.integration.test.ts# 监听模式-pnpm vitest tests/integration --watch+bunx vitest --dir apps/server --watch# 生成覆盖率报告-pnpm test:integration --coverage+bunx vitest run --dir apps/server --coverage```## 目录结构```-tests/integration/+apps/server/src/routers/lambda/__tests__/integration/├── README.md # 集成测试说明├── setup.ts # 通用设置和工具函数-└── routers/ # Router 层集成测试- ├── message.integration.test.ts # Message Router 测试- ├── session.integration.test.ts # Session Router 测试- ├── topic.integration.test.ts # Topic Router 测试- └── chat-flow.integration.test.ts # 完整聊天流程测试+├── message.integration.test.ts # Message Router 测试+├── topic.integration.test.ts # Topic Router 测试+├── task.integration.test.ts # Task Router 测试+└── aiAgent/ # Agent Runtime 集成测试+ ├── execAgent.integration.test.ts+ ├── execAgents.integration.test.ts+ └── execGroupAgent.integration.test.ts```## 编写集成测试@@ -84,18 +86,17 @@ tests/integration/```typescript// @vitest-environment node+import { type LobeChatDatabase } from '@lobechat/database';+import { messages, sessions, users } from '@lobechat/database/schemas';+import { getTestDB } from '@lobechat/database/test-utils';import { eq } from 'drizzle-orm';import { afterEach, beforeEach, describe, expect, it } from 'vitest';-import { getTestDB } from '@/database/models/__tests__/_util';-import { messages, sessions, users } from '@/database/schemas';-import { LobeHubDatabase } from '@/database/type';-import { messageRouter } from '@/server/routers/lambda/message';--import { cleanupTestUser, createTestContext, createTestUser } from '../setup';+import { messageRouter } from '../../message';+import { cleanupTestUser, createTestContext, createTestUser } from './setup';describe('Your Feature Integration Tests', () => {- let serverDB: LobeHubDatabase;+ let serverDB: LobeChatDatabase;let userId: string;beforeEach(async () => {diff --git a/docs/glossary.mdx b/docs/glossary.mdxindex c8fc40a7cb0..5108714c4fb 100644--- a/docs/glossary.mdx+++ b/docs/glossary.mdx@@ -119,7 +119,7 @@ A built-in skill that brings the Getting Things Done method into chat, letting a### Image Generation-A built-in workspace that turns text prompts into images using models such as DALL-E 3 and Flux, with controls for aspect ratio, resolution, quality, and seed. Output is saved to Resources.+A built-in workspace that turns text prompts into images using models such as GPT Image and Flux, with controls for aspect ratio, resolution, quality, and seed. Output is saved to Resources.### Inboxdiff --git a/docs/glossary.zh-CN.mdx b/docs/glossary.zh-CN.mdxindex 21bf10df041..7fd863857a3 100644--- a/docs/glossary.zh-CN.mdx+++ b/docs/glossary.zh-CN.mdx@@ -119,7 +119,7 @@ LobeHub 用于计量 AI 用量的单位。不同模型每次请求消耗的额### Image Generation(图像生成)-内置的文生图工作区,使用 DALL-E 3、Flux 等模型,可调节宽高比、分辨率、质量和种子。生成结果会保存到资源库。+内置的文生图工作区,使用 GPT Image、Flux 等模型,可调节宽高比、分辨率、质量和种子。生成结果会保存到资源库。### Inboxdiff --git a/docs/self-hosting/advanced/desktop.mdx b/docs/self-hosting/advanced/desktop.mdxindex 386dd335f30..206677891ee 100644--- a/docs/self-hosting/advanced/desktop.mdx+++ b/docs/self-hosting/advanced/desktop.mdx@@ -44,19 +44,15 @@ Before connecting the desktop to your self-hosted instance, ensure that your sel#### OIDC Environment Variable Configuration-You need to add the following two environment variables, `ENABLE_OIDC` and `JWKS_KEY`, to your self-hosted instance:--```bash-ENABLE_OIDC=1-```+OIDC is enabled automatically once the `JWKS_KEY` environment variable is configured on your self-hosted instance — there is no separate `ENABLE_OIDC` switch to set.Click the button below to generate `JWKS_KEY`:<GenerateJWKSKey />-Add the generated environment variables to your deployment configuration.+Add the generated environment variable to your deployment configuration.-<Callout>If you have already configured `OIDC_JWKS_KEY`, no changes are needed. The system will automatically fall back to `OIDC_JWKS_KEY` for backward compatibility.</Callout>+<Callout>`OIDC_JWKS_KEY` has been renamed to `JWKS_KEY`. If your deployment still has `OIDC_JWKS_KEY` set, you need to manually rename it to `JWKS_KEY` — there is no automatic fallback.</Callout>If you are deploying LobeHub using one-click deployment methods (such as Vercel, Railway, etc.), you need to:@@ -79,7 +75,7 @@ If you are deploying LobeHub using one-click deployment methods (such as Vercel,**Solution:**-- Confirm that you have correctly set the `ENABLE_OIDC=1` and `JWKS_KEY` environment variables.+- Confirm that you have correctly set the `JWKS_KEY` environment variable.- Ensure that `JWKS_KEY` is in valid JSON format without extra single quotes.- Check your server logs for specific error messages.diff --git a/docs/self-hosting/advanced/desktop.zh-CN.mdx b/docs/self-hosting/advanced/desktop.zh-CN.mdxindex 49e40ac8d02..e56f44e6c00 100644--- a/docs/self-hosting/advanced/desktop.zh-CN.mdx+++ b/docs/self-hosting/advanced/desktop.zh-CN.mdx@@ -42,11 +42,7 @@ LobeHub 桌面端可以与您自托管的 LobeHub 实例连接,以便您可以#### OIDC 环境变量配置-您需要在自托管实例中添加以下`ENABLE_OIDC` 和 `JWKS_KEY` 这两个环境变量:--```bash-ENABLE_OIDC=1-```+只要在自托管实例中配置了 `JWKS_KEY` 环境变量,OIDC 就会自动启用,无需单独设置 `ENABLE_OIDC` 开关。点击下方按钮一键生成 `JWKS_KEY`:@@ -54,7 +50,7 @@ ENABLE_OIDC=1将生成的环境变量添加到您的部署配置中。-<Callout>如果您之前已配置 `OIDC_JWKS_KEY`,无需修改。系统会自动回退使用 `OIDC_JWKS_KEY`(向后兼容)。</Callout>+<Callout>`OIDC_JWKS_KEY` 已改名为 `JWKS_KEY`。如果您的部署中仍配置的是 `OIDC_JWKS_KEY`,需要手动将其重命名为 `JWKS_KEY`—— 系统不会自动回退。</Callout>如果您使用一键部署方式(如 Vercel、Railway 等平台)部署 LobeHub,您需要:@@ -77,7 +73,7 @@ ENABLE_OIDC=1**解决方案:**-- 确认您已经正确设置了 `ENABLE_OIDC=1` 和 `JWKS_KEY` 环境变量+- 确认您已经正确设置了 `JWKS_KEY` 环境变量- 确保 `JWKS_KEY` 是有效的 JSON 格式,没有额外的单引号- 检查您的服务端日志,查看具体错误信息diff --git a/docs/self-hosting/advanced/feature-flags.mdx b/docs/self-hosting/advanced/feature-flags.mdxindex 5ec16b3c060..0e0807e4234 100644--- a/docs/self-hosting/advanced/feature-flags.mdx+++ b/docs/self-hosting/advanced/feature-flags.mdx@@ -32,53 +32,24 @@ You can achieve various feature combinations using the above configuration syntatheir default values).</Callout>-| Configuration Item | Description | Default Value |-| ------------------------- | -------------------------------------------------------------------------------------------------------- | ------------- |-| `check_updates` | Allows checking for updates. | Enabled |-| `pin_list` | Controls pinned agent list display in sidebar. | Disabled |-| `language_model_settings` | Enables language model settings. | Enabled |-| `provider_settings` | Controls model provider settings display. | Enabled |-| `openai_api_key` | Allows users to customize the OpenAI API Key. | Enabled |-| `openai_proxy_url` | Allows users to customize the OpenAI proxy URL. | Enabled |-| `api_key_manage` | Controls access to API key management page (/profile/apikey). | Disabled |-| `create_session` | Allows users to create sessions. | Enabled |-| `edit_agent` | Allows users to edit assistants. | Enabled |-| `plugins` | Controls plugin functionality in chat and agent settings. | Enabled |-| `dalle` | Enables the DALL-E functionality. | Enabled |-| `ai_image` | Controls AI image generation feature and page (/image). | Enabled |-| `speech_to_text` | Enables speech-to-text functionality. | Enabled |-| `token_counter` | Reserved for token counter display. | Enabled |-| `welcome_suggest` | Displays welcome suggestions. | Enabled |-| `changelog` | Controls changelog modal/page display. | Enabled |-| `market` | Enables the assistant market functionality. | Enabled |-| `knowledge_base` | Enables the knowledge base functionality. | Enabled |-| `rag_eval` | Controls RAG evaluation feature (/repos/\[id]/evals). | Disabled |-| `cloud_promotion` | Controls cloud service promotion link display in user menu. | Disabled |-| `commercial_hide_github` | Hides GitHub-related links in settings footer (requires commercial license). | Disabled |-| `commercial_hide_docs` | Hides documentation and help menu including changelog, docs, and feedback (requires commercial license). | Disabled |--You can always check the [featureFlags](https://github.com/lobehub/lobehub/blob/main/src/config/featureFlags/schema.ts) to get the latest list of feature flags.--## Standalone Feature Enable/Disable Variables--In addition to the `FEATURE_FLAGS` system above, LobeHub provides dedicated environment variables to enable or disable specific features that depend on external infrastructure. These are standalone variables (not part of `FEATURE_FLAGS`):--| Environment Variable | Default | Description | Requires |-| ------------------------ | ------- | ---------------------------------------------------------------- | ------------------------ |-| `ENABLED_ARTIFACTS` | `1` | Enable the Artifacts panel (Claude-style code/SVG/React preview) | — |-| `ENABLED_MCP` | `1` | Enable the Model Context Protocol plugin system | — |-| `ENABLED_UPLOAD` | `1` | Enable file upload functionality | S3-compatible storage |-| `ENABLED_KNOWLEDGE_BASE` | `1` | Enable Knowledge Base and RAG features | S3 storage + PostgreSQL |-| `ENABLED_WEB_SEARCH` | `1` | Enable web search integration (online search) | Searxng or search plugin |--Set to `0` to disable. For example, to disable file upload if you haven't configured S3:--```bash-ENABLED_UPLOAD=0-ENABLED_KNOWLEDGE_BASE=0-```--<Callout type={'info'}>- `ENABLED_UPLOAD` and `ENABLED_KNOWLEDGE_BASE` should be disabled if you haven't configured- S3-compatible storage, as file operations will fail without it.-</Callout>+| Configuration Item | Description | Default Value |+| ------------------------ | -------------------------------------------------------------------------------------------------------- | ------------- |+| `check_updates` | Allows checking for updates. | Enabled |+| `provider_settings` | Controls model provider settings display. | Enabled |+| `openai_api_key` | Allows users to customize the OpenAI API Key. | Enabled |+| `openai_proxy_url` | Allows users to customize the OpenAI proxy URL. | Enabled |+| `api_key_manage` | Controls access to API key management page (/profile/apikey). | Disabled |+| `edit_agent` | Allows users to edit assistants. | Enabled |+| `ai_image` | Controls AI image generation feature and page (/image). | Enabled |+| `speech_to_text` | Enables speech-to-text functionality. | Enabled |+| `token_counter` | Reserved for token counter display. | Enabled |+| `welcome_suggest` | Displays welcome suggestions. | Enabled |+| `changelog` | Controls changelog modal/page display. | Enabled |+| `market` | Enables the assistant market functionality. | Enabled |+| `knowledge_base` | Enables the knowledge base functionality. | Enabled |+| `rag_eval` | Controls RAG evaluation feature (/repos/\[id]/evals). | Disabled |+| `cloud_promotion` | Controls cloud service promotion link display in user menu. | Disabled |+| `commercial_hide_github` | Hides GitHub-related links in settings footer (requires commercial license). | Disabled |+| `commercial_hide_docs` | Hides documentation and help menu including changelog, docs, and feedback (requires commercial license). | Disabled |++You can always check the [featureFlags](https://github.com/lobehub/lobehub/blob/main/packages/app-config/src/featureFlags/schema.ts) to get the latest list of feature flags.diff --git a/docs/self-hosting/advanced/feature-flags.zh-CN.mdx b/docs/self-hosting/advanced/feature-flags.zh-CN.mdxindex 146ed791fcf..69c2a647566 100644--- a/docs/self-hosting/advanced/feature-flags.zh-CN.mdx+++ b/docs/self-hosting/advanced/feature-flags.zh-CN.mdx@@ -28,52 +28,24 @@ tags:关键字,你需要手动控制所有的功能标志(否则它们会采用对应的默认值)。</Callout>-| 配置项 | 解释 | 默认值 |-| ------------------------- | ------------------------------------ | --- |-| `check_updates` | 允许检查更新。 | 开启 |-| `pin_list` | 控制侧边栏中置顶助手列表的显示。 | 关闭 |-| `language_model_settings` | 启用语言模型设置。 | 开启 |-| `provider_settings` | 控制模型供应商设置的显示。 | 开启 |-| `openai_api_key` | 允许用户自定义 OpenAI API Key。 | 开启 |-| `openai_proxy_url` | 允许用户自定义 OpenAI 代理 URL。 | 开启 |-| `api_key_manage` | 控制 API 密钥管理页面 (/profile/apikey) 的访问。 | 关闭 |-| `create_session` | 允许用户创建会话。 | 开启 |-| `edit_agent` | 允许用户编辑助手。 | 开启 |-| `plugins` | 控制聊天和助手设置中的插件功能。 | 开启 |-| `dalle` | 启用 DALL-E 功能。 | 开启 |-| `ai_image` | 控制 AI 图像生成功能和页面 (/image)。 | 开启 |-| `speech_to_text` | 启用语音转文本功能。 | 开启 |-| `token_counter` | 保留用于令牌计数器显示。 | 开启 |-| `welcome_suggest` | 显示欢迎建议。 | 开启 |-| `changelog` | 控制更新日志弹窗 / 页面的显示。 | 开启 |-| `market` | 启用助手市场功能。 | 开启 |-| `knowledge_base` | 启用知识库功能。 | 开启 |-| `rag_eval` | 控制 RAG 评估功能 (/repos/\[id]/evals)。 | 关闭 |-| `cloud_promotion` | 控制用户菜单中云服务推广链接的显示。 | 关闭 |-| `commercial_hide_github` | 隐藏设置页面底部的 GitHub 相关链接(需要商业授权)。 | 关闭 |-| `commercial_hide_docs` | 隐藏文档和帮助菜单,包括更新日志、文档和反馈(需要商业授权)。 | 关闭 |--你可以随时检查 [featureFlags](https://github.com/lobehub/lobehub/blob/main/src/config/featureFlags/schema.ts) 以获取最新的特性标志列表。--## 独立功能启用 / 禁用变量--除了上述 `FEATURE_FLAGS` 体系外,LobeHub 还提供了一批独立的环境变量,用于控制依赖外部基础设施的特定功能。这些是独立变量(不属于 `FEATURE_FLAGS`):--| 环境变量 | 默认值 | 说明 | 依赖 |-| ------------------------ | --- | -------------------------------------------- | ------------------ |-| `ENABLED_ARTIFACTS` | `1` | 启用 Artifacts 面板(Claude 风格的代码 / SVG/React 预览) | — |-| `ENABLED_MCP` | `1` | 启用模型上下文协议(MCP)插件系统 | — |-| `ENABLED_UPLOAD` | `1` | 启用文件上传功能 | S3 兼容存储 |-| `ENABLED_KNOWLEDGE_BASE` | `1` | 启用知识库和 RAG 功能 | S3 存储 + PostgreSQL |-| `ENABLED_WEB_SEARCH` | `1` | 启用网络搜索集成(在线搜索) | Searxng 或搜索插件 |--设置为 `0` 可禁用对应功能。例如,若未配置 S3 存储,可禁用文件上传:--```bash-ENABLED_UPLOAD=0-ENABLED_KNOWLEDGE_BASE=0-```--<Callout type={'info'}>- 如果未配置 S3 兼容存储,应将 `ENABLED_UPLOAD` 和 `ENABLED_KNOWLEDGE_BASE` 设为禁用状态,否则文件相关操作将会失败。-</Callout>+| 配置项 | 解释 | 默认值 |+| ------------------------ | ------------------------------------ | --- |+| `check_updates` | 允许检查更新。 | 开启 |+| `provider_settings` | 控制模型供应商设置的显示。 | 开启 |+| `openai_api_key` | 允许用户自定义 OpenAI API Key。 | 开启 |+| `openai_proxy_url` | 允许用户自定义 OpenAI 代理 URL。 | 开启 |+| `api_key_manage` | 控制 API 密钥管理页面 (/profile/apikey) 的访问。 | 关闭 |+| `edit_agent` | 允许用户编辑助手。 | 开启 |+| `ai_image` | 控制 AI 图像生成功能和页面 (/image)。 | 开启 |+| `speech_to_text` | 启用语音转文本功能。 | 开启 |+| `token_counter` | 保留用于令牌计数器显示。 | 开启 |+| `welcome_suggest` | 显示欢迎建议。 | 开启 |+| `changelog` | 控制更新日志弹窗 / 页面的显示。 | 开启 |+| `market` | 启用助手市场功能。 | 开启 |+| `knowledge_base` | 启用知识库功能。 | 开启 |+| `rag_eval` | 控制 RAG 评估功能 (/repos/\[id]/evals)。 | 关闭 |+| `cloud_promotion` | 控制用户菜单中云服务推广链接的显示。 | 关闭 |+| `commercial_hide_github` | 隐藏设置页面底部的 GitHub 相关链接(需要商业授权)。 | 关闭 |+| `commercial_hide_docs` | 隐藏文档和帮助菜单,包括更新日志、文档和反馈(需要商业授权)。 | 关闭 |++你可以随时检查 [featureFlags](https://github.com/lobehub/lobehub/blob/main/packages/app-config/src/featureFlags/schema.ts) 以获取最新的特性标志列表。diff --git a/docs/self-hosting/advanced/knowledge-base.mdx b/docs/self-hosting/advanced/knowledge-base.mdxindex 0795ab41f25..9e0f0cb8011 100644--- a/docs/self-hosting/advanced/knowledge-base.mdx+++ b/docs/self-hosting/advanced/knowledge-base.mdx@@ -71,5 +71,5 @@ By correctly configuring and integrating these core components, you can build a- **Deployment Tip**: Used to configure the default Embedding model```-environment: DEFAULT_FILES_CONFIG=embedding_model=openai/embedding-text-3-small+environment: DEFAULT_FILES_CONFIG=embedding_model=openai/text-embedding-3-small```diff --git a/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx b/docs/self-hosting/advanced/knowledge-base.zh-CN.mdxindex 07f9b103e55..dbb2aaf9864 100644--- a/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx+++ b/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx@@ -68,5 +68,5 @@ Unstructured.io 是一个强大的文档处理工具。- **部署建议**: 使用环境变量配置默认嵌入模型```-environment: DEFAULT_FILES_CONFIG=embedding_model=openai/embedding-text-3-small+environment: DEFAULT_FILES_CONFIG=embedding_model=openai/text-embedding-3-small```diff --git a/docs/self-hosting/advanced/model-list.mdx b/docs/self-hosting/advanced/model-list.mdxindex d706bcfdd4f..66a0458bdce 100644--- a/docs/self-hosting/advanced/model-list.mdx+++ b/docs/self-hosting/advanced/model-list.mdx@@ -20,11 +20,11 @@ You can use `+` to add a model, `-` to hide a model, and use `model name->deployid->deploymentName=displayName<maxToken:vision:reasoning:search:fc:file:imageOutput>,model2,model3```-The deploymentName `->deploymentName` can be omitted, and it defaults to the latest model version. Currently, the model service providers that support `->deploymentName` are: Azure, Volcengine and Qwen.+The deploymentName `->deploymentName` can be omitted, and it defaults to the latest model version. Currently, the model service providers that support `->deploymentName` are: Azure, Azure AI, Qwen, Spark, Volcengine (and its coding plan), and Kimi Coding Plan.-For example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`+For example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-turbo=gpt-4o`-In the above example, it adds `qwen-7b-chat` and `glm-6b` to the model list, removes `gpt-3.5-turbo` from the list, and displays the model name of `gpt-4-0125-preview` as `gpt-4-turbo`. If you want to disable all models first and then enable specific models, you can use `-all,+gpt-3.5-turbo`, which means only enabling `gpt-3.5-turbo`.+In the above example, it adds `qwen-7b-chat` and `glm-6b` to the model list, removes `gpt-3.5-turbo` from the list, and displays the model name of `gpt-4-turbo` as `gpt-4o`. If you want to disable all models first and then enable specific models, you can use `-all,+gpt-3.5-turbo`, which means only enabling `gpt-3.5-turbo`.### -all: Hide all models@@ -32,10 +32,10 @@ In the above example, it adds `qwen-7b-chat` and `glm-6b` to the model list, rem- Example:```text--all,+gpt-3.5-turbo,+gpt-4-0125-preview=gpt-4-turbo+-all,+gpt-3.5-turbo,+gpt-4-turbo=gpt-4o```-This enables only gpt-3.5-turbo and gpt-4-turbo while hiding other models.+This enables only gpt-3.5-turbo and gpt-4-turbo (displayed as gpt-4o) while hiding other models.## Extension Capabilities@@ -51,7 +51,7 @@ Examples are as follows:- `chatglm-6b=ChatGLM 6B<4096>`: ChatGLM 6B, maximum context of 4k, no advanced capabilities;- `spark-v3.5=讯飞星火 v3.5<8192:fc>`: Xunfei Spark 3.5 model, maximum context of 8k, supports Function Call;-- `gemini-1.5-flash-latest=Gemini 1.5 Flash<16000:vision>`: Google Vision model, maximum context of 16k, supports image recognition;+- `gemini-2.5-flash=Gemini 2.5 Flash<16000:vision>`: Google Vision model, maximum context of 16k, supports image recognition;- `o3-mini=OpenAI o3-mini<200000:reasoning:fc>`: OpenAI o3-mini model, maximum context of 200k, supports reasoning and Function Call;- `qwen-max-latest=Qwen Max<32768:search:fc>`: Qwen 2.5 Max model, maximum context of 32k, supports web search and Function Call;- `gpt-4-all=ChatGPT Plus<128000:fc:vision:file>`, hacked version of ChatGPT Plus web, context of 128k, supports image recognition, Function Call, file upload;@@ -66,7 +66,7 @@ Currently supported extension capabilities are:| `imageOutput` | Image Generation || `reasoning` | Support Reasoning || `search` | Support Web Search |-| `video` | Video Comprehension |+| `video` | Video Comprehension || `file` | File Upload (a bit hacky, not recommended for daily use) |## Provider-Specific Examples@@ -99,11 +99,11 @@ OPENAI_MODEL_LIST=-all,+gpt-4o,+gpt-4o-mini# Anthropic — long context backupANTHROPIC_API_KEY=sk-ant-...-ANTHROPIC_MODEL_LIST="+claude-3-opus-20240229=Claude 3 Opus<200000:vision:fc>,+claude-3-5-sonnet-20241022=Claude 3.5 Sonnet<200000:vision:fc"+ANTHROPIC_MODEL_LIST="+claude-opus-4-5-20251101=Claude Opus 4.5<200000:vision:fc>,+claude-sonnet-4-5-20250929=Claude Sonnet 4.5<200000:vision:fc"GOOGLE_API_KEY=...-GOOGLE_MODEL_LIST="+gemini-1.5-pro=Gemini 1.5 Pro<1000000:vision:fc"+GOOGLE_MODEL_LIST="+gemini-2.5-pro=Gemini 2.5 Pro<1000000:vision:fc"```## Best Practicesdiff --git a/docs/self-hosting/advanced/model-list.zh-CN.mdx b/docs/self-hosting/advanced/model-list.zh-CN.mdxindex 3f02f637769..60bd23131ea 100644--- a/docs/self-hosting/advanced/model-list.zh-CN.mdx+++ b/docs/self-hosting/advanced/model-list.zh-CN.mdx@@ -19,11 +19,11 @@ LobeHub 支持在部署时自定义模型列表,详情请参考 [模型提供id->deploymentName=displayName<maxToken:vision:reasoning:search:fc:file:imageOutput>,model2,model3```-部署名`->deploymentName`可以省略,默认为最新版本的模型。当前支持`->deploymentName`的模型服务商有:Azure、Volcengine 和 Qwen。+部署名`->deploymentName`可以省略,默认为最新版本的模型。当前支持`->deploymentName`的模型服务商有:Azure、Azure AI、Qwen、Spark、Volcengine(及其 coding plan)以及 Kimi Coding Plan。-例如: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`+例如: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-turbo=gpt-4o`-上面示例表示增加 `qwen-7b-chat` 和 `glm-6b` 到模型列表,而从列表中删除 `gpt-3.5-turbo`,并将 `gpt-4-0125-preview` 模型名字展示为 `gpt-4-turbo`。如果你想先禁用所有模型,再启用指定模型,可以使用 `-all,+gpt-3.5-turbo`,则表示仅启用 `gpt-3.5-turbo`。+上面示例表示增加 `qwen-7b-chat` 和 `glm-6b` 到模型列表,而从列表中删除 `gpt-3.5-turbo`,并将 `gpt-4-turbo` 模型名字展示为 `gpt-4o`。如果你想先禁用所有模型,再启用指定模型,可以使用 `-all,+gpt-3.5-turbo`,则表示仅启用 `gpt-3.5-turbo`。### -all:隐藏所有模型@@ -31,10 +31,10 @@ id->deploymentName=displayName<maxToken:vision:reasoning:search:fc:file:imageOut- 示例:```text--all,+gpt-3.5-turbo,+gpt-4-0125-preview=gpt-4-turbo+-all,+gpt-3.5-turbo,+gpt-4-turbo=gpt-4o```-仅启用 gpt-3.5-turbo 和 gpt-4-turbo,而其他模型都隐藏。+仅启用 gpt-3.5-turbo 和 gpt-4-turbo(展示名为 gpt-4o),而其他模型都隐藏。## 扩展能力@@ -50,7 +50,7 @@ id->deploymentName=displayName<maxToken:vision:reasoning:search:fc:file:imageOut- `chatglm-6b=ChatGLM 6B<4096>`:ChatGLM 6B,最大上下文 4k,没有高阶能力;- `spark-v3.5=讯飞星火 v3.5<8192:fc>`:讯飞星火 3.5 模型,最大上下文 8k,支持 Function Call;-- `gemini-1.5-flash-latest=Gemini 1.5 Flash<16000:vision>`:Google 视觉模型,最大上下文 16k,支持图像识别;+- `gemini-2.5-flash=Gemini 2.5 Flash<16000:vision>`:Google 视觉模型,最大上下文 16k,支持图像识别;- `o3-mini=OpenAI o3-mini<200000:reasoning:fc>`:OpenAI o3-mini 模型,最大上下文 200k,支持推理及 Function Call;- `qwen-max-latest=Qwen Max<32768:search:fc>`:通义千问 2.5 Max 模型,最大上下文 32k,支持联网搜索及 Function Call;- `gpt-4-all=ChatGPT Plus<128000:fc:vision:file>`,hack 的 ChatGPT Plus 网页版,上下 128k ,支持图像识别、Function Call、文件上传;@@ -65,7 +65,7 @@ id->deploymentName=displayName<maxToken:vision:reasoning:search:fc:file:imageOut| `imageOutput` | 图像生成 || `reasoning` | 支持推理 || `search` | 支持联网搜索 |-| `video` | 视频理解 |+| `video` | 视频理解 || `file` | 文件上传(比较 hack,不建议日常使用) |## 提供商专属示例@@ -98,11 +98,11 @@ OPENAI_MODEL_LIST=-all,+gpt-4o,+gpt-4o-mini# Anthropic — 长上下文备选ANTHROPIC_API_KEY=sk-ant-...-ANTHROPIC_MODEL_LIST="+claude-3-opus-20240229=Claude 3 Opus<200000:vision:fc>,+claude-3-5-sonnet-20241022=Claude 3.5 Sonnet<200000:vision:fc"+ANTHROPIC_MODEL_LIST="+claude-opus-4-5-20251101=Claude Opus 4.5<200000:vision:fc>,+claude-sonnet-4-5-20250929=Claude Sonnet 4.5<200000:vision:fc"GOOGLE_API_KEY=...-GOOGLE_MODEL_LIST="+gemini-1.5-pro=Gemini 1.5 Pro<1000000:vision:fc"+GOOGLE_MODEL_LIST="+gemini-2.5-pro=Gemini 2.5 Pro<1000000:vision:fc"```## 最佳实践diff --git a/docs/self-hosting/advanced/s3.mdx b/docs/self-hosting/advanced/s3.mdxindex d48ea73354e..36f764fa659 100644--- a/docs/self-hosting/advanced/s3.mdx+++ b/docs/self-hosting/advanced/s3.mdx@@ -18,7 +18,7 @@ The best practice in this area is to use a file storage service (S3) to store im<Callout type={'info'}>In this documentation, S3 refers to a compatible S3 storage solution, which supports the Amazon S3API for object storage systems. Common examples include Cloudflare R2, Alibaba Cloud OSS, and- self-deployable Minio, all of which support the S3 compatible API.+ self-deployable RustFS, all of which support the S3 compatible API.</Callout>## Core Environment Variables@@ -48,7 +48,7 @@ The best practice in this area is to use a file storage service (S3) to store im### `S3_SET_ACL`- Whether to set the ACL to `public-read` when uploading files. This option is enabled by default. If the service provider does not support setting individual ACLs for files (i.e., all files inherit the ACL of the storage bucket), enabling this option may cause request errors. Set `S3_SET_ACL` to `0` to disable it.+ Whether to set the ACL to `public-read` when uploading files. This option is disabled by default; the ACL is only set when `S3_SET_ACL` is explicitly configured to `1`. If the service provider does not support setting individual ACLs for files (i.e., all files inherit the ACL of the storage bucket), enabling this option may cause request errors.### `S3_ENABLE_PATH_STYLE`@@ -64,7 +64,7 @@ The best practice in this area is to use a file storage service (S3) to store im</Callout><Callout type={'tip'}>- Common S3 cloud service providers often default to the `virtual-host` mode, while self-deployed services like Minio default to using `path-style`. Therefore, if you use Minio as the S3 service, you need to set `S3_ENABLE_PATH_STYLE=1`.+ Common S3 cloud service providers often default to the `virtual-host` mode, while self-deployed services like RustFS default to using `path-style`. Therefore, if you use RustFS as the S3 service, you need to set `S3_ENABLE_PATH_STYLE=1`.</Callout></Steps>@@ -76,6 +76,8 @@ Currently, the S3 configuration tutorials included in the documentation are:<Card href={'/docs/self-hosting/advanced/s3/cloudflare-r2'} title={'Cloudflare R2'} /><Card href={'/docs/self-hosting/advanced/s3/tencent-cloud'} title={'Tencent Cloud COS'} />++ <Card href={'/docs/self-hosting/advanced/s3/rustfs'} title={'RustFS'} /></Cards>Click to view the tutorial for the corresponding platform. If the above tutorials do not include the S3 service provider you are using, feel free to submit a Pull Request to collectively improve the guide on S3 object storage.diff --git a/docs/self-hosting/advanced/s3.zh-CN.mdx b/docs/self-hosting/advanced/s3.zh-CN.mdxindex 86bd717e427..f75910bc86b 100644--- a/docs/self-hosting/advanced/s3.zh-CN.mdx+++ b/docs/self-hosting/advanced/s3.zh-CN.mdx@@ -16,7 +16,7 @@ LobeHub 在 [很早以前](https://x.com/lobehub/status/1724289575672291782) 就<Callout type={'info'}>在本文档库中,S3 所指代的是指兼容 S3 存储方案,即支持 Amazon S3 API 的对象存储系统,常见例如- Cloudflare R2 、阿里云 OSS,可以自部署的 minio 等均支持 S3 兼容 API。+ Cloudflare R2 、阿里云 OSS,可以自部署的 RustFS 等均支持 S3 兼容 API。</Callout>## 核心环境变量@@ -44,7 +44,7 @@ LobeHub 在 [很早以前](https://x.com/lobehub/status/1724289575672291782) 就### `S3_SET_ACL`- 是否在上传文件时设置 ACL 为 `public-read`。该选项默认启用。如果服务商不支持为文件设置单独的 ACL(即所有文件继承存储桶的 ACL),启用此选项可能会导致请求错误,将 `S3_SET_ACL` 设置为 `0` 即可关闭。+ 是否在上传文件时设置 ACL 为 `public-read`。该选项默认关闭,仅当 `S3_SET_ACL` 显式设置为 `1` 时才会生效。如果服务商不支持为文件设置单独的 ACL(即所有文件继承存储桶的 ACL),启用此选项可能会导致请求错误。### `S3_ENABLE_PATH_STYLE`@@ -60,7 +60,7 @@ LobeHub 在 [很早以前](https://x.com/lobehub/status/1724289575672291782) 就</Callout><Callout type={'tip'}>- 常见的 S3 Cloud 服务商往往默认采用 `virtual-host` 模式,而自部署服务 minio 则默认使用的是 `path-style`。 因此如果你使用了 minio 作为 S3 服务,你需要设置 `S3_ENABLE_PATH_STYLE=1` 。+ 常见的 S3 Cloud 服务商往往默认采用 `virtual-host` 模式,而自部署服务 RustFS 则默认使用的是 `path-style`。 因此如果你使用了 RustFS 作为 S3 服务,你需要设置 `S3_ENABLE_PATH_STYLE=1` 。</Callout></Steps>@@ -72,6 +72,8 @@ LobeHub 在 [很早以前](https://x.com/lobehub/status/1724289575672291782) 就<Card href={'/zh/docs/self-hosting/advanced/s3/cloudflare-r2'} title={'Cloudflare R2'} /><Card href={'/zh/docs/self-hosting/advanced/s3/tencent-cloud'} title={'腾讯云 COS'} />++ <Card href={'/zh/docs/self-hosting/advanced/s3/rustfs'} title={'RustFS'} /></Cards>点击即可查看对应 S3 服务的部署指南,如果上述指南中不包含你所使用的 S3 服务商,欢迎提交 PR ,将共同完善 S3 对象存储的指南。diff --git a/docs/self-hosting/advanced/upstream-sync.mdx b/docs/self-hosting/advanced/upstream-sync.mdxindex cce90a4a53a..573b095f617 100644--- a/docs/self-hosting/advanced/upstream-sync.mdx+++ b/docs/self-hosting/advanced/upstream-sync.mdx@@ -93,7 +93,7 @@ If you wish to automate the above steps, you can follow the method below and use```envOPENAI_API_KEY=sk-xxxxOPENAI_PROXY_URL=https://api-proxy.com/v1- OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision+ OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4.1=gpt-4-turbo,gpt-4o=gpt-4-vision```Then, you can use the following script to automate the update:diff --git a/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx b/docs/self-hosting/advanced/upstream-sync.zh-CN.mdxindex 54a48156471..bea6954a7bd 100644--- a/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx+++ b/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx@@ -88,7 +88,7 @@ Docker 部署版本的升级非常简单,只需要重新部署 LobeHub 的最```envOPENAI_API_KEY=sk-xxxxOPENAI_PROXY_URL=https://api-proxy.com/v1- OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision+ OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4.1=gpt-4-turbo,gpt-4o=gpt-4-vision```然后,你可以使用以下脚本来自动更新:diff --git a/docs/self-hosting/auth.mdx b/docs/self-hosting/auth.mdxindex e4050b5e8f9..dec97cc38f1 100644--- a/docs/self-hosting/auth.mdx+++ b/docs/self-hosting/auth.mdx@@ -30,11 +30,12 @@ LobeHub supports the configuration of external authentication services using BetTo enable Better Auth in LobeHub, set the following environment variables:-| Environment Variable | Type | Description |-| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| `AUTH_SECRET` | Required | Key used to encrypt session tokens. Generate using: `openssl rand -base64 32` |-| `NEXT_PUBLIC_AUTH_URL` | Required | The browser-accessible base URL for Better Auth (e.g., `http://localhost:3010`, `https://LobeHub.com`). Optional for Vercel deployments (auto-detected from `VERCEL_URL`) |-| `AUTH_SSO_PROVIDERS` | Optional | Comma-separated list of enabled SSO providers, e.g., `google,github,microsoft` |+| Environment Variable | Type | Description |+| ---------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `AUTH_SECRET` | Required | Key used to encrypt session tokens. Generate using: `openssl rand -base64 32` |+| `APP_URL` | Required | Public base URL of this LobeHub instance (e.g. `https://lobe.example.com`). Better Auth uses it as `baseURL` for OAuth callbacks and trusted origins. On Vercel it can fall back to `VERCEL_*` URLs when unset; elsewhere omitting it defaults to `http://localhost:<PORT>` and breaks public-domain SSO. |+| `NEXT_PUBLIC_AUTH_URL` | Deprecated | Removed NextAuth/browser auth URL. Setting this variable will cause the deployment to fail — use `APP_URL` instead. |+| `AUTH_SSO_PROVIDERS` | Optional | Comma-separated list of enabled SSO providers, e.g., `google,github,microsoft` |## Supported SSO Providersdiff --git a/docs/self-hosting/auth.zh-CN.mdx b/docs/self-hosting/auth.zh-CN.mdxindex 9dcd1b787c9..232be358dc8 100644--- a/docs/self-hosting/auth.zh-CN.mdx+++ b/docs/self-hosting/auth.zh-CN.mdx@@ -28,11 +28,12 @@ LobeHub 支持使用 Better Auth 配置外部身份验证服务,供企业 /要在 LobeHub 中启用 Better Auth,请设置以下环境变量:-| 环境变量 | 类型 | 描述 |-| ---------------------- | -- | --------------------------------------------------------------------------------------------------------------- |-| `AUTH_SECRET` | 必选 | 用于加密会话令牌的密钥。使用以下命令生成:`openssl rand -base64 32` |-| `NEXT_PUBLIC_AUTH_URL` | 必选 | 浏览器可访问的 Better Auth 基础 URL(例如 `http://localhost:3010`、`https://LobeHub.com`)。Vercel 部署时可选(会自动从 `VERCEL_URL` 获取) |-| `AUTH_SSO_PROVIDERS` | 可选 | 启用的 SSO 提供商列表,以逗号分隔,例如 `google,github,microsoft` |+| 环境变量 | 类型 | 描述 |+| ---------------------- | --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `AUTH_SECRET` | 必选 | 用于加密会话令牌的密钥。使用以下命令生成:`openssl rand -base64 32` |+| `APP_URL` | 必选 | 本实例的公网访问地址(例如 `https://lobe.example.com`)。Better Auth 将其作为 `baseURL` 生成 OAuth 回调与 trusted origins。Vercel 上未设置时可回退到 `VERCEL_*`;其他环境若省略会默认 `http://localhost:<PORT>`,导致公网域名 SSO 失败。 |+| `NEXT_PUBLIC_AUTH_URL` | 已废弃 | 已移除的 NextAuth / 浏览器认证 URL。设置该变量会导致部署失败,请改用 `APP_URL`。 |+| `AUTH_SSO_PROVIDERS` | 可选 | 启用的 SSO 提供商列表,以逗号分隔,例如 `google,github,microsoft` |## 支持的 SSO 提供商diff --git a/docs/self-hosting/auth/clerk.mdx b/docs/self-hosting/auth/clerk.mdxindex aebf3a5d8ac..7c3dec83800 100644--- a/docs/self-hosting/auth/clerk.mdx+++ b/docs/self-hosting/auth/clerk.mdx@@ -11,6 +11,10 @@ tags:# Configure Clerk Authentication Service+<Callout type={'warning'}>+ Clerk has been fully removed from LobeHub. Setting any `CLERK_*` environment variable will cause the deployment to fail at build/startup. This page is kept for historical reference only — please follow the [Clerk to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/clerk-to-betterauth).+</Callout>+Go to [Clerk](https://clerk.com?utm_source=lobehub\&utm_medium=docs) to register and create an application to obtain the corresponding Public Key and Secret Key.## Get Environment Variablesdiff --git a/docs/self-hosting/auth/clerk.zh-CN.mdx b/docs/self-hosting/auth/clerk.zh-CN.mdxindex f323fdc4023..29239800eef 100644--- a/docs/self-hosting/auth/clerk.zh-CN.mdx+++ b/docs/self-hosting/auth/clerk.zh-CN.mdx@@ -10,6 +10,10 @@ tags:# 配置 Clerk 身份验证服务+<Callout type={'warning'}>+ Clerk 已从 LobeHub 中完全移除。设置任何 `CLERK_*` 环境变量都会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Clerk 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/clerk-to-betterauth)。+</Callout>+前往 [Clerk](https://clerk.com?utm_source=lobehub\&utm_medium=docs) 注册并创建应用,获取相应的 Public Key 和 Secret Key。## 获取环境变量diff --git a/docs/self-hosting/auth/legacy.mdx b/docs/self-hosting/auth/legacy.mdxindex 1b773931150..e5cec29f86f 100644--- a/docs/self-hosting/auth/legacy.mdx+++ b/docs/self-hosting/auth/legacy.mdx@@ -1,8 +1,8 @@---title: Legacy Authentication (NextAuth & Clerk)description: >-- Documentation for legacy authentication methods including NextAuth and Clerk.- For new deployments, we recommend using Better Auth.+ Historical reference for legacy authentication methods NextAuth and Clerk,+ both of which have been removed from LobeHub. Use Better Auth instead.tags:- Authentication Service- Next Auth@@ -13,10 +13,10 @@ tags:# Legacy Authentication<Callout type={'warning'}>- **Legacy Notice**: NextAuth and Clerk are legacy authentication methods. For new deployments, we strongly recommend using [Better Auth](/docs/self-hosting/auth) for its simplicity and flexibility.+ **Legacy Notice**: NextAuth and Clerk have been fully removed from LobeHub. Setting removed NextAuth/Clerk variables (`NEXT_AUTH*` / `NEXTAUTH*`, Clerk keys, `AUTH_URL`, `NEXT_PUBLIC_AUTH_URL`, `ACCESS_CODE`, etc.) fails the deployment at build/startup. **`AUTH_SECRET` is not deprecated** — it is still required by [Better Auth](/docs/self-hosting/auth). This page is historical migration reference only.</Callout>-This page documents the legacy authentication methods (NextAuth and Clerk) for users who are still using these services.+This page documents the legacy authentication methods (NextAuth and Clerk), which have been removed from LobeHub, for historical migration reference only.## Clerk@@ -42,13 +42,13 @@ By setting the environment variables `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLBefore using NextAuth, please set the following variables in LobeHub's environment variables:-| Environment Variable | Type | Description |-| -------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| `NEXT_PUBLIC_ENABLE_NEXT_AUTH` | Required | This is used to enable the NextAuth service. Set it to `1` to enable it; changing this setting requires recompiling the application. Users deploying with the `lobehub/lobehub` image have this configuration added by default. |-| `AUTH_SECRET` | Required | The key used to encrypt Auth.js session tokens. You can use the following command: `openssl rand -base64 32`, or visit `https://generate-secret.vercel.app/32` to generate the key. |-| `AUTH_URL` | Required | This URL specifies the callback address for Auth.js when performing OAuth verification. Set this only if the default generated redirect address is incorrect. `https://example.com/api/auth` |-| `NEXT_AUTH_SSO_PROVIDERS` | Optional | This environment variable is used to enable multiple identity verification sources simultaneously, separated by commas, for example, `auth0,microsoft-entra-id,authentik`. |-| `NEXT_AUTH_SSO_SESSION_STRATEGY` | Optional | The session strategy for Auth.js. Options are `jwt` or `database`. Default is `jwt`. |+| Environment Variable | Type | Description |+| -------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| `NEXT_PUBLIC_ENABLE_NEXT_AUTH` | *(Deprecated)* | Used to enable the NextAuth service. NextAuth has been removed from LobeHub — setting this variable will cause the deployment to fail at build/startup. |+| `AUTH_SECRET` | Required (Better Auth) | Still required by Better Auth (not a removed NextAuth-only var). Session encryption secret — generate with `openssl rand -base64 32` or `https://generate-secret.vercel.app/32`. See [Better Auth](/docs/self-hosting/auth). |+| `AUTH_URL` | *(Deprecated)* | Previously specified the callback address for Auth.js when performing OAuth verification. Setting this variable will now cause the deployment to fail at build/startup. |+| `NEXT_AUTH_SSO_PROVIDERS` | *(Deprecated)* | Previously used to enable multiple identity verification sources simultaneously, separated by commas, e.g. `auth0,microsoft-entra-id,authentik`. Setting this variable will now cause the deployment to fail at build/startup. |+| `NEXT_AUTH_SSO_SESSION_STRATEGY` | *(Deprecated)* | The session strategy for Auth.js. Setting this variable will now cause the deployment to fail at build/startup. |Currently supported identity verification services include:diff --git a/docs/self-hosting/auth/legacy.zh-CN.mdx b/docs/self-hosting/auth/legacy.zh-CN.mdxindex 55ca792a7b3..10e2839029b 100644--- a/docs/self-hosting/auth/legacy.zh-CN.mdx+++ b/docs/self-hosting/auth/legacy.zh-CN.mdx@@ -1,6 +1,6 @@---title: 旧版身份验证(NextAuth 和 Clerk)-description: 关于 NextAuth 和 Clerk 等旧版身份验证方法的文档。对于新部署,我们建议使用 Better Auth。+description: NextAuth 和 Clerk 这两种旧版身份验证方法的历史参考文档,二者均已从 LobeHub 移除,请改用 Better Auth。tags:- 身份验证服务- Next Auth@@ -11,10 +11,10 @@ tags:# 旧版身份验证<Callout type={'warning'}>- **旧版提示**:NextAuth 和 Clerk 是旧版身份验证方案。对于新部署,我们强烈建议使用 [Better Auth](/zh/docs/self-hosting/auth),它更简洁、更灵活。+ **旧版提示**:NextAuth 和 Clerk 已从 LobeHub 中完全移除。设置已移除的 NextAuth/Clerk 变量(`NEXT_AUTH*` / `NEXTAUTH*`、Clerk 密钥、`AUTH_URL`、`NEXT_PUBLIC_AUTH_URL`、`ACCESS_CODE` 等)会在构建 / 启动阶段失败。**`AUTH_SECRET` 并未废弃**,[Better Auth](/zh/docs/self-hosting/auth) 仍需要它。本页仅供历史迁移参考。</Callout>-本页面为仍在使用这些服务的用户提供旧版身份验证方案(NextAuth 和 Clerk)的文档。+以下认证方式(NextAuth、Clerk)已从 LobeHub 移除。已废弃的 NextAuth/Clerk 变量会导致部署失败;`AUTH_SECRET` 仍由 Better Auth 使用。本页面仅供历史迁移参考。## Clerk@@ -40,13 +40,13 @@ LobeHub 与 Clerk 做了深度集成,能够为用户提供安全、便捷的在使用 NextAuth 之前,请先在 LobeHub 的环境变量中设置以下变量:-| 环境变量 | 类型 | 描述 |-| -------------------------------- | -- | ------------------------------------------------------------------------------------------------------------ |-| `NEXT_PUBLIC_ENABLE_NEXT_AUTH` | 必选 | 用于启用 NextAuth 服务,设置为 `1` 以启用,更改此项需要重新编译应用。使用 `lobehub/lobehub` 镜像部署的用户已经默认添加了该项配置。 |-| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令: `openssl rand -base64 32`,或者访问 `https://generate-secret.vercel.app/32` 生成秘钥。 |-| `AUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |-| `NEXT_AUTH_SSO_PROVIDERS` | 可选 | 该环境变量用于同时启用多个身份验证源,以逗号 `,` 分割,例如 `auth0,microsoft-entra-id,authentik`。 |-| `NEXT_AUTH_SSO_SESSION_STRATEGY` | 可选 | Auth.js 的会话策略。选项为 `jwt` 或 `database`。默认值为 `jwt`。 |+| 环境变量 | 类型 | 描述 |+| -------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------ |+| `NEXT_PUBLIC_ENABLE_NEXT_AUTH` | *(已废弃)* | 用于启用 NextAuth 服务。NextAuth 已从 LobeHub 中移除,设置该变量会导致部署在构建 / 启动阶段失败。 |+| `NEXT_AUTH_SECRET` | *(已废弃)* | 旧版 NextAuth 密钥名。设置该变量会导致部署在构建 / 启动阶段失败。请改用 Better Auth 仍在使用的 `AUTH_SECRET`(见 [Better Auth](/zh/docs/self-hosting/auth))。 |+| `AUTH_URL` | *(已废弃)* | 曾用于指定 Auth.js 在执行 OAuth 验证时的回调地址。设置该变量会导致部署在构建 / 启动阶段失败。 |+| `NEXT_AUTH_SSO_PROVIDERS` | *(已废弃)* | 曾用于同时启用多个身份验证源,以逗号 `,` 分割,例如 `auth0,microsoft-entra-id,authentik`。设置该变量会导致部署在构建 / 启动阶段失败。 |+| `NEXT_AUTH_SSO_SESSION_STRATEGY` | *(已废弃)* | Auth.js 的会话策略。设置该变量会导致部署在构建 / 启动阶段失败。 |目前支持的身份验证服务有:diff --git a/docs/self-hosting/auth/next-auth/auth0.mdx b/docs/self-hosting/auth/next-auth/auth0.mdxindex 7287d3a03b1..4b1f3d1798d 100644--- a/docs/self-hosting/auth/next-auth/auth0.mdx+++ b/docs/self-hosting/auth/next-auth/auth0.mdx@@ -16,6 +16,10 @@ tags:# Configure Auth0 Identity Verification Service+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+<Steps>### Create Auth0 Applicationdiff --git a/docs/self-hosting/auth/next-auth/auth0.zh-CN.mdx b/docs/self-hosting/auth/next-auth/auth0.zh-CN.mdxindex 37c13003ffc..192081d12f0 100644--- a/docs/self-hosting/auth/next-auth/auth0.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/auth0.zh-CN.mdx@@ -12,6 +12,10 @@ tags:# 配置 Auth0 身份验证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+<Steps>### 创建 Auth0 应用diff --git a/docs/self-hosting/auth/next-auth/authelia.mdx b/docs/self-hosting/auth/next-auth/authelia.mdxindex 0895883a63e..05bfef494b5 100644--- a/docs/self-hosting/auth/next-auth/authelia.mdx+++ b/docs/self-hosting/auth/next-auth/authelia.mdx@@ -14,6 +14,10 @@ tags:## Configuring Authelia Authentication Service+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+## Authelia Configuration Flow<Steps>diff --git a/docs/self-hosting/auth/next-auth/authelia.zh-CN.mdx b/docs/self-hosting/auth/next-auth/authelia.zh-CN.mdxindex 4ba67e2ebfe..7820a1fa60b 100644--- a/docs/self-hosting/auth/next-auth/authelia.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/authelia.zh-CN.mdx@@ -11,6 +11,10 @@ tags:# 配置 Authelia 身份验证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+## Authelia 配置流程<Steps>diff --git a/docs/self-hosting/auth/next-auth/authentik.mdx b/docs/self-hosting/auth/next-auth/authentik.mdxindex fd85b55f52c..4771a9de0e9 100644--- a/docs/self-hosting/auth/next-auth/authentik.mdx+++ b/docs/self-hosting/auth/next-auth/authentik.mdx@@ -14,6 +14,10 @@ tags:## Configuring Authentik Authentication Service+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+## Authentik Configuration Flow<Steps>diff --git a/docs/self-hosting/auth/next-auth/authentik.zh-CN.mdx b/docs/self-hosting/auth/next-auth/authentik.zh-CN.mdxindex 4f3fce04253..9cd7863bc70 100644--- a/docs/self-hosting/auth/next-auth/authentik.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/authentik.zh-CN.mdx@@ -11,6 +11,10 @@ tags:# 配置 Authentik 身份验证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+## Authentik 配置流程<Steps>diff --git a/docs/self-hosting/auth/next-auth/casdoor.mdx b/docs/self-hosting/auth/next-auth/casdoor.mdxindex 55b09678db8..9bb9afdec3a 100644--- a/docs/self-hosting/auth/next-auth/casdoor.mdx+++ b/docs/self-hosting/auth/next-auth/casdoor.mdx@@ -13,6 +13,10 @@ tags:# Configuring Casdoor Authentication Service+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+[Casdoor](https://github.com/casdoor/casdoor) is an open-source authentication service that is rich in features and easy to use.<Callout type={'tip'}>diff --git a/docs/self-hosting/auth/next-auth/casdoor.zh-CN.mdx b/docs/self-hosting/auth/next-auth/casdoor.zh-CN.mdxindex c558df863b9..0b7780b87a1 100644--- a/docs/self-hosting/auth/next-auth/casdoor.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/casdoor.zh-CN.mdx@@ -10,6 +10,10 @@ tags:# 配置 Casdoor 身份验证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+[Casdoor](https://github.com/casdoor/casdoor) 是一个开源的身份验证服务,功能配置丰富且易于上手。<Callout type={'tip'}>diff --git a/docs/self-hosting/auth/next-auth/cloudflare-zero-trust.mdx b/docs/self-hosting/auth/next-auth/cloudflare-zero-trust.mdxindex 42ef30f3bbf..69ff941439b 100644--- a/docs/self-hosting/auth/next-auth/cloudflare-zero-trust.mdx+++ b/docs/self-hosting/auth/next-auth/cloudflare-zero-trust.mdx@@ -14,6 +14,10 @@ tags:# Configuring Cloudflare Zero Trust Authentication Service+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+## Cloudflare Zero Trust Configuration Flow<Steps>diff --git a/docs/self-hosting/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx b/docs/self-hosting/auth/next-auth/cloudflare-zero-trust.zh-CN.mdxindex 8a3be4d11c0..84b3211c6e3 100644--- a/docs/self-hosting/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx@@ -13,6 +13,10 @@ tags:# 配置 Cloudflare Zero Trust 身份验证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+## Cloudflare Zero Trust 配置流程<Steps>diff --git a/docs/self-hosting/auth/next-auth/github.mdx b/docs/self-hosting/auth/next-auth/github.mdxindex 717463fe491..0b3436733cd 100644--- a/docs/self-hosting/auth/next-auth/github.mdx+++ b/docs/self-hosting/auth/next-auth/github.mdx@@ -14,6 +14,10 @@ tags:# Configuring Github Authentication Service+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+## Github Configuration Process<Steps>diff --git a/docs/self-hosting/auth/next-auth/github.zh-CN.mdx b/docs/self-hosting/auth/next-auth/github.zh-CN.mdxindex b8d98e80033..ea5f077f045 100644--- a/docs/self-hosting/auth/next-auth/github.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/github.zh-CN.mdx@@ -11,6 +11,10 @@ tags:# 配置 Github 身份验证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+## Github 配置流程<Steps>diff --git a/docs/self-hosting/auth/next-auth/google.mdx b/docs/self-hosting/auth/next-auth/google.mdxindex ee236122995..7db94e124c0 100644--- a/docs/self-hosting/auth/next-auth/google.mdx+++ b/docs/self-hosting/auth/next-auth/google.mdx@@ -14,6 +14,10 @@ tags:# Configuration of Google SSO Authentication Service+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+<Steps>### Create a Google Cloud OAuth 2.0 Clientdiff --git a/docs/self-hosting/auth/next-auth/google.zh-CN.mdx b/docs/self-hosting/auth/next-auth/google.zh-CN.mdxindex 34e40f98d8f..1b202df06dd 100644--- a/docs/self-hosting/auth/next-auth/google.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/google.zh-CN.mdx@@ -10,6 +10,10 @@ tags:# 配置 Google SSO 认证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+<Steps>### 创建 Google Cloud OAuth 2.0 客户端diff --git a/docs/self-hosting/auth/next-auth/keycloak.mdx b/docs/self-hosting/auth/next-auth/keycloak.mdxindex b7820eb2281..2c9f2185ab3 100644--- a/docs/self-hosting/auth/next-auth/keycloak.mdx+++ b/docs/self-hosting/auth/next-auth/keycloak.mdx@@ -13,6 +13,10 @@ tags:# Configuring Keycloak Authentication Service in LobeHub+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+[Keycloak](https://www.keycloak.org/) is an open-source identity and access management solution that provides single sign-on, identity brokering, and social login features, suitable for modern applications and services.<Callout type={'tip'}>diff --git a/docs/self-hosting/auth/next-auth/keycloak.zh-CN.mdx b/docs/self-hosting/auth/next-auth/keycloak.zh-CN.mdxindex 0fd82118d39..dd6afde3bcf 100644--- a/docs/self-hosting/auth/next-auth/keycloak.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/keycloak.zh-CN.mdx@@ -10,6 +10,10 @@ tags:# 配置 Keycloak 身份验证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+[Keycloak](https://www.keycloak.org/) 是一个开源的身份和访问管理解决方案,提供单点登录、身份代理和社交登录等功能,适用于现代应用和服务。<Callout type={'tip'}>diff --git a/docs/self-hosting/auth/next-auth/logto.mdx b/docs/self-hosting/auth/next-auth/logto.mdxindex ce55e0a80ee..b583c659083 100644--- a/docs/self-hosting/auth/next-auth/logto.mdx+++ b/docs/self-hosting/auth/next-auth/logto.mdx@@ -12,6 +12,10 @@ tags:# Configuring Logto Authentication Service+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+[Logto](https://github.com/logto-io/logto) is an open-source authentication service with a simple and beautiful interface, rich in features and easy to use. You can choose to use the official Logto Cloud or opt for a private deployment of Logto.<Callout type={'tip'}>diff --git a/docs/self-hosting/auth/next-auth/logto.zh-CN.mdx b/docs/self-hosting/auth/next-auth/logto.zh-CN.mdxindex d8cd50f655c..23d87be597c 100644--- a/docs/self-hosting/auth/next-auth/logto.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/logto.zh-CN.mdx@@ -10,6 +10,10 @@ tags:# 配置 Logto 身份验证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+[Logto](https://github.com/logto-io/logto) 是一个开源的身份验证服务,界面简洁美观、功能配置丰富且易于上手,你即可以选择使用其官方提供的 Logto Cloud,也可以选择私有部署 Logto。<Callout type={'tip'}>diff --git a/docs/self-hosting/auth/next-auth/microsoft-entra-id.mdx b/docs/self-hosting/auth/next-auth/microsoft-entra-id.mdxindex 280c280fc09..bbc414de240 100644--- a/docs/self-hosting/auth/next-auth/microsoft-entra-id.mdx+++ b/docs/self-hosting/auth/next-auth/microsoft-entra-id.mdx@@ -15,6 +15,10 @@ tags:# Configuration of Microsoft Entra ID Authentication Service+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+<Steps>### Create a Microsoft Entra ID Applicationdiff --git a/docs/self-hosting/auth/next-auth/microsoft-entra-id.zh-CN.mdx b/docs/self-hosting/auth/next-auth/microsoft-entra-id.zh-CN.mdxindex 2a3774f6eb8..e4ccafba5c4 100644--- a/docs/self-hosting/auth/next-auth/microsoft-entra-id.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/microsoft-entra-id.zh-CN.mdx@@ -12,6 +12,10 @@ tags:# 配置 Microsoft Entra ID 身份验证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+## Microsoft Entra ID 配置流程<Steps>diff --git a/docs/self-hosting/auth/next-auth/okta.mdx b/docs/self-hosting/auth/next-auth/okta.mdxindex 5a8d86601d1..f8e98c3ca90 100644--- a/docs/self-hosting/auth/next-auth/okta.mdx+++ b/docs/self-hosting/auth/next-auth/okta.mdx@@ -16,6 +16,10 @@ tags:# Configure Okta Identity Verification Service+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+<Steps>### Create Okta Applicationdiff --git a/docs/self-hosting/auth/next-auth/okta.zh-CN.mdx b/docs/self-hosting/auth/next-auth/okta.zh-CN.mdxindex 58fe854b993..9ca8473adc7 100644--- a/docs/self-hosting/auth/next-auth/okta.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/okta.zh-CN.mdx@@ -13,6 +13,10 @@ tags:# 配置 Okta 身份验证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+<Steps>### 创建 Okta 应用程序diff --git a/docs/self-hosting/auth/next-auth/wechat.mdx b/docs/self-hosting/auth/next-auth/wechat.mdxindex 5879ff00f7c..722b2c5acca 100644--- a/docs/self-hosting/auth/next-auth/wechat.mdx+++ b/docs/self-hosting/auth/next-auth/wechat.mdx@@ -13,6 +13,10 @@ tags:# Configure Wechat Authentication Service+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+## Wechat Configuration Process<Steps>diff --git a/docs/self-hosting/auth/next-auth/wechat.zh-CN.mdx b/docs/self-hosting/auth/next-auth/wechat.zh-CN.mdxindex ec3c50898cd..3247ea472b5 100644--- a/docs/self-hosting/auth/next-auth/wechat.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/wechat.zh-CN.mdx@@ -11,6 +11,10 @@ tags:# 配置微信身份验证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+## 微信配置流程<Steps>diff --git a/docs/self-hosting/auth/next-auth/zitadel.mdx b/docs/self-hosting/auth/next-auth/zitadel.mdxindex ada3a577d75..512e9a16613 100644--- a/docs/self-hosting/auth/next-auth/zitadel.mdx+++ b/docs/self-hosting/auth/next-auth/zitadel.mdx@@ -14,6 +14,10 @@ tags:# Configure ZITADEL Authentication Service+<Callout type={'warning'}>+ NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.+</Callout>+<Steps>### Create ZITADEL Applicationdiff --git a/docs/self-hosting/auth/next-auth/zitadel.zh-CN.mdx b/docs/self-hosting/auth/next-auth/zitadel.zh-CN.mdxindex 3b6a4ede2f3..6412c988b04 100644--- a/docs/self-hosting/auth/next-auth/zitadel.zh-CN.mdx+++ b/docs/self-hosting/auth/next-auth/zitadel.zh-CN.mdx@@ -11,6 +11,10 @@ tags:# 配置 ZITADEL 身份验证服务+<Callout type={'warning'}>+ NextAuth(Auth.js)已从 LobeHub 中完全移除。下文出现的 `NEXT_AUTH_SSO_PROVIDERS` 和 `AUTH_URL` 等变量现在会导致部署在构建 / 启动阶段失败。本页仅作历史参考保留,请改用 [Better Auth 提供商指南](/zh/docs/self-hosting/auth) 和 [NextAuth 迁移至 Better Auth 指南](/zh/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth)。+</Callout>+<Steps>### 创建 ZITADEL 应用diff --git a/docs/self-hosting/auth/providers/microsoft.mdx b/docs/self-hosting/auth/providers/microsoft.mdxindex 1116ab49d48..6be2b952845 100644--- a/docs/self-hosting/auth/providers/microsoft.mdx+++ b/docs/self-hosting/auth/providers/microsoft.mdx@@ -79,9 +79,11 @@ tags:| `AUTH_MICROSOFT_AUTHORITY_URL` | Optional | Authority URL for Microsoft Entra ID || `AUTH_MICROSOFT_TENANT_ID` | Optional | Directory (tenant) ID for single-tenant apps |- <Callout type={'info'}>- **Alternative Environment Variables**: For backward compatibility, these- aliases are also supported:+ <Callout type={'warning'}>+ **Deprecated Environment Variables**: The following legacy variable names+ are no longer supported. Setting any of them will cause the deployment to+ fail at build/startup — use `AUTH_MICROSOFT_ID` / `AUTH_MICROSOFT_SECRET` /+ `AUTH_MICROSOFT_TENANT_ID` instead:- `AUTH_MICROSOFT_ENTRA_ID_ID` / `AUTH_MICROSOFT_ENTRA_ID_SECRET`- `AUTH_AZURE_AD_ID` / `AUTH_AZURE_AD_SECRET`diff --git a/docs/self-hosting/auth/providers/microsoft.zh-CN.mdx b/docs/self-hosting/auth/providers/microsoft.zh-CN.mdxindex 0c0e1373b71..d86677dda5f 100644--- a/docs/self-hosting/auth/providers/microsoft.zh-CN.mdx+++ b/docs/self-hosting/auth/providers/microsoft.zh-CN.mdx@@ -77,8 +77,9 @@ tags:| `AUTH_MICROSOFT_AUTHORITY_URL` | 可选 | Microsoft Entra ID 的 Authority URL || `AUTH_MICROSOFT_TENANT_ID` | 可选 | 单租户应用的 Directory (tenant) ID |- <Callout type={'info'}>- **兼容的环境变量**:为了向后兼容,以下别名也支持:+ <Callout type={'warning'}>+ **已废弃的环境变量**:以下旧版变量名已不再支持,设置其中任意一个都会导致部署在构建 / 启动阶段失败,请改用+ `AUTH_MICROSOFT_ID` / `AUTH_MICROSOFT_SECRET` / `AUTH_MICROSOFT_TENANT_ID`:- `AUTH_MICROSOFT_ENTRA_ID_ID` / `AUTH_MICROSOFT_ENTRA_ID_SECRET`- `AUTH_AZURE_AD_ID` / `AUTH_AZURE_AD_SECRET`diff --git a/docs/self-hosting/auth/providers/zitadel.mdx b/docs/self-hosting/auth/providers/zitadel.mdxindex 8ed1d8c7590..eec42199f4e 100644--- a/docs/self-hosting/auth/providers/zitadel.mdx+++ b/docs/self-hosting/auth/providers/zitadel.mdx@@ -52,10 +52,8 @@ tags:| `AUTH_ZITADEL_SECRET` | Required | Client Secret from ZITADEL application || `AUTH_ZITADEL_ISSUER` | Required | ZITADEL issuer URL (e.g., `https://your-instance.zitadel.cloud`) |- <Callout type={'info'}>- **Alternative Environment Variables**: For backward compatibility, the following aliases are also supported:-- - `ZITADEL_CLIENT_ID` / `ZITADEL_CLIENT_SECRET` / `ZITADEL_ISSUER`+ <Callout type={'warning'}>+ **Deprecated Environment Variables**: `ZITADEL_CLIENT_ID` / `ZITADEL_CLIENT_SECRET` / `ZITADEL_ISSUER` are no longer supported. Setting any of them will cause the deployment to fail at build/startup — use `AUTH_ZITADEL_ID` / `AUTH_ZITADEL_SECRET` / `AUTH_ZITADEL_ISSUER` instead.</Callout><Callout type={'tip'}>diff --git a/docs/self-hosting/auth/providers/zitadel.zh-CN.mdx b/docs/self-hosting/auth/providers/zitadel.zh-CN.mdxindex d77a264543a..be6e07d8896 100644--- a/docs/self-hosting/auth/providers/zitadel.zh-CN.mdx+++ b/docs/self-hosting/auth/providers/zitadel.zh-CN.mdx@@ -50,10 +50,8 @@ tags:| `AUTH_ZITADEL_SECRET` | 必选 | ZITADEL 应用的 Client Secret || `AUTH_ZITADEL_ISSUER` | 必选 | ZITADEL Issuer URL(例如 `https://your-instance.zitadel.cloud`) |- <Callout type={'info'}>- **兼容的环境变量**:为了向后兼容,以下别名也支持:-- - `ZITADEL_CLIENT_ID` / `ZITADEL_CLIENT_SECRET` / `ZITADEL_ISSUER`+ <Callout type={'warning'}>+ **已废弃的环境变量**:`ZITADEL_CLIENT_ID` / `ZITADEL_CLIENT_SECRET` / `ZITADEL_ISSUER` 已不再支持,设置其中任意一个都会导致部署在构建 / 启动阶段失败,请改用 `AUTH_ZITADEL_ID` / `AUTH_ZITADEL_SECRET` / `AUTH_ZITADEL_ISSUER`。</Callout><Callout type={'tip'}>diff --git a/docs/self-hosting/environment-variables/basic.mdx b/docs/self-hosting/environment-variables/basic.mdxindex 37b90ec5d95..41db97ba9e0 100644--- a/docs/self-hosting/environment-variables/basic.mdx+++ b/docs/self-hosting/environment-variables/basic.mdx@@ -48,22 +48,22 @@ When using the `turn` mode, the API Keys will be retrieved in a polling manner a- Type: Optional- Description: Used to configure the default settings for the LobeHub default agent. It supports various data types and structures, including key-value pairs, nested fields, array values, and more.- Default: --- Example: `'model=gpt-4-1106-preview;params.max_tokens=300;plugins=search-engine,lobe-image-designer'`+- Example: `'model=gpt-4o;params.max_tokens=300;plugins=search-engine,lobe-image-designer'`The `DEFAULT_AGENT_CONFIG` is used to configure the default settings for the LobeHub default agent. It supports various data types and structures, including key-value pairs, nested fields, array values, and more. The table below provides detailed information on the configuration options, examples, and corresponding explanations for the `DEFAULT_AGENT_CONFIG` environment variable:-| Configuration Type | Example | Explanation |-| ----------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |-| Basic Key-Value Pair | `model=gpt-4` | Set the model to `gpt-4`. |-| Nested Field | `tts.sttLocale=en-US` | Set the language locale for the text-to-speech service to `en-US`. |-| Array | `plugins=search-engine,lobe-image-designer` | Enable the `search-engine` and `lobe-image-designer` plugins. |-| Chinese Comma | `plugins=search-engine,lobe-image-designer` | Same as above, demonstrating support for Chinese comma separation. |-| Multiple Configurations | `model=glm-4;provider=zhipu` | Set the model to `glm-4` and the model provider to `zhipu`. |-| Numeric Value | `params.max_tokens=300`, `chatConfig.historyCount=5` | Set the maximum tokens to `300`, Set the number of historical messages to 5. |-| Boolean Value | `chatConfig.enableHistoryCount=true`, `chatConfig.enableCompressThreshold=true`, `chatConfig.enableStreaming=true` | Enable history length limit, history length compression threshold, and streaming output. |-| Special Characters | `inputTemplate="Hello; I am a bot;"` | Set the input template to `Hello; I am a bot;`. |-| Error Handling | `model=gpt-4;maxToken` | Ignore invalid entry `maxToken` and only parse `model=gpt-4`. |-| Value Override | `model=gpt-4;model=gpt-4-1106-preview` | If a key is repeated, use the value that appears last; in this case, the value of `model` is `gpt-4-1106-preview`. |+| Configuration Type | Example | Explanation |+| ----------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |+| Basic Key-Value Pair | `model=gpt-4` | Set the model to `gpt-4`. |+| Nested Field | `tts.sttLocale=en-US` | Set the language locale for the text-to-speech service to `en-US`. |+| Array | `plugins=search-engine,lobe-image-designer` | Enable the `search-engine` and `lobe-image-designer` plugins. |+| Chinese Comma | `plugins=search-engine,lobe-image-designer` | Same as above, demonstrating support for Chinese comma separation. |+| Multiple Configurations | `model=glm-4;provider=zhipu` | Set the model to `glm-4` and the model provider to `zhipu`. |+| Numeric Value | `params.max_tokens=300`, `chatConfig.historyCount=5` | Set the maximum tokens to `300`, Set the number of historical messages to 5. |+| Boolean Value | `chatConfig.enableHistoryCount=true`, `chatConfig.enableCompressThreshold=true`, `chatConfig.enableStreaming=true` | Enable history length limit, history length compression threshold, and streaming output. |+| Special Characters | `inputTemplate="Hello; I am a bot;"` | Set the input template to `Hello; I am a bot;`. |+| Error Handling | `model=gpt-4;maxToken` | Ignore invalid entry `maxToken` and only parse `model=gpt-4`. |+| Value Override | `model=gpt-4;model=gpt-4o` | If a key is repeated, use the value that appears last; in this case, the value of `model` is `gpt-4o`. |Further reading:@@ -74,7 +74,7 @@ Further reading:- Type: Optional- Description: Used to configure models and providers for LobeHub system agents (such as topic generation, translation, etc.).- Default value: `-`-- Example: `default=ollama/deepseek-v3` or `topic=openai/gpt-4,translation=anthropic/claude-1`+- Example: `default=ollama/deepseek-v3` or `topic=openai/gpt-4,translation=anthropic/claude-sonnet-4-5-20250929`The `SYSTEM_AGENT` environment variable supports two configuration methods:@@ -91,17 +91,18 @@ Configuration details:Available system agents and their functions:-| System Agent | Key Name | Function Description |-| ------------------- | ----------------- | -------------------------------------------------------------------------------------- |-| Topic Generation | `topic` | Automatically generates topic names and summaries based on chat content |-| Translation | `translation` | Handles text translation between multiple languages |-| Metadata Generation | `agentMeta` | Generates descriptive information and metadata for assistants |-| History Compression | `historyCompress` | Compresses and organizes history for long conversations, optimizing context management |-| Branch Conversation | `thread` | Automatically generate titles for branch conversations |-| Image Generation Naming | `generationTopic` | AI image automatic topic naming |-| Input Auto-completion | `inputCompletion` | Input auto-completion suggestions (similar to GitHub Copilot ghost text) |-| Prompt Rewrite | `promptRewrite` | Optimize prompts before generation |-| Image Generation Naming | `generationTopic` | AI image automatic topic naming |+| System Agent | Key Name | Function Description |+| ----------------------- | ----------------- | -------------------------------------------------------------------------------------- |+| Topic Generation | `topic` | Automatically generates topic names and summaries based on chat content |+| Translation | `translation` | Handles text translation between multiple languages |+| Metadata Generation | `agentMeta` | Generates descriptive information and metadata for assistants |+| History Compression | `historyCompress` | Compresses and organizes history for long conversations, optimizing context management |+| Branch Conversation | `thread` | Automatically generate titles for branch conversations |+| Image Generation Naming | `generationTopic` | AI image automatic topic naming |+| Input Auto-completion | `inputCompletion` | Input auto-completion suggestions (similar to GitHub Copilot ghost text) |+| Prompt Rewrite | `promptRewrite` | Optimize prompts before generation |+| Image Generation Naming | `generationTopic` | AI image automatic topic naming |+### `FEATURE_FLAGS`- Type: Optional@@ -148,13 +149,6 @@ Business builds enable Gateway Mode automatically. Self-hosted deployments can sto connect to an authenticated proxy server.</Callout>-### `ENABLE_PROXY_DNS`--- Type: Optional-- Description: Used to control whether to send DNS queries to the proxy server. When configured as `0`, all DNS queries are resolved locally. If you encounter API access failures or timeouts in your network environment, try setting this option to `1`.-- Default: `0`-- Example: `1` or `0`-### `SSRF_ALLOW_PRIVATE_IP_ADDRESS`- Type: Optional@@ -253,11 +247,11 @@ When this feature is enabled, users can upload images or videos while using a mo- Type: Optional- Description: Sets the default number of images to generate for AI image generation. Users can still override this value in their settings.-- Default: `4`+- Default: `2`- Example: `6`- Range: `1-20`-This environment variable allows administrators to customize the default image generation count for their deployment. The value must be between 1 and 20. If not set, it defaults to 4. Users can still adjust this value in their personal settings.+This environment variable allows administrators to customize the default image generation count for their deployment. The value must be between 1 and 20. If not set, it defaults to 2. Users can still adjust this value in their personal settings.## Plugin Service@@ -265,7 +259,7 @@ This environment variable allows administrators to customize the default image g- Type: Optional- Description: Index address of the LobeHub plugin market. If you have deployed the plugin market service on your own, you can use this variable to override the default plugin market address.-- Default: `https://chat-plugins.lobehub.com`+- Default: `https://registry.npmmirror.com/@lobehub/plugins-index/v1/files/public`### `PLUGIN_SETTINGS`@@ -294,4 +288,4 @@ The above example sets the `SERPAPI_API_KEY` of the `search-engine` plugin to `x- Type: Optional- Description: Index address of the LobeHub assistant market. If you have deployed the assistant market service on your own, you can use this variable to override the default market address.-- Default: `https://chat-agents.lobehub.com`+- Default: `https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public`diff --git a/docs/self-hosting/environment-variables/basic.zh-CN.mdx b/docs/self-hosting/environment-variables/basic.zh-CN.mdxindex cda8100f767..6ff7c193d8b 100644--- a/docs/self-hosting/environment-variables/basic.zh-CN.mdx+++ b/docs/self-hosting/environment-variables/basic.zh-CN.mdx@@ -45,22 +45,22 @@ LobeHub 在部署时提供了一些额外的配置项,你可以使用环境变- 类型:可选- 描述:用于配置 LobeHub 默认助理的默认配置。它支持多种数据类型和结构,包括键值对、嵌套字段、数组值等。- 默认值:`-`-- 示例:`'model=gpt-4-1106-preview;params.max_tokens=300;plugins=search-engine,lobe-image-designer'`+- 示例:`'model=gpt-4o;params.max_tokens=300;plugins=search-engine,lobe-image-designer'``DEFAULT_AGENT_CONFIG` 用于配置 LobeHub 默认助理的默认配置。它支持多种数据类型和结构,包括键值对、嵌套字段、数组值等。下表详细说明了 `DEFAULT_AGENT_CONFIG` 环境变量的配置项、示例以及相应解释:-| 配置项类型 | 示例 | 解释 |-| ----- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |-| 基本键值对 | `model=gpt-4` | 设置模型为 `gpt-4`。 |-| 嵌套字段 | `tts.sttLocale=en-US` | 设置文本到语音服务的语言区域为 `en-US`。 |-| 数组 | `plugins=search-engine,lobe-image-designer` | 启用 `search-engine` 和 `lobe-image-designer` 插件。 |-| 中文逗号 | `plugins=search-engine,lobe-image-designer` | 同上,演示支持中文逗号分隔。 |-| 多个配置项 | `model=glm-4;provider=zhipu` | 设置模型为 `glm-4` 且模型服务商为 `zhipu`。 |-| 数字值 | `params.max_tokens=300`, `chatConfig.historyCount=5` | 设置最大令牌数为 `300`,设置历史消息条数为 5。 |-| 布尔值 | `chatConfig.enableHistoryCount=true`,`chatConfig.enableCompressThreshold=true`, `chatConfig.enableStreaming=true` | 启用历史消息数量限制,历史长度压缩阈值,流式输出。 |-| 特殊字符 | `inputTemplate="Hello; I am a bot;"` | 设置输入模板为 `Hello; I am a bot;`。 |-| 错误处理 | `model=gpt-4;maxToken` | 忽略无效条目 `maxToken`,仅解析出 `model=gpt-4`。 |-| 值覆盖 | `model=gpt-4;model=gpt-4-1106-preview` | 如果键重复,使用最后一次出现的值,此处 `model` 的值为 `gpt-4-1106-preview`。 |+| 配置项类型 | 示例 | 解释 |+| ----- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |+| 基本键值对 | `model=gpt-4` | 设置模型为 `gpt-4`。 |+| 嵌套字段 | `tts.sttLocale=en-US` | 设置文本到语音服务的语言区域为 `en-US`。 |+| 数组 | `plugins=search-engine,lobe-image-designer` | 启用 `search-engine` 和 `lobe-image-designer` 插件。 |+| 中文逗号 | `plugins=search-engine,lobe-image-designer` | 同上,演示支持中文逗号分隔。 |+| 多个配置项 | `model=glm-4;provider=zhipu` | 设置模型为 `glm-4` 且模型服务商为 `zhipu`。 |+| 数字值 | `params.max_tokens=300`, `chatConfig.historyCount=5` | 设置最大令牌数为 `300`,设置历史消息条数为 5。 |+| 布尔值 | `chatConfig.enableHistoryCount=true`,`chatConfig.enableCompressThreshold=true`, `chatConfig.enableStreaming=true` | 启用历史消息数量限制,历史长度压缩阈值,流式输出。 |+| 特殊字符 | `inputTemplate="Hello; I am a bot;"` | 设置输入模板为 `Hello; I am a bot;`。 |+| 错误处理 | `model=gpt-4;maxToken` | 忽略无效条目 `maxToken`,仅解析出 `model=gpt-4`。 |+| 值覆盖 | `model=gpt-4;model=gpt-4o` | 如果键重复,使用最后一次出现的值,此处 `model` 的值为 `gpt-4o`。 |相关阅读:@@ -71,7 +71,7 @@ LobeHub 在部署时提供了一些额外的配置项,你可以使用环境变- 类型:可选- 描述:用于配置 LobeHub 系统助手(如主题生成、翻译等功能)的模型和供应商。- 默认值:`-`-- 示例:`default=ollama/deepseek-v3` 或 `topic=openai/gpt-4,translation=anthropic/claude-1`+- 示例:`default=ollama/deepseek-v3` 或 `topic=openai/gpt-4,translation=anthropic/claude-sonnet-4-5-20250929``SYSTEM_AGENT` 环境变量支持两种配置方式:@@ -88,17 +88,17 @@ LobeHub 在部署时提供了一些额外的配置项,你可以使用环境变可配置的系统助手及其作用:-| 系统助手 | 键名 | 作用描述 |-| ------ | ----------------- | --------------------- |-| 主题生成 | `topic` | 根据聊天内容自动生成主题名称和摘要 |-| 翻译 | `translation` | 文本翻译使用的助手 |-| 元数据生成 | `agentMeta` | 为助手生成描述性信息和元数据 |-| 历史记录压缩 | `historyCompress` | 压缩和整理长对话的历史记录,优化上下文管理 |-| 分支对话 | `thread` | 自动生成分支对话的标题 |-| 图片生成命名 | `generationTopic` | AI 图片自动命名话题 |-| 输入自动补全 | `inputCompletion` | 输入自动补全建议(类似 GitHub Copilot 幽灵文本) |-| 提示词重写 | `promptRewrite` | 生成前优化提示词 |-| 图片生成命名 | `generationTopic` | AI 图片自动命名话题 |+| 系统助手 | 键名 | 作用描述 |+| ------ | ----------------- | -------------------------------- |+| 主题生成 | `topic` | 根据聊天内容自动生成主题名称和摘要 |+| 翻译 | `translation` | 文本翻译使用的助手 |+| 元数据生成 | `agentMeta` | 为助手生成描述性信息和元数据 |+| 历史记录压缩 | `historyCompress` | 压缩和整理长对话的历史记录,优化上下文管理 |+| 分支对话 | `thread` | 自动生成分支对话的标题 |+| 图片生成命名 | `generationTopic` | AI 图片自动命名话题 |+| 输入自动补全 | `inputCompletion` | 输入自动补全建议(类似 GitHub Copilot 幽灵文本) |+| 提示词重写 | `promptRewrite` | 生成前优化提示词 |+| 图片生成命名 | `generationTopic` | AI 图片自动命名话题 |### `FEATURE_FLAGS`@@ -128,7 +128,7 @@ LobeHub 在部署时提供了一些额外的配置项,你可以使用环境变### `AGENT_GATEWAY_SERVICE_TOKEN`- 类型:可选-- 描述:Agent Gateway 验证Token,用于 Gateway Mode 与自部署 Agent Gateway 的鉴权+- 描述:Agent Gateway 验证 Token,用于 Gateway Mode 与自部署 Agent Gateway 的鉴权- 默认值:-- 示例:`dev-secret`@@ -145,13 +145,6 @@ LobeHub 在部署时提供了一些额外的配置项,你可以使用环境变`http://user:[email protected]:7890` 来连接到带认证的代理服务器。</Callout>-### `ENABLE_PROXY_DNS`--- 类型:可选-- 描述:用于控制是否将 DNS 发送到代理服务器,配置为 `0` 时所有 DNS 查询在本地完成,当你的网络环境无法访问 API 或访问超时,请尝试将该项配置为 `1`。-- 默认值:`0`-- 示例:`1` or `0`-### `SSRF_ALLOW_PRIVATE_IP_ADDRESS`- 类型:可选@@ -250,11 +243,11 @@ VISUAL_UNDERSTANDING_MODEL=gemini-2.5-flash- 类型:可选- 描述:设置 AI 图像生成的默认图片数量。用户仍可在个人设置中覆盖此值。-- 默认值:`4`+- 默认值:`2`- 示例:`6`- 范围:`1-20`-此环境变量允许管理员为其部署自定义默认图片生成数量。值必须在 1 到 20 之间。如果未设置,默认为 4。用户仍可在个人设置中调整此值。+此环境变量允许管理员为其部署自定义默认图片生成数量。值必须在 1 到 20 之间。如果未设置,默认为 2。用户仍可在个人设置中调整此值。## 插件服务@@ -262,7 +255,7 @@ VISUAL_UNDERSTANDING_MODEL=gemini-2.5-flash- 类型:可选- 描述:LobeHub 插件市场的索引地址,如果你自行部署了插件市场的服务,可以使用该变量来覆盖默认的插件市场地址-- 默认值:`https://chat-plugins.lobehub.com`+- 默认值:`https://registry.npmmirror.com/@lobehub/plugins-index/v1/files/public`### `PLUGIN_SETTINGS`@@ -291,4 +284,4 @@ VISUAL_UNDERSTANDING_MODEL=gemini-2.5-flash- 类型:可选- 描述:LobeHub 助手市场的索引地址,如果你自行部署了助手市场的服务,可以使用该变量来覆盖默认的市场地址-- 默认值:`https://chat-agents.lobehub.com`+- 默认值:`https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public`diff --git a/docs/self-hosting/environment-variables/model-provider.mdx b/docs/self-hosting/environment-variables/model-provider.mdxindex fcfbd49c3a4..9a9a3d9e63e 100644--- a/docs/self-hosting/environment-variables/model-provider.mdx+++ b/docs/self-hosting/environment-variables/model-provider.mdx@@ -60,9 +60,9 @@ Related discussions:- Type: Optional- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]- Default: `-`-- Example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`+- Example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-turbo=gpt-4o`-The above example adds `qwen-7b-chat` and `glm-6b` to the model list, removes `gpt-3.5-turbo` from the list, and displays the name of `gpt-4-0125-preview` as `gpt-4-turbo`. If you want to disable all models first and then enable specific models, you can use `-all,+gpt-3.5-turbo`, which means only `gpt-3.5-turbo` will be enabled.+The above example adds `qwen-7b-chat` and `glm-6b` to the model list, removes `gpt-3.5-turbo` from the list, and displays the name of `gpt-4-turbo` as `gpt-4o`. If you want to disable all models first and then enable specific models, you can use `-all,+gpt-3.5-turbo`, which means only `gpt-3.5-turbo` will be enabled.You can find all current model names in [modelProviders](https://github.com/lobehub/lobehub/tree/main/src/config/modelProviders).@@ -119,7 +119,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the- Type: Optional- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]- Default: `-`-- Example: `-all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latest`+- Example: `-all,+gemini-2.5-flash,+gemini-2.5-pro`## Vertex AI@@ -149,7 +149,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the- Type: Optional- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]- Default: `-`-- Example: `-all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latest`+- Example: `-all,+gemini-2.5-flash,+gemini-2.5-pro`## Anthropic AI@@ -210,7 +210,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the- Type: Optional- Description: If you manually configure the DeepSeek API proxy, you can use this configuration item to override the default DeepSeek API request base URL-- Default: `https://api.deepseek.com`+- Default: `https://api.deepseek.com/v1`- Example: `https://my-deepseek-proxy.com`### `DEEPSEEK_API_KEY`@@ -323,7 +323,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the- Type: Optional- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]- Default: `-`-- Example: `-all,+accounts/fireworks/models/firefunction-v2,+accounts/fireworks/models/firefunction-v1`+- Example: `-all,+accounts/fireworks/models/llama-v3p3-70b-instruct,+accounts/fireworks/models/deepseek-v3`## Ollama@@ -385,7 +385,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the- Type: Optional- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see- Default: `-`-- Example: `-all,+llama-3.1-sonar-small-128k-online,+llama-3.1-sonar-small-128k-chat`+- Example: `-all,+sonar-pro,+sonar`## Minimax AI@@ -426,7 +426,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the- Type: Optional- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]- Default: `-`-- Example: `-all,+gemma2-9b-it,+llama-3.1-8b-instant`+- Example: `-all,+llama-3.3-70b-versatile,+llama-3.1-8b-instant`## ZHIPU AI@@ -442,7 +442,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the- Type: Optional- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]- Default: `-`-- Example: `-all,+glm-4-alltools,+glm-4-plus`+- Example: `-all,+glm-4.6,+glm-4-plus`## 01.AI@@ -480,8 +480,8 @@ If you need to use Azure OpenAI to provide model services, you can refer to the- Type: Optional- Description: If you manually configure the Qiniu API proxy, you can use this configuration item to override the default Qiniu API request base URL-- Default: `https://api.qnaigc.com/v1`-- Example: `https://my-qnaigc.com/v1`+- Default: `https://openai.qiniu.com/v1`+- Example: `https://my-qiniu-proxy.com/v1`## Qwen@@ -529,7 +529,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the- Type: Optional- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]- Default: `-`-- Example: `-all,+meta-llama/llama-3.1-8b-instruct,+meta-llama/llama-3.1-70b-instruct`+- Example: `-all,+meta-llama/llama-3.1-8b-instruct,+meta-llama/llama-3.3-70b-instruct`## BAICHUAN@@ -622,7 +622,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the- Type: Optional- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]- Default: `-`-- Example: `-all,+hunyuan-lite,+hunyuan-standard`+- Example: `-all,+hunyuan-2.0-instruct-20251111,+hunyuan-2.0-thinking-20251109`## Volcenginediff --git a/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx b/docs/self-hosting/environment-variables/model-provider.zh-CN.mdxindex 32772eb99a7..cdfe632080a 100644--- a/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx+++ b/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx@@ -58,9 +58,9 @@ LobeHub 在部署时提供了丰富的模型服务商相关的环境变量,你- 类型:可选- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]- 默认值:`-`-- 示例:`+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`+- 示例:`+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-turbo=gpt-4o`-上面示例表示增加 `qwen-7b-chat` 和 `glm-6b` 到模型列表,而从列表中删除 `gpt-3.5-turbo`,并将 `gpt-4-0125-preview` 模型名字展示为 `gpt-4-turbo`。如果你想先禁用所有模型,再启用指定模型,可以使用 `-all,+gpt-3.5-turbo`,则表示仅启用 `gpt-3.5-turbo`。+上面示例表示增加 `qwen-7b-chat` 和 `glm-6b` 到模型列表,而从列表中删除 `gpt-3.5-turbo`,并将 `gpt-4-turbo` 模型名字展示为 `gpt-4o`。如果你想先禁用所有模型,再启用指定模型,可以使用 `-all,+gpt-3.5-turbo`,则表示仅启用 `gpt-3.5-turbo`。你可以在 [modelProviders](https://github.com/lobehub/lobehub/tree/main/src/config/modelProviders) 查找到当前的所有模型名。@@ -117,7 +117,7 @@ LobeHub 在部署时提供了丰富的模型服务商相关的环境变量,你- 类型:可选- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]- 默认值:`-`-- 示例:`-all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latest`+- 示例:`-all,+gemini-2.5-flash,+gemini-2.5-pro`## Vertex AI@@ -147,7 +147,7 @@ LobeHub 在部署时提供了丰富的模型服务商相关的环境变量,你- 类型:可选- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]- 默认值:`-`-- 示例:`-all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latest`+- 示例:`-all,+gemini-2.5-flash,+gemini-2.5-pro`## Anthropic AI@@ -268,7 +268,7 @@ LobeHub 在部署时提供了丰富的模型服务商相关的环境变量,你- 类型:可选- 描述:如果您手动配置了 DeepSeek API 代理,可以使用此配置项覆盖默认的 DeepSeek API 请求基础 URL-- 默认值:`https://api.deepseek.com`+- 默认值:`https://api.deepseek.com/v1`- 示例:`https://my-deepseek-proxy.com`### `DEEPSEEK_API_KEY`@@ -381,7 +381,7 @@ LobeHub 在部署时提供了丰富的模型服务商相关的环境变量,你- 类型:可选- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]- 默认值:`-`-- 示例:`-all,+accounts/fireworks/models/firefunction-v2,+accounts/fireworks/models/firefunction-v1`+- 示例:`-all,+accounts/fireworks/models/llama-v3p3-70b-instruct,+accounts/fireworks/models/deepseek-v3`## Ollama@@ -436,7 +436,7 @@ LobeHub 在部署时提供了丰富的模型服务商相关的环境变量,你- 类型:可选- 描述:用于指定自定义 Perplexity 语言模型。模型定义语法规则见 [模型列表][model-list]- 默认值:--- 示例: `-all,+llama-3.1-sonar-small-128k-online,+llama-3.1-sonar-small-128k-chat`+- 示例: `-all,+sonar-pro,+sonar`### `PERPLEXITY_PROXY_URL`@@ -477,7 +477,7 @@ LobeHub 在部署时提供了丰富的模型服务商相关的环境变量,你- 类型:可选- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]- 默认值:`-`-- 示例:`-all,+gemma2-9b-it,+llama-3.1-8b-instant`+- 示例:`-all,+llama-3.3-70b-versatile,+llama-3.1-8b-instant`### `GROQ_PROXY_URL`@@ -500,7 +500,7 @@ LobeHub 在部署时提供了丰富的模型服务商相关的环境变量,你- 类型:可选- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]- 默认值:`-`-- 示例:`-all,+glm-4-alltools,+glm-4-plus`+- 示例:`-all,+glm-4.6,+glm-4-plus`## 01 AI@@ -538,8 +538,8 @@ LobeHub 在部署时提供了丰富的模型服务商相关的环境变量,你- 类型:可选- 描述:如果你手动配置了 Qiniu 接口代理,可以使用此配置项来覆盖默认的 Qiniu API 请求基础 URL-- 默认值:`https://api.qnaigc.com/v1`-- 示例:`https://my-qnaigc.com/v1`+- 默认值:`https://openai.qiniu.com/v1`+- 示例:`https://my-qiniu-proxy.com/v1`## 通义千问@@ -587,7 +587,7 @@ LobeHub 在部署时提供了丰富的模型服务商相关的环境变量,你- 类型:可选- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]- 默认值:`-`-- 示例:`-all,+meta-llama/llama-3.1-8b-instruct,+meta-llama/llama-3.1-70b-instruct`+- 示例:`-all,+meta-llama/llama-3.1-8b-instruct,+meta-llama/llama-3.3-70b-instruct`## 百川@@ -680,7 +680,7 @@ LobeHub 在部署时提供了丰富的模型服务商相关的环境变量,你- 类型:可选- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]- 默认值:`-`-- 示例:`-all,+hunyuan-lite,+hunyuan-standard`+- 示例:`-all,+hunyuan-2.0-instruct-20251111,+hunyuan-2.0-thinking-20251109`## 火山引擎diff --git a/docs/self-hosting/environment-variables/s3.mdx b/docs/self-hosting/environment-variables/s3.mdxindex 2fc97b05631..f4241aad7bd 100644--- a/docs/self-hosting/environment-variables/s3.mdx+++ b/docs/self-hosting/environment-variables/s3.mdx@@ -55,8 +55,8 @@ LobeHub supports multimodal AI sessions, including the ability to upload unstruc- Type: Optional- Description: Whether to set ACL to `public-read` when uploading files-- Default: `1`-- Example: `0`+- Default: `-` (disabled; the ACL is only set when explicitly configured to `1`)+- Example: `1`### `S3_ENABLE_PATH_STYLE`@@ -94,4 +94,4 @@ Route: [xai] ProviderBizError: Fetching images over plain http:// is not support- Default: undefined- Example: `1`-When set to `1`, LobeChat will convert videos to base64 encoding before uploading them to the LLM model.+When set to `1`, LobeHub will convert videos to base64 encoding before uploading them to the LLM model.diff --git a/docs/self-hosting/environment-variables/s3.zh-CN.mdx b/docs/self-hosting/environment-variables/s3.zh-CN.mdxindex 0a5f58f5f6a..62449c05243 100644--- a/docs/self-hosting/environment-variables/s3.zh-CN.mdx+++ b/docs/self-hosting/environment-variables/s3.zh-CN.mdx@@ -53,8 +53,8 @@ LobeHub 支持多模态的 AI 会话,包括将图片、文件等非结构化- 类型:可选- 描述:是否在上传文件时设置 ACL 为 `public-read`-- 默认值:`1`-- 示例:`0`+- 默认值:`-`(默认关闭,仅显式设置为 `1` 时才会设置 public-read ACL)+- 示例:`1`### `S3_ENABLE_PATH_STYLE`@@ -92,4 +92,4 @@ Route: [xai] ProviderBizError: Fetching images over plain http:// is not support- 默认值:undefined- 示例:`1`-当设置为 `1` 时,LobeChat 会将视频转换为 base64 编码后上传到 LLM 模型中。+当设置为 `1` 时,LobeHub 会将视频转换为 base64 编码后上传到 LLM 模型中。diff --git a/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdx b/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdxindex 44e7fdca943..dbf610aeebb 100644--- a/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdx+++ b/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdx@@ -49,7 +49,7 @@ This problem typically occurs when using a proxy server with a self-signed certiTo resolve this issue, you can bypass Node.js certificate validation by adding an environment variable when starting the application. Specifically, you can add `NODE_TLS_REJECT_UNAUTHORIZED=0` to the startup command. For example:```bash-NODE_TLS_REJECT_UNAUTHORIZED=0 npm run start+NODE_TLS_REJECT_UNAUTHORIZED=0 bun run start```Alternatively, when running in a Docker container, you can set the environment variable in the Dockerfile or docker-compose.yml:diff --git a/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx b/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdxindex 789eee086fb..1cfd1a014ed 100644--- a/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx+++ b/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx@@ -46,7 +46,7 @@ tags:要解决这个问题,可以在启动应用时添加环境变量,跳过 Node.js 的证书验证。具体做法是在启动命令中加入 `NODE_TLS_REJECT_UNAUTHORIZED=0`。例如:```bash-NODE_TLS_REJECT_UNAUTHORIZED=0 npm run start+NODE_TLS_REJECT_UNAUTHORIZED=0 bun run start```或者在 Docker 容器中运行时,可以在 Dockerfile 或者 docker-compose.yml 中设置环境变量:diff --git a/docs/self-hosting/migration/v2/auth/clerk-to-betterauth.mdx b/docs/self-hosting/migration/v2/auth/clerk-to-betterauth.mdxindex 7294bf916b5..f74974563cb 100644--- a/docs/self-hosting/migration/v2/auth/clerk-to-betterauth.mdx+++ b/docs/self-hosting/migration/v2/auth/clerk-to-betterauth.mdx@@ -226,7 +226,7 @@ See [Clerk documentation](https://clerk.com/docs/guides/development/migrating/ov```bash# Run export script (automatically selects key and output path based on CLERK_TO_BETTERAUTH_MODE)-npx tsx scripts/clerk-to-betterauth/export-clerk-users-with-api.ts+bun run scripts/clerk-to-betterauth/export-clerk-users-with-api.ts```This automatically creates `scripts/clerk-to-betterauth/test/clerk_users.json` with additional user data.@@ -235,7 +235,7 @@ This automatically creates `scripts/clerk-to-betterauth/test/clerk_users.json` w```bash# Run migration (CLERK_TO_BETTERAUTH_DRY_RUN=1, only logs without modifying database)-npx tsx scripts/clerk-to-betterauth/index.ts+bun run scripts/clerk-to-betterauth/index.ts```Review the output logs, confirm no issues, then proceed to the next step.@@ -246,10 +246,10 @@ Update `.env` to set `CLERK_TO_BETTERAUTH_DRY_RUN` to `0`, then execute:```bash# Execute migration-npx tsx scripts/clerk-to-betterauth/index.ts+bun run scripts/clerk-to-betterauth/index.ts# Verify the migration-npx tsx scripts/clerk-to-betterauth/verify.ts+bun run scripts/clerk-to-betterauth/verify.ts```After verifying the test environment migration is successful, proceed to the next step.@@ -264,10 +264,10 @@ After verifying the test environment migration is successful, proceed to the nex```bash# Export production user data-npx tsx scripts/clerk-to-betterauth/export-clerk-users-with-api.ts+bun run scripts/clerk-to-betterauth/export-clerk-users-with-api.ts# Run migration (dry-run mode to verify)-npx tsx scripts/clerk-to-betterauth/index.ts+bun run scripts/clerk-to-betterauth/index.ts```Review the output logs, confirm no issues, then proceed to the next step.@@ -278,10 +278,10 @@ Update `.env` to set `CLERK_TO_BETTERAUTH_DRY_RUN` to `0`, then execute:```bash# Execute migration-npx tsx scripts/clerk-to-betterauth/index.ts+bun run scripts/clerk-to-betterauth/index.ts# Verify the migration-npx tsx scripts/clerk-to-betterauth/verify.ts+bun run scripts/clerk-to-betterauth/verify.ts```### Step 7: Configure Better Auth and Redeploydiff --git a/docs/self-hosting/migration/v2/auth/clerk-to-betterauth.zh-CN.mdx b/docs/self-hosting/migration/v2/auth/clerk-to-betterauth.zh-CN.mdxindex 7c28b7e4447..0c4fe84034d 100644--- a/docs/self-hosting/migration/v2/auth/clerk-to-betterauth.zh-CN.mdx+++ b/docs/self-hosting/migration/v2/auth/clerk-to-betterauth.zh-CN.mdx@@ -220,7 +220,7 @@ CLERK_TO_BETTERAUTH_DRY_RUN=1```bash# 运行导出脚本(会根据 CLERK_TO_BETTERAUTH_MODE 自动选择密钥和输出路径)-npx tsx scripts/clerk-to-betterauth/export-clerk-users-with-api.ts+bun run scripts/clerk-to-betterauth/export-clerk-users-with-api.ts```这将自动创建 `scripts/clerk-to-betterauth/test/clerk_users.json`,包含额外的用户数据。@@ -229,7 +229,7 @@ npx tsx scripts/clerk-to-betterauth/export-clerk-users-with-api.ts```bash# 运行迁移(CLERK_TO_BETTERAUTH_DRY_RUN=1,只打印日志不修改数据库)-npx tsx scripts/clerk-to-betterauth/index.ts+bun run scripts/clerk-to-betterauth/index.ts```检查输出日志,确认无异常后继续下一步。@@ -240,10 +240,10 @@ npx tsx scripts/clerk-to-betterauth/index.ts```bash# 执行迁移-npx tsx scripts/clerk-to-betterauth/index.ts+bun run scripts/clerk-to-betterauth/index.ts# 验证迁移结果-npx tsx scripts/clerk-to-betterauth/verify.ts+bun run scripts/clerk-to-betterauth/verify.ts```验证测试环境迁移结果无误后,继续下一步。@@ -258,10 +258,10 @@ npx tsx scripts/clerk-to-betterauth/verify.ts```bash# 导出生产环境用户数据-npx tsx scripts/clerk-to-betterauth/export-clerk-users-with-api.ts+bun run scripts/clerk-to-betterauth/export-clerk-users-with-api.ts# 运行迁移(dry-run 模式验证)-npx tsx scripts/clerk-to-betterauth/index.ts+bun run scripts/clerk-to-betterauth/index.ts```检查输出日志,确认无异常后继续下一步。@@ -272,10 +272,10 @@ npx tsx scripts/clerk-to-betterauth/index.ts```bash# 执行迁移-npx tsx scripts/clerk-to-betterauth/index.ts+bun run scripts/clerk-to-betterauth/index.ts# 验证迁移结果-npx tsx scripts/clerk-to-betterauth/verify.ts+bun run scripts/clerk-to-betterauth/verify.ts```### 步骤 7:配置 Better Auth 并重新部署diff --git a/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth.mdx b/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth.mdxindex 29751ce8297..c9f22066c99 100644--- a/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth.mdx+++ b/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth.mdx@@ -236,7 +236,7 @@ NEXTAUTH_TO_BETTERAUTH_DRY_RUN=1```bash# Run migration (NEXTAUTH_TO_BETTERAUTH_DRY_RUN=1, only logs without modifying database)-npx tsx scripts/nextauth-to-betterauth/index.ts+bun run scripts/nextauth-to-betterauth/index.ts```Review the output logs, confirm no issues, then proceed to the next step.@@ -247,10 +247,10 @@ Update `.env` to set `NEXTAUTH_TO_BETTERAUTH_DRY_RUN` to `0`, then execute:```bash# Execute migration-npx tsx scripts/nextauth-to-betterauth/index.ts+bun run scripts/nextauth-to-betterauth/index.ts# Verify the migration-npx tsx scripts/nextauth-to-betterauth/verify.ts+bun run scripts/nextauth-to-betterauth/verify.ts```After verifying the test environment migration is successful, proceed to the next step.@@ -264,7 +264,7 @@ After verifying the test environment migration is successful, proceed to the nex```bash# Run migration (dry-run mode to verify)-npx tsx scripts/nextauth-to-betterauth/index.ts+bun run scripts/nextauth-to-betterauth/index.ts```Review the output logs, confirm no issues, then proceed to the next step.@@ -275,10 +275,10 @@ Update `.env` to set `NEXTAUTH_TO_BETTERAUTH_DRY_RUN` to `0`, then execute:```bash# Execute migration-npx tsx scripts/nextauth-to-betterauth/index.ts+bun run scripts/nextauth-to-betterauth/index.ts# Verify the migration-npx tsx scripts/nextauth-to-betterauth/verify.ts+bun run scripts/nextauth-to-betterauth/verify.ts```### Step 6: Configure Better Auth and Redeploydiff --git a/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth.zh-CN.mdx b/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth.zh-CN.mdxindex c85e2f45012..29a60aa465e 100644--- a/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth.zh-CN.mdx+++ b/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth.zh-CN.mdx@@ -232,7 +232,7 @@ NEXTAUTH_TO_BETTERAUTH_DRY_RUN=1```bash# 运行迁移(NEXTAUTH_TO_BETTERAUTH_DRY_RUN=1,只打印日志不修改数据库)-npx tsx scripts/nextauth-to-betterauth/index.ts+bun run scripts/nextauth-to-betterauth/index.ts```检查输出日志,确认无异常后继续下一步。@@ -243,10 +243,10 @@ npx tsx scripts/nextauth-to-betterauth/index.ts```bash# 执行迁移-npx tsx scripts/nextauth-to-betterauth/index.ts+bun run scripts/nextauth-to-betterauth/index.ts# 验证迁移结果-npx tsx scripts/nextauth-to-betterauth/verify.ts+bun run scripts/nextauth-to-betterauth/verify.ts```验证测试环境迁移结果无误后,继续下一步。@@ -260,7 +260,7 @@ npx tsx scripts/nextauth-to-betterauth/verify.ts```bash# 运行迁移(dry-run 模式验证)-npx tsx scripts/nextauth-to-betterauth/index.ts+bun run scripts/nextauth-to-betterauth/index.ts```检查输出日志,确认无异常后继续下一步。@@ -271,10 +271,10 @@ npx tsx scripts/nextauth-to-betterauth/index.ts```bash# 执行迁移-npx tsx scripts/nextauth-to-betterauth/index.ts+bun run scripts/nextauth-to-betterauth/index.ts# 验证迁移结果-npx tsx scripts/nextauth-to-betterauth/verify.ts+bun run scripts/nextauth-to-betterauth/verify.ts```### 步骤 6:配置 Better Auth 并重新部署diff --git a/docs/self-hosting/migration/v2/breaking-changes.mdx b/docs/self-hosting/migration/v2/breaking-changes.mdxindex fa85d9a86b0..dfc752cd2b9 100644--- a/docs/self-hosting/migration/v2/breaking-changes.mdx+++ b/docs/self-hosting/migration/v2/breaking-changes.mdx@@ -70,7 +70,7 @@ See the [Clerk Migration Guide](/docs/self-hosting/migration/v2/auth/clerk-to-beLobeHub 2.0 only supports Server DB mode. Client DB (PGlite) is no longer supported. If you were using `NEXT_PUBLIC_SERVICE_MODE=client`, you need to migrate to Server DB deployment.-For deployment guides, see [Server Database Deployment](/docs/self-hosting/server-database).+For deployment guides, see [Getting Started](/docs/self-hosting/start).## PostgreSQL Version Requirementsdiff --git a/docs/self-hosting/migration/v2/breaking-changes.zh-CN.mdx b/docs/self-hosting/migration/v2/breaking-changes.zh-CN.mdxindex 6958a111a8e..ee6cbd56a5a 100644--- a/docs/self-hosting/migration/v2/breaking-changes.zh-CN.mdx+++ b/docs/self-hosting/migration/v2/breaking-changes.zh-CN.mdx@@ -68,7 +68,7 @@ LobeHub 2.0 仅支持 Better Auth 认证系统,不再支持 NextAuth 和 ClerkLobeHub 2.0 仅支持 Server DB 模式,不再支持 Client DB (PGlite)。如果您之前使用 `NEXT_PUBLIC_SERVICE_MODE=client`,需要迁移到 Server DB 部署方式。-详细部署指南请参阅[服务端数据库部署](/docs/self-hosting/server-database)。+详细部署指南请参阅[快速开始](/docs/self-hosting/start)。## PostgreSQL 版本要求diff --git a/docs/self-hosting/platform/docker-compose.mdx b/docs/self-hosting/platform/docker-compose.mdxindex d246d412566..8488d9513f7 100644--- a/docs/self-hosting/platform/docker-compose.mdx+++ b/docs/self-hosting/platform/docker-compose.mdx@@ -400,13 +400,13 @@ labels:docker compose logs -f# View logs for a specific service-docker compose logs -f lobehub+docker compose logs -f lobe# Restart all servicesdocker compose restart# Restart a specific service-docker compose restart lobehub+docker compose restart lobe# Stop all servicesdocker compose stopdiff --git a/docs/self-hosting/platform/docker-compose.zh-CN.mdx b/docs/self-hosting/platform/docker-compose.zh-CN.mdxindex 1e7c5e8dfe4..ca9b09f9862 100644--- a/docs/self-hosting/platform/docker-compose.zh-CN.mdx+++ b/docs/self-hosting/platform/docker-compose.zh-CN.mdx@@ -394,13 +394,13 @@ labels:docker compose logs -f# 查看指定服务日志-docker compose logs -f lobehub+docker compose logs -f lobe# 重启所有服务docker compose restart# 重启指定服务-docker compose restart lobehub+docker compose restart lobe# 停止所有服务docker compose stopdiff --git a/docs/self-hosting/platform/docker.mdx b/docs/self-hosting/platform/docker.mdxindex 6063ac6cfec..6386c6870a6 100644--- a/docs/self-hosting/platform/docker.mdx+++ b/docs/self-hosting/platform/docker.mdx@@ -24,8 +24,8 @@ tags:This article assumes that you are familiar with the basic principles and processes of deployingthe LobeHub server database version, so it only includes content related to core environmentvariable configuration. If you are not familiar with the deployment principles of the LobeHub- server database version, please refer to [Deploying Server- Database](/docs/self-hosting/server-database) first.+ server database version, please refer to [Getting+ Started](/docs/self-hosting/start) first.</Callout>## Deploying on a Linux Server@@ -48,8 +48,8 @@ Here is the process for deploying the LobeHub server database version on a Linux<Callout type="info">The ParadeDB image includes pgvector (vector search) and pg\_search (full-text search) plugins, which are importantcomponents for LobeHub to implement RAG and knowledge base search.-- It should be noted that the new version of ParadeDB requires explicitly enabling the pg_search extension in order to be used by LobeHub. Here we explicitly enable pg_search.++ It should be noted that the new version of ParadeDB requires explicitly enabling the pg\_search extension in order to be used by LobeHub. Here we explicitly enable pg\_search.</Callout><Callout type="warning">@@ -112,7 +112,7 @@ Here is the process for deploying the LobeHub server database version on a Linux[Database] Start to migration...✅ database migration pass.-------------------------------------- ▲ Next.js 14.x.x+ ▲ Next.js 16.x.x- Local: http://localhost:3210- Network: http://0.0.0.0:3210diff --git a/docs/self-hosting/platform/docker.zh-CN.mdx b/docs/self-hosting/platform/docker.zh-CN.mdxindex ede391bfc52..989bf94498c 100644--- a/docs/self-hosting/platform/docker.zh-CN.mdx+++ b/docs/self-hosting/platform/docker.zh-CN.mdx@@ -21,7 +21,7 @@ tags:<Callout type="info">本文已经假定你了解了 LobeHub的部署基本原理和流程,因此只包含核心环境变量配置的内容。如果你还不了解 LobeHub- 的部署原理,请先查阅 [使用服务端数据库部署](/zh/docs/self-hosting/server-database) 。+ 的部署原理,请先查阅 [快速开始](/zh/docs/self-hosting/start) 。此外,针对国内的腾讯云储存桶用户,可查询[配置腾讯云 COS存储服务](/zh/docs/self-hosting/advanced/s3/tencent-cloud)。</Callout>@@ -109,7 +109,7 @@ tags:[Database] Start to migration...✅ database migration pass.-------------------------------------- ▲ Next.js 14.x.x+ ▲ Next.js 16.x.x- Local: http://localhost:3210- Network: http://0.0.0.0:3210diff --git a/docs/self-hosting/platform/dokploy.mdx b/docs/self-hosting/platform/dokploy.mdxindex bf70a020276..25acfc3feb6 100644--- a/docs/self-hosting/platform/dokploy.mdx+++ b/docs/self-hosting/platform/dokploy.mdx@@ -32,7 +32,7 @@ curl -sSL https://dokploy.com/install.sh | sh### Configure S3 Storage Service-In the server-side database, we need to configure the S3 storage service to store files. For detailed configuration instructions, please refer to the section [Configure S3 Storage Service](https://lobehub.com/docs/self-hosting/platform/vercel#3-configure-s-3-storage-service) in the Vercel deployment guide。After the configuration is complete, you will obtain the following environment variables:+In the server-side database, we need to configure the S3 storage service to store files. For detailed configuration instructions, please refer to the section [Configure S3 Storage Service](https://lobehub.com/docs/self-hosting/platform/vercel#3-configure-s3-storage-service) in the Vercel deployment guide。After the configuration is complete, you will obtain the following environment variables:```shellS3_ACCESS_KEY_ID=diff --git a/docs/self-hosting/platform/dokploy.zh-CN.mdx b/docs/self-hosting/platform/dokploy.zh-CN.mdxindex edef871d75a..b1d47e0bba1 100644--- a/docs/self-hosting/platform/dokploy.zh-CN.mdx+++ b/docs/self-hosting/platform/dokploy.zh-CN.mdx@@ -33,7 +33,7 @@ curl -sSL https://dokploy.com/install.sh | sh### 配置 S3 存储服务-在服务端数据库中我们需要配置 S3 存储服务来存储文件,详细配置教程请参考 使用 Vercel 部署中 [配置 S3 储存服务](https://lobehub.com/zh/docs/self-hosting/platform/vercel#%E4%B8%89%E3%80%81-%E9%85%8D%E7%BD%AE-s-3-%E5%AD%98%E5%82%A8%E6%9C%8D%E5%8A%A1)。配置完成后你将获得以下环境变量:+在服务端数据库中我们需要配置 S3 存储服务来存储文件,详细配置教程请参考 使用 Vercel 部署中 [配置 S3 储存服务](https://lobehub.com/zh/docs/self-hosting/platform/vercel#%E4%B8%89%E3%80%81-%E9%85%8D%E7%BD%AE-s3-%E5%AD%98%E5%82%A8%E6%9C%8D%E5%8A%A1)。配置完成后你将获得以下环境变量:```shellS3_ACCESS_KEY_ID=diff --git a/docs/self-hosting/platform/sealos.mdx b/docs/self-hosting/platform/sealos.mdxindex 63dc6f04289..52507f0e3ff 100644--- a/docs/self-hosting/platform/sealos.mdx+++ b/docs/self-hosting/platform/sealos.mdx@@ -16,8 +16,8 @@ tags:This article assumes that you are familiar with the basic principles and processes of deployingthe LobeHub server database version, so it only includes content related to core environmentvariable configuration. If you are not familiar with the deployment principles of the LobeHub- server database version, please refer to [Deploying Server- Database](/docs/self-hosting/server-database) first.+ server database version, please refer to [Getting+ Started](/docs/self-hosting/start) first.</Callout>The application on Sealos includes 4 services:diff --git a/docs/self-hosting/platform/sealos.zh-CN.mdx b/docs/self-hosting/platform/sealos.zh-CN.mdxindex e58ec0558a6..4b05b43c9f9 100644--- a/docs/self-hosting/platform/sealos.zh-CN.mdx+++ b/docs/self-hosting/platform/sealos.zh-CN.mdx@@ -14,7 +14,7 @@ tags:<Callout type="info">本文假设你已经熟悉 LobeHub服务器数据库版的部署基本原理和流程,因此只包含与核心环境变量配置相关的内容。如果你对 LobeHub- 服务器数据库版的部署原理不熟悉,请先参考[部署服务器数据库](/zh/docs/self-hosting/server-database)。+ 服务器数据库版的部署原理不熟悉,请先参考[快速开始](/zh/docs/self-hosting/start)。</Callout>在 Sealos 的 LobeHub 数据库版应用中总共包含有以下四个服务:diff --git a/docs/self-hosting/platform/zeabur.mdx b/docs/self-hosting/platform/zeabur.mdxindex da2f237d5a3..14a398bc78f 100644--- a/docs/self-hosting/platform/zeabur.mdx+++ b/docs/self-hosting/platform/zeabur.mdx@@ -16,8 +16,8 @@ tags:This article assumes that you are familiar with the basic principles and processes of deployingthe LobeHub server database version, so it only includes content related to core environmentvariable configuration. If you are not familiar with the deployment principles of the LobeHub- server database version, please refer to [Deploying Server- Database](/docs/self-hosting/server-database) first.+ server database version, please refer to [Getting+ Started](/docs/self-hosting/start) first.</Callout>The template on Zeabur includes 4 services:@@ -62,7 +62,7 @@ Here is the process for deploying the LobeHub server database version on Zeabur:After the deployment is done, you need to configure your Logto service to enable authrization.- Access your Logto console with the console domain you just binded, and then create a `Next.js 14(App router)` application to get the client ID and client secret, and fill in the cors and callback URLs. You can check [this document](../advanced/auth.mdx) for a more detailed guide.+ Access your Logto console with the console domain you just binded, and then create a `Next.js 14(App router)` application to get the client ID and client secret, and fill in the cors and callback URLs. You can check [this document](/docs/self-hosting/auth) for a more detailed guide.Fill in those variables into your LobeHub service on Zeabur, here is a more detailed guide for [editing environment variables on Zeabur](https://zeabur.com/docs/deploy/variables).diff --git a/docs/self-hosting/platform/zeabur.zh-CN.mdx b/docs/self-hosting/platform/zeabur.zh-CN.mdxindex 98ef4f15a02..c89d243b8a8 100644--- a/docs/self-hosting/platform/zeabur.zh-CN.mdx+++ b/docs/self-hosting/platform/zeabur.zh-CN.mdx@@ -14,7 +14,7 @@ tags:<Callout type="info">本文假设你已经熟悉 LobeHub服务器数据库版的部署基本原理和流程,因此只包含与核心环境变量配置相关的内容。如果你对 LobeHub- 服务器数据库版的部署原理不熟悉,请先参考[部署服务器数据库](/zh/docs/self-hosting/server-database)。+ 服务器数据库版的部署原理不熟悉,请先参考[快速开始](/zh/docs/self-hosting/start)。</Callout>在 Zeabur 的模板中总共包含有以下四个服务:diff --git a/docs/usage/agent/agent-team.mdx b/docs/usage/agent/agent-team.mdxindex c327c4dbf16..42dcb531991 100644--- a/docs/usage/agent/agent-team.mdx+++ b/docs/usage/agent/agent-team.mdx@@ -8,7 +8,7 @@ tags:- Agent Group- Multi-Agent Collaboration- Group Chat- - Moderator+ - Orchestrator- Sequential Mode- Parallel Mode---@@ -39,9 +39,9 @@ Agent Groups adapt to the task:**Debate** — Agents argue different positions. An advocate makes the case, a critic challenges assumptions, an analyst weighs evidence, and a mediator synthesizes conclusions. Best for complex decisions that benefit from structured disagreement.-## About the Moderator+## About the Orchestrator-Every Agent Group includes a built-in moderator responsible for:+Every Agent Group includes a built-in Orchestrator responsible for:- Understanding your goal and assigning tasks to the right Agents- Coordinating the order of contributions@@ -54,7 +54,7 @@ Click **Create Group** in the left sidebar to get started.-When creating a group, you can start from an existing template or assemble your own team. Choose whether to include a moderator and select the model for it.+When creating a group, you can start from an existing template or assemble your own team. Choose whether to include an Orchestrator and select the model for it.@@ -68,7 +68,7 @@ Click **Add Member** in the left sidebar to bring additional Agents into the gro-Go to **Group Profile** in the left sidebar to edit the group prompt, add Skills, or change the moderator model. You can also use Agent Builder on the right panel — describe your goal and it will generate the complete group configuration, including settings, system prompts, and Skill setup.+Go to **Group Profile** in the left sidebar to edit the group prompt, add Skills, or change the Orchestrator model. You can also use Agent Builder on the right panel — describe your goal and it will generate the complete group configuration, including settings, system prompts, and Skill setup.diff --git a/docs/usage/agent/chain-of-thought.mdx b/docs/usage/agent/chain-of-thought.mdxindex e51a96dd252..8e09d2d8272 100644--- a/docs/usage/agent/chain-of-thought.mdx+++ b/docs/usage/agent/chain-of-thought.mdx@@ -159,7 +159,7 @@ If a reasoning step seems incorrect or incomplete, continue the conversation: "T<Callout type={'info'}>Not all models use Chain of Thought reasoning, and not all responses trigger it even on modelsthat support it. CoT is most common with complex problems that benefit from step-by-step analysis.- Supported models include o1, o3, Claude 3.7 Sonnet, Gemini 2.0 Flash Thinking, and others.+ Supported models include GPT-5.4, Claude Opus 4.8, Gemini 3.1 Pro, and others.</Callout><Cards>diff --git a/docs/usage/agent/chain-of-thought.zh-CN.mdx b/docs/usage/agent/chain-of-thought.zh-CN.mdxindex 1d63aee60cf..c84aa394831 100644--- a/docs/usage/agent/chain-of-thought.zh-CN.mdx+++ b/docs/usage/agent/chain-of-thought.zh-CN.mdx@@ -95,7 +95,7 @@ CoT 推理最有价值的场景(也是模型最常使用它的场景):<Callout type={'info'}>并非所有模型都使用思维链推理,即使支持 CoT 的模型也不是在所有回复中都会触发。CoT 最常见于需要分步分析的复杂问题。支持该功能的模型包括- o1、o3、Claude 3.7 Sonnet、Gemini 2.0 Flash Thinking 等。+ GPT-5.4、Claude Opus 4.8、Gemini 3.1 Pro 等。</Callout><Cards>diff --git a/docs/usage/agent/gtd.mdx b/docs/usage/agent/gtd.mdxindex faca7da85ba..a7fab6b021c 100644--- a/docs/usage/agent/gtd.mdx+++ b/docs/usage/agent/gtd.mdx@@ -1,42 +1,39 @@----title: GTD Tools+title: Task Toolsdescription: >-- Manage tasks through conversation — GTD methodology built in. Capture ideas,- track progress, focus on what matters.+ Manage tasks through conversation with the built-in Task tool — capture+ work, track progress, assign subtasks, and automate follow-through.tags:- LobeHub- - GTD+ - Task- Task Management- - Getting Things Done+ - Subtasks+ - Automation----# GTD Tools+# Task Tools-GTD Tools is a built-in Skill that brings the classic GTD (Getting Things Done) methodology into your conversations. Once enabled, your Agent becomes a task management partner — helping you capture ideas, track progress, and focus on what matters. Manage your schedule directly through natural language: sudden inspiration, household chores, or serious work plans — your Agent records and tracks it all.+Task Tools (`lobe-task`) is the built-in Skill that turns your Agent into a task management partner. It's enabled by default for every Agent — no setup required. Capture ideas, track progress, break work into subtasks, assign them to other Agents, and automate recurring follow-through, all through natural conversation. Sudden inspiration, a household chore, or a multi-step project plan — your Agent records it, structures it, and helps drive it to completion.-## Enabling GTD Tools+## Task Tools Is On by Default-GTD Tools is a built-in Skill. Enable it for your Agent before use.--**From Agent Profile** — Go to the Agent Profile page, click **+ Add Skill**, and check **GTD Tools**.--**In a conversation** — Click the Skill icon below the chat input and check **GTD Tools**.+Unlike marketplace Skills, `lobe-task` ships as one of the default tools every Agent has available — you don't need to open Agent Profile and click **+ Add Skill** to turn it on. If you've customized an Agent's tool list and removed it, you can re-enable it from Agent Profile → **+ Add Skill** → **Task Tools**, but for a fresh Agent it's already active.## Creating Tasks-Send your plans in the conversation — your Agent automatically recognizes and confirms the task. No forms, no extra steps.+Send your plans in the conversation — your Agent recognizes intent and creates a task automatically. No forms, no extra steps.**Examples:**- "Add 'Review Q1 report' to my tasks for tomorrow"- "I need to call the dentist this week"- "Remind me to submit the proposal by Friday"-- "Put 'Finish the design mockup' on my list for next Monday"-- "I have a meeting with the client at 3pm — add it to my calendar"+- "Break this into subtasks: design mockup, get feedback, finalize"+- "Assign the SEO review subtask to my Marketing Agent"## Completing and Updating Tasks-Update tasks through conversational commands. Your Agent handles the updates automatically.+Update tasks through conversational commands, or let a run finish and update its own status. Your Agent handles the details.**Examples:**@@ -46,31 +43,60 @@ Update tasks through conversational commands. Your Agent handles the updates aut- "Show me all my pending tasks"- "Remove the proposal task — I already submitted it"+## Subtasks and Delegation++Tasks can have subtasks and dependencies, and each task can be assigned to a specific Agent:++- **Subtasks** — Split a large task into ordered pieces (e.g. chapter 1, chapter 2, chapter 3) that show up nested under the parent.+- **Dependencies** — Mark a task as blocked on another so it only starts once its blocker completes.+- **Assignment** — Assign a task to any Agent by ID; that Agent runs the task when it's triggered.+- **Verification** — Turn on a delivery-acceptance gate so a separate reviewer checks the work against a stated requirement before the task counts as done.++## Automating Tasks++A task can be turned into a recurring job instead of a one-off: give it a cron schedule or a fixed heartbeat interval, and the Agent runs it automatically going forward. See [Scheduled Tasks](/docs/usage/agent/scheduled-task) for the full walkthrough — from the Agent conversation, open **Tasks** in the left panel, select a task, and use its **Automation** section to configure the schedule.++## Using the CLI++If you use the LobeHub CLI, the same task system is available from the command line via `lh task`:++```+lh task list # list your tasks+lh task view T-1 # view a task's details+lh task create -i "Draft the release notes" # create a task+lh task edit T-1 --status completed # update a task's status+```++This is useful for scripting task creation, checking status from automation, or managing tasks alongside coding sessions without switching to the UI.+## Use Cases**Capture on the fly** — An idea strikes during a meeting? Tell your Agent in one sentence. No need to switch apps or open a task manager.-**Weekly planning** — Start a conversation: "Here's what I need to do this week…" Your Agent structures it into a manageable list.+**Weekly planning** — Start a conversation: "Here's what I need to do this week…" Your Agent structures it into a manageable list of tasks and subtasks.**Context switching** — Moving from one project to another? Ask "What did I leave unfinished on the marketing project?" and pick up where you left off.+**Delegated work** — Break a project into subtasks and assign each one to the Agent best suited for it, then let dependencies and the Automation schedule drive execution.+**Collaboration prep** — Before a team sync, ask "What are my action items from last week?" and show up prepared.-## GTD Tools vs. Other Features+## Task Tools vs. Other Features-| Feature | Best For |-| --------------------------------------------------- | ----------------------------------------------------------------------- |-| **GTD Tools** | Task lists, deadlines, progress tracking — managed through conversation |-| [Notebook](/docs/usage/agent/notebook) | Saving notes, reports, research — documents linked to a Topic |-| [Scheduled Tasks](/docs/usage/agent/scheduled-task) | Automated workflows — Agents run on a schedule without you |+| Feature | Best For |+| --------------------------------------------------- | ------------------------------------------------------------------------------------- |+| **Task Tools** | Task lists, subtasks, deadlines, delegation, progress tracking — through conversation |+| [Notebook](/docs/usage/agent/notebook) | Saving notes, reports, research — documents linked to a Topic |+| [Scheduled Tasks](/docs/usage/agent/scheduled-task) | Automated recurring runs — driven by a task's Automation schedule |-Use GTD for personal task management; use Scheduled Tasks when you want the Agent to execute something automatically at a set time.+Use Task Tools for everyday task management and delegation; use a task's Automation section when you want it to run itself on a schedule.## Tips- **Be specific about timing** — "Tomorrow at 9am" or "by end of week" helps the Agent prioritize and remind you at the right moment.- **Review regularly** — Ask "What's due this week?" at the start of each week to stay on top of commitments.-- **Combine with Notebook** — Save meeting notes to the Notebook, then ask your Agent to extract action items into GTD tasks.+- **Combine with Notebook** — Save meeting notes to the Notebook, then ask your Agent to extract action items into tasks.+- **Use subtasks for anything multi-step** — Breaking work into subtasks with dependencies keeps larger projects organized and lets you delegate pieces independently.<Cards><Card href={'/docs/usage/agent/notebook'} title={'Notebook'} />diff --git a/docs/usage/agent/gtd.zh-CN.mdx b/docs/usage/agent/gtd.zh-CN.mdxindex ed4cbbce2e7..f1a969dd299 100644--- a/docs/usage/agent/gtd.zh-CN.mdx+++ b/docs/usage/agent/gtd.zh-CN.mdx@@ -1,40 +1,37 @@----title: GTD 工具-description: 在对话中管理任务——内置 GTD 方法论。捕捉想法、追踪进度、专注重要事项。+title: 任务工具+description: 通过对话使用内置的任务工具——记录工作、追踪进度、拆分子任务并分配,还能自动化后续执行。tags:- LobeHub- - GTD+ - 任务- 任务管理- - Getting Things Done+ - 子任务+ - 自动化----# GTD 工具+# 任务工具-GTD Tools 是内置技能,将经典的 GTD(Getting Things Done)时间管理方法论融入你的对话。启用后,助理成为你的任务管理伙伴 —— 帮你捕捉想法、追踪进度、专注重要事项。直接用自然语言管理日程:突如其来的灵感、待办的家务、严肃的工作计划 —— 助理都能精准记录并追踪。+任务工具(`lobe-task`)是内置技能,能让助理成为你的任务管理伙伴。它默认为每个助理启用,无需手动开启。你可以捕捉想法、追踪进度、把工作拆分为子任务、将子任务分配给其他助理,并为需要反复执行的工作配置自动化 —— 这一切都通过自然语言对话完成。突如其来的灵感、待办的家务,或是一份多步骤的项目计划 —— 助理都能记录、梳理,并推动它落地。-## 启用 GTD Tools+## 任务工具默认已开启-GTD Tools 是内置技能。使用前需为助理启用。--**从助理档案** — 进入助理档案页面,点击 **+ 添加技能 **,勾选**GTD Tools**。--**在会话中** — 点击对话框下方的技能图标,勾选**GTD Tools**。+与市场技能不同,`lobe-task` 是每个助理默认拥有的工具之一 —— 你无需前往助理档案页面点击 \*\*+ 添加技能 \*\* 来开启它。如果你自定义过某个助理的工具列表并移除了它,可以在助理档案 → **+ 添加技能** → **任务工具** 中重新启用;但对于新建的助理,它已经处于启用状态。## 创建任务-在会话中直接发送你的计划 —— 助理会自动识别并确认记录。无需填表,无需额外步骤。+在会话中直接发送你的计划 —— 助理会自动识别意图并创建任务。无需填表,无需额外步骤。**示例:**- 「把「审阅 Q1 报告」加入我明天的待办」- 「这周需要给牙医打个电话」- 「提醒我周五前提交方案」-- 「把「完成设计稿」加到下周一的任务里」-- 「下午 3 点和客户开会,帮我记一下」+- 「把这个拆成子任务:设计稿、收集反馈、定稿」+- 「把 SEO 审查这个子任务分配给我的营销助理」## 完成和更新任务-通过对话指令更新任务。助理会自动处理更新。+通过对话指令更新任务,或者让某次运行结束后自动更新自己的状态。助理会处理好这些细节。**示例:**@@ -44,31 +41,60 @@ GTD Tools 是内置技能。使用前需为助理启用。- 「给我看看所有未完成的任务」- 「删掉方案那个任务,我已经交了」+## 子任务与分配++任务支持子任务和依赖关系,每个任务还可以指定一个执行助理:++- **子任务** — 将一个大任务拆分为有序的多个部分(例如第一章、第二章、第三章),它们会嵌套显示在父任务下。+- **依赖关系** — 将某个任务标记为依赖另一个任务,只有在其依赖的任务完成后才会开始。+- **分配** — 将任务分配给指定的助理,该任务被触发时会由这个助理执行。+- **验收校验** — 开启验收校验后,会有一个独立的审查者按照设定的验收要求检查产出,通过后任务才算完成。++## 自动化任务++任务不仅可以是一次性的,也可以配置为周期性执行的自动化工作 —— 设置 cron 计划或固定的心跳间隔后,助理会持续自动运行该任务。完整流程参见[定时任务](/zh/docs/usage/agent/scheduled-task):在助理会话中打开左侧的**任务**面板,选中某个任务,在其详情的**自动化**区域配置计划。++## 使用 CLI++如果你使用 LobeHub CLI,同一套任务系统也可以通过命令行的 `lh task` 使用:++```+lh task list # 列出你的任务+lh task view T-1 # 查看某个任务的详情+lh task create -i "撰写发布说明" # 创建任务+lh task edit T-1 --status completed # 更新任务状态+```++这对于用脚本创建任务、在自动化流程中检查状态,或者在编码会话中一并管理任务而不用切换到界面非常有用。+## 使用场景**随时捕捉** — 会议中突然想到一件事?用一句话告诉助理,无需切换应用或打开任务管理器。-**周计划** — 开始一段对话:「这周我需要做这些……」助理会帮你整理成可执行的列表。+**周计划** — 开始一段对话:「这周我需要做这些……」助理会帮你整理成可执行的任务和子任务列表。**切换上下文** — 从一个项目转到另一个?问「营销项目上我还有什么没做完?」就能接着上次的进度继续。+**分派工作** — 把一个项目拆分为多个子任务,分配给最合适的助理,再让依赖关系和自动化计划驱动后续执行。+**协作准备** — 团队同步前,问「上周我有哪些待办事项?」带着准备去开会。-## GTD 工具与其他功能+## 任务工具与其他功能-| 功能 | 最适合 |-| ------------------------------------------- | ------------------------ |-| **GTD 工具** | 任务列表、截止日期、进度追踪 —— 通过对话管理 |-| [笔记本](/zh/docs/usage/agent/notebook) | 保存笔记、报告、研究资料 —— 与话题关联的文档 |-| [定时任务](/zh/docs/usage/agent/scheduled-task) | 自动化工作流 —— 助理按计划自动执行 |+| 功能 | 最适合 |+| ------------------------------------------- | ------------------------------- |+| **任务工具** | 任务列表、子任务、截止日期、分配、进度追踪 —— 通过对话管理 |+| [笔记本](/zh/docs/usage/agent/notebook) | 保存笔记、报告、研究资料 —— 与话题关联的文档 |+| [定时任务](/zh/docs/usage/agent/scheduled-task) | 自动化周期执行 —— 由任务的自动化计划驱动 |-个人任务管理用 GTD;需要助理在固定时间自动执行时用定时任务。+日常任务管理和分派用任务工具;需要任务按计划自动执行时,配置该任务的自动化。## 使用技巧- **明确时间** — 「明天上午 9 点」或「本周内」有助于助理在合适时机提醒你。- **定期回顾** — 每周初问「这周有什么要交的?」保持对承诺的掌控。-- **与笔记本配合** — 把会议纪要保存到笔记本,再让助理从中提取待办事项到 GTD 任务。+- **与笔记本配合** — 把会议纪要保存到笔记本,再让助理从中提取待办事项到任务中。+- **多步骤工作用子任务** — 把工作拆成带依赖关系的子任务,能让大项目保持有序,也便于独立分派各个部分。<Cards><Card href={'/zh/docs/usage/agent/notebook'} title={'笔记本'} />diff --git a/docs/usage/agent/scheduled-task.mdx b/docs/usage/agent/scheduled-task.mdxindex b59f5b0cf04..e42aab77797 100644--- a/docs/usage/agent/scheduled-task.mdx+++ b/docs/usage/agent/scheduled-task.mdx@@ -18,7 +18,7 @@ Scheduled tasks are jobs that run periodically in the cloud. In short, you can h## Creating a Task-Find **Scheduled Tasks** in the left panel of the Agent conversation page, and click `Add Scheduled Task` to start creating a task.+Scheduling now lives inside the Task system. Open **Tasks** in the left panel of the Agent conversation page, select (or create) a task, and open its **Automation** section in the task detail — that's where you turn on the **Scheduled** tab and configure the recurring schedule.@@ -44,11 +44,11 @@ Format as a brief executive summary.- **Daily** — Every day at a specified time- **Weekly** — On selected weekdays at a specified time (you can pick multiple days)-- **Hourly** — Every 1, 2, 6, 12, or 24 hours+- **Hourly** — Every N hours, where N is any whole number from 1 to 24**Time and timezone** — Set the exact time and timezone so the task runs at the correct local time. Times use 24-hour format. For distributed teams, getting the timezone right matters.-**Max executions** — Optionally cap how many times the task runs in total. Ongoing tasks often need no limit; for time-boxed campaigns (e.g. 30 days), you might set 30 — the task disables itself after reaching the limit.+**Max runs** — Optionally cap how many times the task runs in total. Ongoing tasks often need no limit; for time-boxed campaigns (e.g. 30 days), you might set 30 — the task disables itself after reaching the limit.After you create a task, you can change its configuration at any time.@@ -69,11 +69,6 @@ After you create a task, you can change its configuration at any time.- Frequency: Every 2 hours- Prompt: "Check for any critical alerts or anomalies and summarize findings."-**End-of-month review:**--- Frequency: Monthly — set Max Executions to once per month, or combine with a specific day-- Prompt: "Analyze this month's performance data and generate an executive report."-## Managing tasks### Viewing run history@@ -105,7 +100,7 @@ If you no longer need a scheduled task, you can delete it. Deletion removes the**Use descriptive task names** — Put purpose and timing in the name: "Weekly Competitor Analysis - Monday 9am" beats "Task 2".-**Set max executions while experimenting** — When testing a new scheduled task, use a max execution count of 5–10 so it doesn't run forever if the prompt needs tuning.+**Set Max runs while experimenting** — When testing a new scheduled task, cap Max runs at 5–10 so it doesn't run forever if the prompt needs tuning.**Timezone awareness** — Always set the correct timezone. "09:00" is interpreted in the configured timezone, which may differ from your local clock. Wrong timezone is a common cause of unexpected run times.@@ -131,7 +126,7 @@ Set reminders for milestones, recurring checks, or follow-ups. LobeHub can gener**Poor output quality** — Scheduled prompts run without chat history. Rewrite the prompt so it is fully self-contained, with background, data sources, and format requirements spelled out.-**Too many runs** — While experimenting, set a **Max executions** cap. If a task has already run more than intended, delete it and create a new one with the right limits.+**Too many runs** — While experimenting, set a **Max runs** cap. If a task has already run more than intended, delete it and create a new one with the right limits.<Cards><Card href={'/docs/usage/agent/web-search'} title={'Web Search'} />diff --git a/docs/usage/agent/scheduled-task.zh-CN.mdx b/docs/usage/agent/scheduled-task.zh-CN.mdxindex 937a3ee2545..53bd4fea0d6 100644--- a/docs/usage/agent/scheduled-task.zh-CN.mdx+++ b/docs/usage/agent/scheduled-task.zh-CN.mdx@@ -16,7 +16,7 @@ tags:## 创建任务-在 Agent 会话页面左侧面板找到定时任务,点击 `添加定时任务` 开始创建任务。+定时功能现已并入任务系统。在 Agent 会话页面左侧面板打开**任务**,选择(或新建)一个任务,在任务详情中打开**自动化**区域 —— 在这里切换到**定时**标签页并配置周期性计划。@@ -42,11 +42,11 @@ tags:- **每天** — 每天在指定时间执行- **每周** — 每周指定星期的指定时间(可选多天)-- **每小时** — 每隔 1、2、6、12 或 24 小时执行+- **每小时** — 每隔 N 小时执行一次,N 可以是 1 到 24 之间的任意整数**时间与时区** — 指定具体执行时间和时区,确保任务在正确的本地时间运行。时间采用 24 小时制。对于跨地区团队,时区设置尤为重要。-**最大执行次数** — 可选设置任务的总执行次数上限。长期任务无需限制;对于限时活动(如 30 天),可设置为 30,任务在达到上限后自动停用。+**运行次数限制** — 可选设置任务的总执行次数上限。长期任务无需限制;对于限时活动(如 30 天),可设置为 30,任务在达到上限后自动停用。创建完成后,你可以随时修改定时任务的配置。@@ -67,11 +67,6 @@ tags:- 频率:每 2 小时- Prompt:"检查是否有关键告警或异常,并汇总发现。"-**月度复盘:**--- 频率:按月,可将最大执行次数设为每月 1 次,或配合特定日期使用-- Prompt:"分析本月绩效数据,生成执行报告。"-## 管理任务### 查看执行历史@@ -103,7 +98,7 @@ tags:**使用描述性任务名称** — 在名称中体现用途和计划:"每周竞品分析 - 周一上午 9 点" 远比 "任务 2" 更实用。-**实验时设置最大执行次数** — 测试新定时任务时,将最大执行次数设为 5–10,避免提示词效果不符合预期时无限运行。+**实验时设置运行次数限制** — 测试新定时任务时,将运行次数限制设为 5–10,避免提示词效果不符合预期时无限运行。**时区意识** — 务必设置正确的时区。"09:00" 默认相对于服务器时区,可能与你的本地时间不同。时区配置错误是导致执行时间意外的常见原因。@@ -129,7 +124,7 @@ tags:**输出质量不佳** — 定时任务的 Prompt 在无对话上下文的情况下运行。请将 Prompt 改写为完全自包含的形式,包含所有必要的背景信息、数据来源和格式要求。-**执行次数过多** — 实验新任务时设置 "最大执行次数" 上限。如果任务已超出预期次数,可删除后重新创建。+**执行次数过多** — 实验新任务时设置 "运行次数限制" 上限。如果任务已超出预期次数,可删除后重新创建。<Cards><Card href={'/zh/docs/usage/agent/web-search'} title={'网络搜索'} />diff --git a/docs/usage/agent/topic.mdx b/docs/usage/agent/topic.mdxindex 924e5edd5c8..494f481e723 100644--- a/docs/usage/agent/topic.mdx+++ b/docs/usage/agent/topic.mdx@@ -46,12 +46,14 @@ Find the Topic you want to remove, click **Delete**, and confirm. The Topic is r## Topic List-Topics are organized by time to help you find conversations from any period.+Topics can be organized in whichever way helps you find things fastest. Use the grouping control above the list to switch modes:-- **Favorites** — All your favorited Topics, always at the top.-- **Time-Based Groups** — Other Topics are automatically grouped by creation time. Expand a group to see all Topics from that period.+- **By status** — Groups Topics by their run state (e.g. running, waiting for human, completed, failed, paused, archived) so you can quickly spot what needs attention.+- **By time** — Groups Topics by creation time (today, this week, this month, and so on). Expand a group to see all Topics from that period.+- **By project** — Groups Topics under the project or directory they belong to, with a catch-all group for Topics that aren't attached to one.+- **Flat** — Skips grouping entirely and shows every Topic in a single flat list.-If you'd rather see everything in a flat list, switch to **Ungrouped** view.+Favorited Topics always stay pinned at the top regardless of the grouping mode you choose.## Use Casesdiff --git a/docs/usage/agent/topic.zh-CN.mdx b/docs/usage/agent/topic.zh-CN.mdxindex 8d7bc8eabb4..87f8d2709e9 100644--- a/docs/usage/agent/topic.zh-CN.mdx+++ b/docs/usage/agent/topic.zh-CN.mdx@@ -44,12 +44,14 @@ tags:## 话题列表-话题按时间组织,方便查找不同时期的对话。+话题可以按最适合你查找的方式组织。在列表上方的分组控件中切换分组方式:-- **收藏列表** — 所有收藏的话题,始终置顶显示。-- **时间分组** — 其他话题按创建时间自动分组。展开对应时间段,查看该时期的所有话题。+- **按状态** — 按话题的运行状态分组(如进行中、等待处理、已完成、已失败、已暂停、已归档等),方便快速找到需要关注的话题。+- **按时间阶段** — 按创建时间分组(今天、本周、本月等)。展开对应时间段,查看该时期的所有话题。+- **按项目** — 按话题所属的项目或目录分组,未关联项目的话题会归入统一的分组。+- **平铺** — 不进行任何分组,将所有话题显示在同一个列表中。-如果你更喜欢看到所有话题的平铺列表,可以切换为**不分组**视图。+无论选择哪种分组方式,收藏的话题都会始终置顶显示。## 使用场景diff --git a/docs/usage/agent/translate.mdx b/docs/usage/agent/translate.mdxindex d3e055c3130..5daaa13e3fc 100644--- a/docs/usage/agent/translate.mdx+++ b/docs/usage/agent/translate.mdx@@ -34,8 +34,8 @@ You can specify which model to use for translation. A capable model produces mor<Image alt={'Configure Translation Model'} src={'/blog/assets6541bab7e0047f9c5dbad98dc272d64d.webp'} />- Open the **Settings** panel-- Navigate to **System Assistant** and find **Translation Settings**-- Assign a model to serve as your **Translation Assistant**+- Navigate to **System Tasks** and find **Message Translation**+- Assign a **Model** to use for translation**Tips:** Use a model with strong multilingual capability (e.g., GPT-4o, Claude, Gemini) for best results. Smaller or older models may produce rougher translations.diff --git a/docs/usage/agent/translate.zh-CN.mdx b/docs/usage/agent/translate.zh-CN.mdxindex 87f6a9f61e9..519ddc7e64e 100644--- a/docs/usage/agent/translate.zh-CN.mdx+++ b/docs/usage/agent/translate.zh-CN.mdx@@ -32,8 +32,8 @@ LobeHub 支持一键将对话内容翻译成目标语言。选择语言后,预<Image alt={'设置翻译模型'} src={'/blog/assets6541bab7e0047f9c5dbad98dc272d64d.webp'} />- 打开**设置**面板-- 进入**系统助理**,找到**翻译设置**-- 为**翻译助理**指定一个模型+- 进入**系统任务**,找到**消息内容翻译**+- 为其指定用于翻译的**模型****提示:** 使用多语言能力强的模型(如 GPT-4o、Claude、Gemini)可获得更好效果。较小或较旧的模型可能产出较粗糙的翻译。diff --git a/docs/usage/agent/tts-stt.mdx b/docs/usage/agent/tts-stt.mdxindex 25dc88c6bb9..9ca772c435c 100644--- a/docs/usage/agent/tts-stt.mdx+++ b/docs/usage/agent/tts-stt.mdx@@ -22,7 +22,7 @@ Voice features in LobeHub provide:- **Text-to-Speech (TTS)**: Convert AI text responses into spoken audio- **Speech-to-Text (STT)**: Speak your messages instead of typing- **Hands-Free Mode**: Continuous voice conversations combining both-- **Multiple Providers**: Choose from various voice styles and languages+- **Multiple Voices**: Choose from a range of OpenAI voice styles- **Per-Agent Voices**: Configure unique voices for different agents## Text-to-Speech (TTS)@@ -35,32 +35,22 @@ To have AI read text aloud, simply highlight any content in the chat window andYou can also configure an Agent to automatically read all responses as soon as each message completes — useful for hands-free workflows.-### Voice Providers and Options+### Voice Provider and Options-LobeHub supports two voice providers:+LobeHub's TTS runs on OpenAI's voice models — premium neural voices with natural prosody and intonation:-<Tabs>- <Tab title="OpenAI Voices">- Premium neural voices with natural prosody and intonation:-- | Voice | Character |- | ------- | ------------------- |- | Alloy | Neutral, balanced |- | Echo | Clear, professional |- | Fable | Warm, friendly |- | Onyx | Deep, authoritative |- | Nova | Energetic, engaging |- | Shimmer | Soft, gentle |-- **Best for**: Long-form content listening, professional use cases, content requiring natural flow.- </Tab>+| Voice | Character |+| ------- | ------------------- |+| Alloy | Neutral, balanced |+| Echo | Clear, professional |+| Fable | Warm, friendly |+| Onyx | Deep, authoritative |+| Nova | Energetic, engaging |+| Shimmer | Soft, gentle |- <Tab title="Microsoft Edge Speech">- Azure Neural Voices — an extensive library with 100+ voices across languages, regional accents (US, UK, AU, and more), and male/female options.+You can pick which OpenAI TTS model powers playback — `tts-1` (optimized for speed), `tts-1-hd` (optimized for quality), or `gpt-4o-mini-tts` — alongside the voice.- **Best for**: Specific accent requirements, multi-language content, variety.- </Tab>-</Tabs>+**Best for**: Long-form content listening, professional use cases, content requiring natural flow.### Playback Controls@@ -82,9 +72,9 @@ You can customize the voice conversion experience by selecting your preferred mo- Open the `Settings` panel- Navigate to the `Text-to-Speech` section-- Choose your desired voice service and AI model+- Choose your desired OpenAI TTS model and voice-Each Agent can have its own voice. To configure per-Agent: open Agent settings → TTS section → select voice provider → choose a voice → test with sample text → save.+Each Agent can have its own voice. To configure per-Agent: open Agent settings → TTS section → choose a voice → test with sample text → save.## Speech-to-Text (STT)diff --git a/docs/usage/agent/tts-stt.zh-CN.mdx b/docs/usage/agent/tts-stt.zh-CN.mdxindex ed734def0ef..5ab541a58f8 100644--- a/docs/usage/agent/tts-stt.zh-CN.mdx+++ b/docs/usage/agent/tts-stt.zh-CN.mdx@@ -23,11 +23,9 @@ TTS 将 AI 的文字回复转换为语音,让你可以收听而无需阅读。你还可以配置助理在每条消息完成后自动朗读所有回复,适合免提工作流程。-### 语音提供商与可选音色+### 语音服务与可选音色-LobeHub 支持两种语音提供商:--**OpenAI 语音** — 高质量神经语音,具有自然的语调和韵律:+LobeHub 的 TTS 基于 OpenAI 的语音模型 —— 高质量神经语音,具有自然的语调和韵律:| 音色 | 特点 || ------- | -------- |@@ -38,9 +36,9 @@ LobeHub 支持两种语音提供商:| Nova | 充满活力、吸引人 || Shimmer | 柔和、轻缓 |-适合长篇内容收听、专业使用场景和需要自然流畅感的内容。+除了音色,你还可以选择用于播报的 OpenAI TTS 模型 —— `tts-1`(速度优先)、`tts-1-hd`(音质优先)或 `gpt-4o-mini-tts`。-**Microsoft Edge Speech(Azure 神经语音)** — 拥有 100+ 跨语言音色的庞大音色库,支持区域口音(美式、英式、澳式等)以及男女声选项。适合有特定口音要求、多语言内容和多样化定制需求的场景。+适合长篇内容收听、专业使用场景和需要自然流畅感的内容。### 播放控制@@ -62,9 +60,9 @@ TTS 音频会自动缓存 —— 首次播放时实时生成,后续播放可- 打开`设置`面板- 找到`文字转语音`设置-- 选择您所需的语音服务和 AI 模型+- 选择你所需的 OpenAI TTS 模型和音色-每个助理可以拥有自己的音色。按助理配置:打开助理设置 → TTS 部分 → 选择语音提供商 → 选择音色 → 用示例文字测试 → 保存。+每个助理可以拥有自己的音色。按助理配置:打开助理设置 → TTS 部分 → 选择音色 → 用示例文字测试 → 保存。## 语音转文字(STT)diff --git a/docs/usage/agent/web-search.mdx b/docs/usage/agent/web-search.mdxindex 9672ad9f47a..407c625f6b0 100644--- a/docs/usage/agent/web-search.mdx+++ b/docs/usage/agent/web-search.mdx@@ -50,21 +50,20 @@ Expand the grounding card to see exactly where the information came from and eva## Enabling Web Search-Web search is not active by default — it requires plugin or MCP configuration.+Web search ships as a native built-in tool (`lobe-web-browsing`) — there's nothing to install. Turn it on per Agent with one click:-<Tabs>- <Tab title="Via Skills">- Install a web search Skill from the marketplace (Settings → Skills). Options include general web search, news search, and academic search. Some may require an API key from the search provider.- </Tab>+Open the Agent's **Profile**, click **+ Add Skill**, and enable **Web Search**. That's it — the Agent can now search the web automatically when a question needs current information, or on your explicit request.- <Tab title="Via MCP Servers">- Connect a search MCP server (Brave Search, Google Search, DuckDuckGo, etc.) in your MCP settings. This gives more control and supports custom search implementations.- </Tab>+<Callout type={'info'}>+ Built-in Web Search does not need a marketplace plugin or MCP install on the client. **Self-hosted+ deployments** still need a server search provider configured (default is SearXNG via+ `SEARXNG_URL` / `SEARCH_PROVIDERS`) — see [Online Search](/docs/self-hosting/advanced/online-search).+ Managed LobeHub Cloud already has this wired for you.+</Callout>- <Tab title="Per-Agent Configuration">- In Agent Settings → Skills, enable web search for that specific Agent and choose the search provider. This lets you control which Agents have web access.- </Tab>-</Tabs>+### Optional: MCP-Based Search Tools++If you want a specific search backend (Brave Search, Google Search, DuckDuckGo, etc.) or more control over the search implementation, you can alternatively connect a search MCP server in your MCP settings. This is optional — most use cases are already covered by the built-in Web Search Skill above.## Using Web Search@@ -216,8 +215,9 @@ Search queries are sent to your configured search provider. Source websites may</Tabs><Callout type={'info'}>- Web search requires either a search plugin or MCP server to be configured. Some search providers- require their own API key or subscription.+ Client-side, the built-in Web Search Skill needs no plugin or MCP install. Self-hosted servers+ still require search-provider env setup ([Online Search](/docs/self-hosting/advanced/online-search)).+ Optional MCP search backends may need their own API key or subscription.</Callout><Cards>diff --git a/docs/usage/agent/web-search.zh-CN.mdx b/docs/usage/agent/web-search.zh-CN.mdxindex 0f02e66265f..0fa0bdf5558 100644--- a/docs/usage/agent/web-search.zh-CN.mdx+++ b/docs/usage/agent/web-search.zh-CN.mdx@@ -48,13 +48,19 @@ LobeHub 的网络搜索集成让助理能够访问互联网上的实时信息## 启用网络搜索-网络搜索默认未开启,需要配置插件或 MCP 才能使用。+网络搜索是原生内置工具(`lobe-web-browsing`),无需安装任何插件。一键即可为某个助理启用:-**通过技能** — 从市场安装网络搜索技能(设置 → 技能)。可选包括通用网络搜索、新闻搜索和学术搜索等。部分需要搜索提供商的 API Key。+打开该助理的**档案**,点击 \*\*+ 添加技能 \*\*,启用**网络搜索**即可。启用后,当问题需要实时信息时助理会自动搜索,你也可以随时明确要求它搜索。-**通过 MCP 服务器** — 在 MCP 设置中连接搜索类 MCP 服务器(Brave Search、Google Search、DuckDuckGo 等)。控制更灵活,支持自定义搜索实现。+<Callout type={'info'}>+ 内置网络搜索在客户端无需安装市场插件或 MCP。**自托管部署**仍需配置服务端搜索提供商(默认 SearXNG,+ 依赖 `SEARXNG_URL` / `SEARCH_PROVIDERS`)—— 见+ [在线搜索](/zh/docs/self-hosting/advanced/online-search)。LobeHub Cloud 托管环境已预置好。+</Callout>++### 可选:基于 MCP 的搜索工具-**按助理配置** — 在助理设置 → 技能 中为该助理单独启用网络搜索,并选择搜索提供商。+如果你希望使用特定的搜索后端(如 Brave Search、Google Search、DuckDuckGo 等),或需要对搜索实现有更多控制,也可以在 MCP 设置中额外连接搜索类 MCP 服务器。这是可选项 —— 大多数场景使用上面的内置网络搜索技能就已足够。## 使用网络搜索@@ -138,7 +144,9 @@ LobeHub 的网络搜索集成让助理能够访问互联网上的实时信息- **创意与个人任务** — 纯创意写作或个人建议类问题不适合网络搜索 —— 它适用于有事实依据的问题<Callout type={'info'}>- 网络搜索需要配置搜索插件或 MCP 服务器才能使用。部分搜索提供商需要自行申请 API Key 或订阅。+ 客户端启用内置网络搜索技能时无需安装插件或 MCP。自托管服务端仍需配置搜索提供商(见+ [在线搜索](/zh/docs/self-hosting/advanced/online-search))。可选 MCP 搜索后端可能需要自行申请+ API Key 或订阅。</Callout><Cards>diff --git a/docs/usage/channels/feishu.mdx b/docs/usage/channels/feishu.mdxindex 2753322a3c0..7b178533d27 100644--- a/docs/usage/channels/feishu.mdx+++ b/docs/usage/channels/feishu.mdx@@ -23,6 +23,15 @@ By connecting a Feishu channel to your LobeHub agent, team members can interact- A LobeHub account with an active subscription- A Feishu account with permissions to create enterprise apps+## Connection Modes++LobeHub supports two connection modes for Feishu bots:++- **WebSocket (Recommended)** — Persistent connection using Feishu's official long-lived client. Events are delivered in real time; no public webhook URL is required, so this works out of the box even without a publicly reachable server. This is the default mode for new bots.+- **Webhook** — HTTP callbacks to an Event Subscription URL. Use this mode if you prefer a stateless callback setup or your app already has an Event Subscription URL configured on the Feishu Open Platform.++> **Note:** The steps below (Step 4) that configure an **Event Subscription URL** on the Feishu Open Platform only apply to **Webhook mode**. Skip them if you are using the default **WebSocket** mode.+## Step 1: Create a Feishu App<Steps>@@ -110,16 +119,25 @@ By connecting a Feishu channel to your LobeHub agent, team members can interact- **App ID** — The App ID from your Feishu app- **App Secret** — The App Secret from your Feishu app- > You don't need to fill in **Verification Token** or **Encrypt Key** at this point — you can set them up after configuring the Event Subscription in Step 4.+ ### Select Connection Mode- ### Save and Copy the Webhook URL+ In **Advanced Settings**, choose the **Connection Mode**:- Click **Save Configuration**. After saving, an **Event Subscription URL** will be displayed. Copy this URL — you will need it in the next step.+ - **WebSocket** (default) — Recommended for new bots; skip to Step 5.+ - **Webhook** — For apps with an existing Event Subscription URL on the Feishu Open Platform; continue to the next steps.++ > You don't need to fill in **Verification Token** or **Encrypt Key** at this point — you can set them up after configuring the Event Subscription in Step 4 (Webhook mode only).++ ### Save Configuration (Webhook Only)++ Click **Save Configuration**. In **Webhook mode**, an **Event Subscription URL** will be displayed after saving. Copy this URL — you will need it in the next step. In **WebSocket mode**, the bot connects automatically and no URL is generated.</Steps>-## Step 4: Set Up Event Subscription in Feishu+## Step 4: Set Up Event Subscription in Feishu (Webhook Only)++> Skip this step if you are using WebSocket mode (default).<Steps>### Open Event Subscription Settings@@ -221,9 +239,10 @@ See the [Channels overview](/docs/usage/channels/overview#direct-message-policy)| -------------------------- | -------- | -------------------------------------------------------------------------------------------------------- || **App ID** | Yes | Your Feishu app's App ID (`cli_xxx`) || **App Secret** | Yes | Your Feishu app's App Secret |+| **Connection Mode** | No | `websocket` (default) or `webhook`. Choose based on whether your app can accept a public webhook URL || **Verification Token** | No | Verifies webhook event source (recommended) |-| **Encrypt Key** | No | Decrypts encrypted event payloads |-| **Event Subscription URL** | — | Auto-generated after saving; paste into Feishu Developer Portal |+| **Encrypt Key** | No | Decrypts encrypted event payloads (Webhook mode only) |+| **Event Subscription URL** | — | Auto-generated after saving in Webhook mode; paste into Feishu Developer Portal || **Allowed User IDs** | No | Comma- or whitespace-separated Feishu `open_id` values. Global gate — applies to DMs and group @mentions || **DM Policy** | No | `open` (default), `allowlist`, `pairing`, or `disabled` — who is allowed to DM the bot || **Group Policy** | No | `open` (default), `allowlist`, or `disabled` — where the bot responds to @mentions |@@ -231,7 +250,8 @@ See the [Channels overview](/docs/usage/channels/overview#direct-message-policy)## Troubleshooting-- **Event Subscription URL verification failed:** Ensure you saved the configuration in LobeHub first, and the URL was copied correctly.+- **Bot not connecting (WebSocket mode):** Verify the App ID and App Secret are correct, and that the bot capability is enabled with the `im.message.receive_v1` event registered.+- **Event Subscription URL verification failed (Webhook mode):** Ensure you saved the configuration in LobeHub first, and the URL was copied correctly.- **Bot not responding:** Verify the app is published and approved, the bot capability is enabled, and the `im.message.receive_v1` event is subscribed.- **Bot ignores DMs:** Open **Advanced Settings** in LobeHub and check **DM Policy**. If it is `Disabled`, switch to `Open` or `Allowlist`. If it is `Allowlist`, confirm the sender's `open_id` is listed in **Allowed User IDs**.- **Permission errors:** Confirm all required permissions are added and approved in the Developer Portal.diff --git a/docs/usage/channels/feishu.zh-CN.mdx b/docs/usage/channels/feishu.zh-CN.mdxindex b549683db9f..1d56e1cf396 100644--- a/docs/usage/channels/feishu.zh-CN.mdx+++ b/docs/usage/channels/feishu.zh-CN.mdx@@ -19,6 +19,15 @@ tags:- 一个拥有有效订阅的 LobeHub 账户- 一个拥有创建企业应用权限的飞书账户+## 连接模式++LobeHub 支持两种飞书机器人连接模式:++- **WebSocket(推荐)** — 使用飞书官方的长连接客户端建立持久连接。事件实时推送,无需配置公网可访问的 Webhook 地址,即使没有公网服务器也能开箱即用。这是新机器人的默认模式。+- **Webhook** — 基于事件订阅 URL 的 HTTP 回调。如果您倾向于无状态的回调方式,或应用已在飞书开放平台配置了事件订阅 URL,可使用此模式。++> **注意:** 下文第四步中在飞书开放平台配置 **事件订阅 URL** 的步骤仅适用于 **Webhook 模式**。如果您使用默认的 **WebSocket** 模式,请跳过这些步骤。+## 第一步:创建飞书应用<Steps>@@ -106,16 +115,25 @@ tags:- **应用 ID** — 来自飞书应用的应用 ID- **应用密钥** — 来自飞书应用的应用密钥- > 此时您不需要填写 **Verification Token** 或 **Encrypt Key** —— 可以在完成第四步配置事件订阅后再设置。+ ### 选择连接模式- ### 保存并复制 Webhook URL+ 在 **高级设置** 中,选择 **连接模式**:- 点击 **保存配置**。保存后,将显示一个 **事件订阅 URL**。复制此 URL—— 您将在下一步中需要它。+ - **WebSocket**(默认)— 推荐新机器人使用,可直接跳到第五步。+ - **Webhook** — 适用于已在飞书开放平台配置了事件订阅 URL 的应用,请继续下面的步骤。++ > 此时您不需要填写 **Verification Token** 或 **Encrypt Key** —— 可以在完成第四步(仅 Webhook 模式需要)配置事件订阅后再设置。++ ### 保存配置(仅 Webhook 模式)++ 点击 **保存配置**。在 **Webhook 模式** 下,保存后将显示一个 **事件订阅 URL**,复制此 URL —— 您将在下一步中需要它。在 **WebSocket 模式** 下,机器人会自动连接,不会生成该 URL。</Steps>-## 第四步:在飞书中设置事件订阅+## 第四步:在飞书中设置事件订阅(仅 Webhook 模式)++> 如果您使用的是 WebSocket 模式(默认),请跳过此步骤。<Steps>### 打开事件订阅设置@@ -217,9 +235,10 @@ tags:| ---------------------- | ---- | ---------------------------------------------------------- || **应用 ID** | 是 | 您的飞书应用的应用 ID(`cli_xxx`) || **应用密钥** | 是 | 您的飞书应用的应用密钥 |+| **连接模式** | 否 | `websocket`(默认)或 `webhook`,根据应用是否能接收公网 Webhook 请求来选择 || **Verification Token** | 否 | 验证 webhook 事件来源(推荐) |-| **Encrypt Key** | 否 | 解密加密事件负载 |-| **事件订阅 URL** | — | 保存后自动生成;粘贴到飞书开发者门户 |+| **Encrypt Key** | 否 | 解密加密事件负载(仅 Webhook 模式使用) |+| **事件订阅 URL** | — | Webhook 模式下保存后自动生成;粘贴到飞书开发者门户 || **允许的用户 ID** | 否 | 逗号或空格分隔的飞书 `open_id`。全局闸门 — 私信和群聊 @ 都受其约束 || **私信策略** | 否 | `open`(默认)、`allowlist`、`pairing` 或 `disabled` — 控制谁可以私信机器人 || **群组策略** | 否 | `open`(默认)、`allowlist` 或 `disabled` — 控制机器人在哪些群中响应 |@@ -227,7 +246,8 @@ tags:## 故障排除-- **事件订阅 URL 验证失败:** 确保您已在 LobeHub 中保存配置,并正确复制了 URL。+- **机器人无法连接(WebSocket 模式):** 验证应用 ID 和应用密钥是否正确,并确认机器人功能已启用且已注册 `im.message.receive_v1` 事件。+- **事件订阅 URL 验证失败(Webhook 模式):** 确保您已在 LobeHub 中保存配置,并正确复制了 URL。- **机器人未响应:** 验证应用已发布并获得批准,机器人功能已启用,并订阅了 `im.message.receive_v1` 事件。- **机器人不回私信:** 在 LobeHub 的 **高级设置** 检查 **私信策略**。如果是 `Disabled`,改成 `Open` 或 `Allowlist`;如果是 `Allowlist`,确认发起方的 `open_id` 已加入 **允许的用户 ID**。- **权限错误:** 确保所有所需权限已在开发者门户中添加并获得批准。diff --git a/docs/usage/channels/lark.mdx b/docs/usage/channels/lark.mdxindex cf6e46a6d87..3a1100990c1 100644--- a/docs/usage/channels/lark.mdx+++ b/docs/usage/channels/lark.mdx@@ -22,6 +22,15 @@ By connecting a Lark channel to your LobeHub agent, team members can interact wi- A LobeHub account with an active subscription- A Lark account with permissions to create enterprise apps+## Connection Modes++LobeHub supports two connection modes for Lark bots:++- **WebSocket (Recommended)** — Persistent connection using Lark's official long-lived client. Events are delivered in real time; no public webhook URL is required, so this works out of the box even without a publicly reachable server. This is the default mode for new bots.+- **Webhook** — HTTP callbacks to an Event Subscription URL. Use this mode if you prefer a stateless callback setup or your app already has an Event Subscription URL configured on the Lark Open Platform.++> **Note:** The steps below (Step 4) that configure an **Event Subscription URL** on the Lark Open Platform only apply to **Webhook mode**. Skip them if you are using the default **WebSocket** mode.+## Step 1: Create a Lark App<Steps>@@ -103,16 +112,25 @@ By connecting a Lark channel to your LobeHub agent, team members can interact wi- **App ID** — The App ID from your Lark app- **App Secret** — The App Secret from your Lark app- > You don't need to fill in **Verification Token** or **Encrypt Key** at this point — you can set them up after configuring the Event Subscription in Step 4.+ ### Select Connection Mode- ### Save and Copy the Webhook URL+ In **Advanced Settings**, choose the **Connection Mode**:- Click **Save Configuration**. After saving, an **Event Subscription URL** will be displayed. Copy this URL — you will need it in the next step.+ - **WebSocket** (default) — Recommended for new bots; skip to Step 5.+ - **Webhook** — For apps with an existing Event Subscription URL on the Lark Open Platform; continue to the next steps.++ > You don't need to fill in **Verification Token** or **Encrypt Key** at this point — you can set them up after configuring the Event Subscription in Step 4 (Webhook mode only).++ ### Save Configuration (Webhook Only)++ Click **Save Configuration**. In **Webhook mode**, an **Event Subscription URL** will be displayed after saving. Copy this URL — you will need it in the next step. In **WebSocket mode**, the bot connects automatically and no URL is generated.</Steps>-## Step 4: Set Up Event Subscription in Lark+## Step 4: Set Up Event Subscription in Lark (Webhook Only)++> Skip this step if you are using WebSocket mode (default).<Steps>### Open Event Subscription Settings@@ -212,9 +230,10 @@ See the [Channels overview](/docs/usage/channels/overview#direct-message-policy)| -------------------------- | -------- | ------------------------------------------------------------------------------------------------------ || **App ID** | Yes | Your Lark app's App ID (`cli_xxx`) || **App Secret** | Yes | Your Lark app's App Secret |+| **Connection Mode** | No | `websocket` (default) or `webhook`. Choose based on whether your app can accept a public webhook URL || **Verification Token** | No | Verifies webhook event source (recommended) |-| **Encrypt Key** | No | Decrypts encrypted event payloads |-| **Event Subscription URL** | — | Auto-generated after saving; paste into Lark Developer Portal |+| **Encrypt Key** | No | Decrypts encrypted event payloads (Webhook mode only) |+| **Event Subscription URL** | — | Auto-generated after saving in Webhook mode; paste into Lark Developer Portal || **Allowed User IDs** | No | Comma- or whitespace-separated Lark `open_id` values. Global gate — applies to DMs and group @mentions || **DM Policy** | No | `open` (default), `allowlist`, `pairing`, or `disabled` — who is allowed to DM the bot || **Group Policy** | No | `open` (default), `allowlist`, or `disabled` — where the bot responds to @mentions |@@ -222,7 +241,8 @@ See the [Channels overview](/docs/usage/channels/overview#direct-message-policy)## Troubleshooting-- **Event Subscription URL verification failed:** Ensure you saved the configuration in LobeHub first, and the URL was copied correctly.+- **Bot not connecting (WebSocket mode):** Verify the App ID and App Secret are correct, and that the bot capability is enabled with the `im.message.receive_v1` event registered.+- **Event Subscription URL verification failed (Webhook mode):** Ensure you saved the configuration in LobeHub first, and the URL was copied correctly.- **Bot not responding:** Verify the app is published and approved, the bot capability is enabled, and the `im.message.receive_v1` event is subscribed.- **Bot ignores DMs:** Open **Advanced Settings** in LobeHub and check **DM Policy**. If it is `Disabled`, switch to `Open` or `Allowlist`. If it is `Allowlist`, confirm the sender's `open_id` is listed in **Allowed User IDs**.- **Permission errors:** Confirm all required permissions are added and approved in the Developer Portal.diff --git a/docs/usage/channels/lark.zh-CN.mdx b/docs/usage/channels/lark.zh-CN.mdxindex d49997bb07f..76054b8ccd7 100644--- a/docs/usage/channels/lark.zh-CN.mdx+++ b/docs/usage/channels/lark.zh-CN.mdx@@ -19,6 +19,15 @@ tags:- 一个拥有有效订阅的 LobeHub 账户- 一个拥有创建企业应用权限的 Lark 账户+## 连接模式++LobeHub 支持两种 Lark 机器人连接模式:++- **WebSocket(推荐)** — 使用 Lark 官方的长连接客户端建立持久连接。事件实时推送,无需配置公网可访问的 Webhook 地址,即使没有公网服务器也能开箱即用。这是新机器人的默认模式。+- **Webhook** — 基于事件订阅 URL 的 HTTP 回调。如果您倾向于无状态的回调方式,或应用已在 Lark 开放平台配置了事件订阅 URL,可使用此模式。++> **注意:** 下文第四步中在 Lark 开放平台配置 **Event Subscription URL** 的步骤仅适用于 **Webhook 模式**。如果您使用默认的 **WebSocket** 模式,请跳过这些步骤。+## 第一步:创建 Lark 应用<Steps>@@ -100,16 +109,25 @@ tags:- **App ID** — 来自 Lark 应用的 App ID- **App Secret** — 来自 Lark 应用的 App Secret- > 此时您不需要填写 **Verification Token** 或 **Encrypt Key** —— 可以在完成第四步配置事件订阅后再设置。+ ### 选择连接模式- ### 保存并复制 Webhook URL+ 在 **Advanced Settings** 中,选择 **Connection Mode**:- 点击 **Save Configuration**。保存后,将显示一个 **Event Subscription URL**。复制此 URL —— 您将在下一步中需要它。+ - **WebSocket**(默认)— 推荐新机器人使用,可直接跳到第五步。+ - **Webhook** — 适用于已在 Lark 开放平台配置了 Event Subscription URL 的应用,请继续下面的步骤。++ > 此时您不需要填写 **Verification Token** 或 **Encrypt Key** —— 可以在完成第四步(仅 Webhook 模式需要)配置事件订阅后再设置。++ ### 保存配置(仅 Webhook 模式)++ 点击 **Save Configuration**。在 **Webhook 模式** 下,保存后将显示一个 **Event Subscription URL**,复制此 URL —— 您将在下一步中需要它。在 **WebSocket 模式** 下,机器人会自动连接,不会生成该 URL。</Steps>-## 第四步:在 Lark 中设置事件订阅+## 第四步:在 Lark 中设置事件订阅(仅 Webhook 模式)++> 如果您使用的是 WebSocket 模式(默认),请跳过此步骤。<Steps>### 打开事件订阅设置@@ -209,9 +227,10 @@ tags:| -------------------------- | ---- | ---------------------------------------------------------- || **App ID** | 是 | 您的 Lark 应用的 App ID(`cli_xxx`) || **App Secret** | 是 | 您的 Lark 应用的 App Secret |+| **Connection Mode** | 否 | `websocket`(默认)或 `webhook`,根据应用是否能接收公网 Webhook 请求来选择 || **Verification Token** | 否 | 验证 webhook 事件来源(推荐) |-| **Encrypt Key** | 否 | 解密加密事件负载 |-| **Event Subscription URL** | — | 保存后自动生成;粘贴到 Lark 开发者门户 |+| **Encrypt Key** | 否 | 解密加密事件负载(仅 Webhook 模式使用) |+| **Event Subscription URL** | — | Webhook 模式下保存后自动生成;粘贴到 Lark 开发者门户 || **允许的用户 ID** | 否 | 逗号或空格分隔的 Lark `open_id`。全局闸门 — 私信和群聊 @ 都受其约束 || **私信策略** | 否 | `open`(默认)、`allowlist`、`pairing` 或 `disabled` — 控制谁可以私信机器人 || **群组策略** | 否 | `open`(默认)、`allowlist` 或 `disabled` — 控制机器人在哪些群中响应 |@@ -219,7 +238,8 @@ tags:## 故障排除-- **Event Subscription URL 验证失败:** 确保您已在 LobeHub 中保存配置,并正确复制了 URL。+- **机器人无法连接(WebSocket 模式):** 验证 App ID 和 App Secret 是否正确,并确认机器人功能已启用且已注册 `im.message.receive_v1` 事件。+- **Event Subscription URL 验证失败(Webhook 模式):** 确保您已在 LobeHub 中保存配置,并正确复制了 URL。- **机器人未响应:** 验证应用已发布并获得批准,机器人功能已启用,并订阅了 `im.message.receive_v1` 事件。- **机器人不回私信:** 在 LobeHub 的 **高级设置** 检查 **私信策略**。如果是 `Disabled`,改成 `Open` 或 `Allowlist`;如果是 `Allowlist`,确认发起方的 `open_id` 已加入 **允许的用户 ID**。- **权限错误:** 确保所有所需权限已在开发者门户中添加并获得批准。diff --git a/docs/usage/channels/line.mdx b/docs/usage/channels/line.mdxindex 05eaa190752..7fc09db8126 100644--- a/docs/usage/channels/line.mdx+++ b/docs/usage/channels/line.mdx@@ -183,7 +183,7 @@ LINE's Messaging API has a few specifics that LobeHub maps as follows:- **Typing indicator** — the loading animation is shown in 1:1 user chats only. Group and multi-person room threads silently no-op.- **Reactions** — LINE bots cannot send message reactions today, so the 👀 / ✏️ status reactions used on Discord and Slack are not surfaced.- **Outbound** — LobeHub uses the **push API** (`/v2/bot/message/push`) rather than the reply API, because the reply token expires in \~60s while agent generation can take longer. Push messages count against your channel's monthly quota for paid plans; the free Developer Trial is unlimited.-- **Attachments** — inbound images, video, audio, and files are downloaded on demand from the LINE data domain and forwarded to the model. Outbound replies are text-only today.+- **Attachments** — inbound images, video, audio, and files are downloaded on demand from the LINE data domain and forwarded to the model. Outbound: LINE's Messaging API has no inline binary upload, so only images with a public HTTPS URL are sent as native LINE image messages. Video, audio, and file attachments — and any attachment without a public HTTPS URL — are degraded to a text message with a link to the file (or a placeholder note if no URL is available).## Troubleshootingdiff --git a/docs/usage/channels/line.zh-CN.mdx b/docs/usage/channels/line.zh-CN.mdxindex ae0748946f0..3551864c12b 100644--- a/docs/usage/channels/line.zh-CN.mdx+++ b/docs/usage/channels/line.zh-CN.mdx@@ -182,7 +182,7 @@ LINE Messaging API 有一些平台层面的限制,LobeHub 的对接行为如- **输入提示动画** —— 仅对 1:1 用户聊天有效,群组与多人聊天室静默 no-op。- **表情反应** —— LINE 机器人当前不能发送消息反应,Discord/Slack 上使用的 👀 / ✏️ 状态反应不会显示。- **出站** —— LobeHub 使用 **push API**(`/v2/bot/message/push`)而非 reply API,因为 reply token 60 秒就过期,而 agent 生成回复可能更慢。Push 消息会消耗付费方案的月度配额,免费的 Developer Trial 实际不限量。-- **附件** —— 入站的图片、视频、音频、文件会按需通过 LINE 数据子域下载并送给模型;出站消息当前仅支持文本。+- **附件** —— 入站的图片、视频、音频、文件会按需通过 LINE 数据子域下载并送给模型。出站方面:LINE Messaging API 不支持内联二进制上传,因此只有带公网 HTTPS URL 的图片会作为原生 LINE 图片消息发送;视频、音频、文件附件,以及任何没有公网 HTTPS URL 的附件,都会降级为带链接的文本消息(如果没有可用 URL,则显示一条占位提示)。## 故障排除diff --git a/docs/usage/channels/overview.mdx b/docs/usage/channels/overview.mdxindex b5f210b790d..0d906d86593 100644--- a/docs/usage/channels/overview.mdx+++ b/docs/usage/channels/overview.mdx@@ -73,7 +73,7 @@ Text messages are supported across all platforms. Some features vary by platform| Direct messages | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes || Group chats | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes || Reactions | Yes | Yes | Yes | No | No | No | Partial | Partial |-| Image/file attachments | Yes | Yes | Yes | Inbound | Yes | No | Yes | Yes |+| Image/file attachments | Yes | Yes | Yes | Inbound | Yes | Yes | Yes | Yes |## Allowed Users (global)@@ -124,7 +124,7 @@ Every supported platform defaults to **Open** for both policies so the bot stays- **Discord** — Enable Developer Mode in user settings, right-click the user, and choose **Copy User ID**.- **Slack** — Open the user's profile → click the `⋮` menu → **Copy member ID** (starts with `U`).- **Telegram** — Ask the user to message [@userinfobot](https://t.me/userinfobot), or read `from.id` from the bot's incoming update.-- **QQ** — Use the `tiny_id` from the OpenAPI event payload (the public-facing QQ number is not guaranteed to be the platform ID).+- **QQ** — Use the `openid` from the OpenAPI event payload — `user_openid` for private (C2C) messages, `member_openid` for group messages (the public-facing QQ number is not guaranteed to be the platform ID).- **Feishu / Lark** — Use the `open_id` from the event payload, or the **User ID** displayed in the developer portal.### Finding a channel / group IDdiff --git a/docs/usage/channels/overview.zh-CN.mdx b/docs/usage/channels/overview.zh-CN.mdxindex 2e3ee2f8ab2..cdd19cac748 100644--- a/docs/usage/channels/overview.zh-CN.mdx+++ b/docs/usage/channels/overview.zh-CN.mdx@@ -72,7 +72,7 @@ tags:| 私人消息 | 是 | 是 | 是 | 是 | 是 | 是 | 是 | 是 || 群组聊天 | 是 | 是 | 是 | 是 | 是 | 是 | 是 | 是 || 表情反应 | 是 | 是 | 是 | 否 | 否 | 否 | 部分支持 | 部分支持 |-| 图片 / 文件附件 | 是 | 是 | 是 | 仅入站 | 是 | 否 | 是 | 是 |+| 图片 / 文件附件 | 是 | 是 | 是 | 仅入站 | 是 | 是 | 是 | 是 |## 允许的用户(全局)@@ -123,7 +123,7 @@ tags:- **Discord** — 在用户设置里开启开发者模式,右键用户头像选 **复制用户 ID**。- **Slack** — 打开用户资料 → 点击 `⋮` 菜单 → **复制成员 ID**(以 `U` 开头)。- **Telegram** — 让用户私信 [@userinfobot](https://t.me/userinfobot),或者从机器人收到的 update 里读 `from.id`。-- **QQ** — 使用 OpenAPI 事件 payload 里的 `tiny_id`(用户对外可见的 QQ 号不一定就是平台 ID)。+- **QQ** — 使用 OpenAPI 事件 payload 里的 `openid` —— 私聊(C2C)消息用 `user_openid`,群聊消息用 `member_openid`(用户对外可见的 QQ 号不一定就是平台 ID)。- **飞书 / Lark** — 使用事件 payload 里的 `open_id`,或开发者后台显示的 **User ID**。### 如何获取频道 / 群组 IDdiff --git a/docs/usage/channels/qq.mdx b/docs/usage/channels/qq.mdxindex 0fef1be322b..7bddc9f9985 100644--- a/docs/usage/channels/qq.mdx+++ b/docs/usage/channels/qq.mdx@@ -138,13 +138,13 @@ One optional field under **Advanced Settings** carries a lot of weight in day-to### Your Platform User ID-This is your own QQ `tiny_id` (the platform-level user identifier — **not** the public-facing QQ number, which doesn't always match), used by:+This is your own QQ `user_openid` (the platform-level user identifier for private/C2C chats — **not** the public-facing QQ number, which doesn't always match), used by:- **Pairing approval** — required when **DM Policy** is set to **Pairing**, since `/approve <code>` is the owner's command and the runtime checks the sender against this ID.- **AI tools push** — lets the agent reach you proactively (reminders, notifications) by mapping its internal user reference to your QQ account.- **Anti-lockout** — auto-trusted by **Allowed Users**, so scoping the bot to friends won't accidentally lock you out.-To get it: DM the bot once with any message and check the server logs for the `tiny_id` field on the inbound event payload (or read it from the OpenAPI dashboard if available). Paste the long numeric ID into **Your Platform User ID** in LobeHub's Advanced Settings.+To get it: DM the bot once with any message and check the server logs for the `user_openid` field on the inbound event payload (or read it from the OpenAPI dashboard if available). Paste that ID into **Your Platform User ID** in LobeHub's Advanced Settings.> QQ doesn't expose a single "default server" concept that AI tools can pivot on, so the **Default Server** field is not exposed for QQ channels.@@ -162,7 +162,7 @@ Two independent policies gate inbound traffic. Both default to **Open**.### Allowed User IDs (global)-A populated **Allowed User IDs** field is a global gate — DMs *and* group `@mentions` are restricted to listed QQ `tiny_id` values. Empty means "no user-level filter". Use the platform `tiny_id` from the OpenAPI event payload — the visible QQ number is not always the same as the platform ID.+A populated **Allowed User IDs** field is a global gate — DMs *and* group `@mentions` are restricted to listed QQ `openid` values (`user_openid` for private/C2C chats, `member_openid` for group chats). Empty means "no user-level filter". Read the appropriate `openid` field from the OpenAPI event payload — the visible QQ number is not always the same as the platform ID.### DM Policy@@ -183,15 +183,15 @@ See the [Channels overview](/docs/usage/channels/overview#direct-message-policy)## Configuration Reference-| Field | Required | Description |-| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------- |-| **Application ID** | Yes | Your bot's App ID from QQ Open Platform |-| **App Secret** | Yes | Your bot's App Secret from QQ Open Platform |-| **Connection Mode** | No | `websocket` (default) or `webhook`. Choose based on your QQ Open Platform configuration |-| **Allowed User IDs** | No | Comma- or whitespace-separated QQ `tiny_id` values. Global gate — applies to DMs and group @mentions |-| **DM Policy** | No | `open` (default), `allowlist`, `pairing`, or `disabled` — who is allowed to DM the bot |-| **Group Policy** | No | `open` (default), `allowlist`, or `disabled` — where the bot responds to @mentions |-| **Allowed Channel IDs** | No | Comma- or whitespace-separated QQ group IDs. Used when Group Policy is Allowlist |+| Field | Required | Description |+| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |+| **Application ID** | Yes | Your bot's App ID from QQ Open Platform |+| **App Secret** | Yes | Your bot's App Secret from QQ Open Platform |+| **Connection Mode** | No | `websocket` (default) or `webhook`. Choose based on your QQ Open Platform configuration |+| **Allowed User IDs** | No | Comma- or whitespace-separated QQ `openid` values (`user_openid` for DMs, `member_openid` for groups). Global gate — applies to DMs and group @mentions |+| **DM Policy** | No | `open` (default), `allowlist`, `pairing`, or `disabled` — who is allowed to DM the bot |+| **Group Policy** | No | `open` (default), `allowlist`, or `disabled` — where the bot responds to @mentions |+| **Allowed Channel IDs** | No | Comma- or whitespace-separated QQ group IDs. Used when Group Policy is Allowlist |## Limitationsdiff --git a/docs/usage/channels/qq.zh-CN.mdx b/docs/usage/channels/qq.zh-CN.mdxindex 0911e0ea213..7c342ecf84b 100644--- a/docs/usage/channels/qq.zh-CN.mdx+++ b/docs/usage/channels/qq.zh-CN.mdx@@ -135,13 +135,13 @@ LobeHub 支持两种 QQ 机器人连接模式:### 你的平台用户 ID-也就是你自己的 QQ `tiny_id`(平台级用户标识符 ——**不是**对外可见的 QQ 号,两者不一定一致),用于:+也就是你自己的 QQ `user_openid`(私聊 / C2C 场景下的平台级用户标识符 ——**不是**对外可见的 QQ 号,两者不一定一致),用于:- **配对审批** — 当 **私信策略** 为 **配对审批** 时为必填项,`/approve <code>` 是属主命令,runtime 会用这个 ID 校验发起人。- **AI 工具主动推送** — 让 Agent 能主动联系你(提醒、通知),把内部用户引用映射到你的 QQ 账号。- **防自锁** — 自动被 **允许的用户** 信任,给好友收紧 bot 时不会把自己挡在外面。-获取方式:先用任意消息私信 bot 一次,然后在 server log 里查看入站事件 payload 中的 `tiny_id` 字段(或在 OpenAPI 控制台读取,如果有)。把那串长数字 ID 粘贴到 LobeHub 高级设置的 **你的平台用户 ID** 字段。+获取方式:先用任意消息私信 bot 一次,然后在 server log 里查看入站事件 payload 中的 `user_openid` 字段(或在 OpenAPI 控制台读取,如果有)。把这个 ID 粘贴到 LobeHub 高级设置的 **你的平台用户 ID** 字段。> QQ 没有一个稳定的 "默认服务器" 概念可让 AI 工具默认指向,因此 QQ 渠道不展示 **默认服务器** 字段。@@ -159,7 +159,7 @@ LobeHub 支持两种 QQ 机器人连接模式:### 允许的用户 ID(全局)-填入 **允许的用户 ID** 后,**所有**入站消息(私信和群聊 `@提及`)都必须来自列表里的 QQ `tiny_id`。留空则不做用户级过滤。`tiny_id` 来自 OpenAPI 事件 payload —— 用户对外可见的 QQ 号不一定就是平台 ID。+填入 **允许的用户 ID** 后,**所有**入站消息(私信和群聊 `@提及`)都必须来自列表里的 QQ `openid`(私信 / C2C 用 `user_openid`,群聊用 `member_openid`)。留空则不做用户级过滤。从 OpenAPI 事件 payload 中读取对应的 `openid` 字段 —— 用户对外可见的 QQ 号不一定就是平台 ID。### 私信策略@@ -180,15 +180,15 @@ LobeHub 支持两种 QQ 机器人连接模式:## 配置参考-| 字段 | 是否必需 | 描述 |-| -------------- | ---- | ---------------------------------------------------------- |-| **应用 ID** | 是 | 来自 QQ 开放平台的 App ID |-| **App Secret** | 是 | 来自 QQ 开放平台的 App Secret |-| **连接模式** | 否 | `websocket`(默认)或 `webhook`,根据 QQ 开放平台配置选择 |-| **允许的用户 ID** | 否 | 逗号或空格分隔的 QQ `tiny_id`。全局闸门 — 私信和群聊 @ 都受其约束 |-| **私信策略** | 否 | `open`(默认)、`allowlist`、`pairing` 或 `disabled` — 控制谁可以私信机器人 |-| **群组策略** | 否 | `open`(默认)、`allowlist` 或 `disabled` — 控制机器人在哪些群中响应 |-| **允许的频道 ID** | 否 | 逗号或空格分隔的 QQ 群 ID。仅在群组策略为白名单时使用 |+| 字段 | 是否必需 | 描述 |+| -------------- | ---- | -------------------------------------------------------------------------------- |+| **应用 ID** | 是 | 来自 QQ 开放平台的 App ID |+| **App Secret** | 是 | 来自 QQ 开放平台的 App Secret |+| **连接模式** | 否 | `websocket`(默认)或 `webhook`,根据 QQ 开放平台配置选择 |+| **允许的用户 ID** | 否 | 逗号或空格分隔的 QQ `openid`(私信用 `user_openid`,群聊用 `member_openid`)。全局闸门 — 私信和群聊 @ 都受其约束 |+| **私信策略** | 否 | `open`(默认)、`allowlist`、`pairing` 或 `disabled` — 控制谁可以私信机器人 |+| **群组策略** | 否 | `open`(默认)、`allowlist` 或 `disabled` — 控制机器人在哪些群中响应 |+| **允许的频道 ID** | 否 | 逗号或空格分隔的 QQ 群 ID。仅在群组策略为白名单时使用 |## 功能限制diff --git a/docs/usage/channels/telegram.mdx b/docs/usage/channels/telegram.mdxindex 9e84da7d5a4..9feba2099fa 100644--- a/docs/usage/channels/telegram.mdx+++ b/docs/usage/channels/telegram.mdx@@ -52,8 +52,6 @@ By connecting a Telegram channel to your LobeHub agent, users can interact withPaste the bot token you received from BotFather into the **Bot Token** field.- The **Bot User ID** will be automatically derived from your token — no need to enter it manually.-### Optional: Set a Webhook SecretYou can optionally enter a **Webhook Secret Token** for additional security. This is used to verify that incoming webhook requests originate from Telegram.@@ -127,7 +125,6 @@ See the [Channels overview](/docs/usage/channels/overview#direct-message-policy)| Field | Required | Description || ------------------------ | -------- | -------------------------------------------------------------------------------------------------------------- || **Bot Token** | Yes | API token from BotFather |-| **Bot User ID** | Auto | Automatically derived from the bot token || **Webhook Secret Token** | No | Optional secret for verifying webhook requests || **Allowed User IDs** | No | Comma- or whitespace-separated Telegram numeric user IDs. Global gate — applies to DMs and group @mentions || **DM Policy** | No | `open` (default), `allowlist`, `pairing`, or `disabled` — who is allowed to DM the bot |diff --git a/docs/usage/channels/telegram.zh-CN.mdx b/docs/usage/channels/telegram.zh-CN.mdxindex df3ba8b390e..89ed4a13ca7 100644--- a/docs/usage/channels/telegram.zh-CN.mdx+++ b/docs/usage/channels/telegram.zh-CN.mdx@@ -51,8 +51,6 @@ tags:将您从 BotFather 收到的机器人令牌粘贴到 **机器人令牌** 字段中。- **机器人用户 ID** 将根据您的令牌自动生成,无需手动输入。-### 可选:设置 Webhook 密钥您可以选择输入一个 **Webhook 密钥令牌** 以增加安全性。此密钥用于验证来自 Telegram 的入站 Webhook 请求。@@ -126,7 +124,6 @@ tags:| 字段 | 是否必需 | 描述 || ---------------- | ---- | ---------------------------------------------------------- || **机器人令牌** | 是 | 来自 BotFather 的 API 令牌 |-| **机器人用户 ID** | 自动 | 根据机器人令牌自动生成 || **Webhook 密钥令牌** | 否 | 用于验证 Webhook 请求的可选密钥 || **允许的用户 ID** | 否 | 逗号或空格分隔的 Telegram 数字用户 ID。全局闸门 — 私信和群聊 @ 都受其约束 || **私信策略** | 否 | `open`(默认)、`allowlist`、`pairing` 或 `disabled` — 控制谁可以私信机器人 |diff --git a/docs/usage/channels/wechat.mdx b/docs/usage/channels/wechat.mdxindex 80da2a98b6c..89f736c452f 100644--- a/docs/usage/channels/wechat.mdx+++ b/docs/usage/channels/wechat.mdx@@ -60,11 +60,11 @@ To use the bot in WeChat groups:## Advanced Settings-| Setting | Default | Description |-| ------------------------ | ------- | -------------------------------------------------------- |-| **Character Limit** | 2000 | Maximum characters per message (range: 100–2000) |-| **Message Merge Window** | 2000 ms | How long to wait for additional messages before replying |-| **Show Usage Stats** | Off | Display token/cost stats in replies |+| Setting | Default | Description |+| ------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| **Character Limit** | 2000 | Maximum characters per message (range: 100–2048) |+| **Message Merge Window** | 5000 ms | How long to wait for additional messages before replying. Only takes effect when **Concurrency Mode** is set to `debounce` — the default `queue` mode processes each message as it arrives |+| **Show Usage Stats** | Off | Display token/cost stats in replies |## How It Works@@ -81,8 +81,7 @@ This polling is managed by a background cron job, so the connection is maintaine- **No message editing** — WeChat does not support editing sent messages. Updated responses will be sent as new messages.- **No reactions** — WeChat iLink Bot API does not support emoji reactions.-- **Text only** — Only text messages are currently supported. Image and file attachments are not yet available.-- **Message length limit** — Messages exceeding 2000 characters will be automatically split into multiple messages.+- **Message length limit** — Messages exceeding the character limit will be automatically split into multiple messages.- **Session expiration** — The bot session may expire and require re-authentication by scanning a new QR code.## Troubleshootingdiff --git a/docs/usage/channels/wechat.zh-CN.mdx b/docs/usage/channels/wechat.zh-CN.mdxindex 1a0345ebe46..5cbc08fa00c 100644--- a/docs/usage/channels/wechat.zh-CN.mdx+++ b/docs/usage/channels/wechat.zh-CN.mdx@@ -57,11 +57,11 @@ tags:## 高级设置-| 设置 | 默认值 | 描述 |-| ---------- | ------- | ----------------------- |-| **字符限制** | 2000 | 每条消息的最大字符数(范围:100–2000) |-| **消息合并窗口** | 2000 毫秒 | 等待更多消息再回复的时间 |-| **显示使用统计** | 关闭 | 在回复中显示 Token 用量 / 成本统计 |+| 设置 | 默认值 | 描述 |+| ---------- | ------- | --------------------------------------------------------------------------------------- |+| **字符限制** | 2000 | 每条消息的最大字符数(范围:100–2048) |+| **消息合并窗口** | 5000 毫秒 | 等待更多消息再回复的时间。仅当 **并发模式(Concurrency Mode)** 设为 `debounce` 时生效 —— 默认的 `queue` 模式会逐条即时处理消息 |+| **显示使用统计** | 关闭 | 在回复中显示 Token 用量 / 成本统计 |## 工作原理@@ -78,8 +78,7 @@ tags:- **不支持消息编辑** — 微信不支持编辑已发送的消息。更新的回复将作为新消息发送。- **不支持表情回应** — 微信 iLink Bot API 不支持表情回应功能。-- **仅支持文本** — 目前仅支持文本消息。图片和文件附件暂不可用。-- **消息长度限制** — 超过 2000 个字符的消息将被自动拆分为多条消息发送。+- **消息长度限制** — 超过字符限制的消息将被自动拆分为多条消息发送。- **会话过期** — 机器人会话可能会过期,需要重新扫码认证。## 故障排除diff --git a/docs/usage/community/skills-and-tools.mdx b/docs/usage/community/skills-and-tools.mdxindex 22e6313b7d0..a36147c32c9 100644--- a/docs/usage/community/skills-and-tools.mdx+++ b/docs/usage/community/skills-and-tools.mdx@@ -14,6 +14,11 @@ tags:# Skills and Tools+<Callout type={'warning'}>+ This page is outdated. Skill and tool management is now documented in [Skill+ Management](/docs/usage/community/skill-management).+</Callout>+Skills and tools are what transform agents from conversational interfaces into productive teammates. While agents can chat and reason, **skills** give them expertise and **tools** give them capabilities to take action.Think of skills as what an agent **knows** and tools as what an agent **can do**.@@ -116,7 +121,7 @@ Tools are functions that agents can call to perform actions. When you ask an ageLobeHub includes several powerful built-in tools:- **Web Search** — Search the internet for current information, news, and data-- **Image Generation** — Create images using DALL-E, Midjourney, or other providers+- **Image Generation** — Create images using GPT Image, Flux, or other supported models- **Memory Management** — Store and retrieve information from personal memory- **Page Agent Tools** — Initialize and edit documents in the page editor- **Agent Builder Tools** — Create and configure new agentsdiff --git a/docs/usage/getting-started/agent.mdx b/docs/usage/getting-started/agent.mdxindex 128caba5ab4..d902fa3464c 100644--- a/docs/usage/getting-started/agent.mdx+++ b/docs/usage/getting-started/agent.mdx@@ -130,13 +130,13 @@ When responding:Different models have different strengths:-| Model | Best For |-| ------------------------- | --------------------------------------------- |-| GPT-4o, Claude Sonnet | Balanced performance, coding, analysis |-| Claude Opus, GPT-o1 | Complex reasoning, nuanced tasks |-| Gemini | Multi-modal tasks, long context |-| GPT-4o-mini, Claude Haiku | Fast responses, simple tasks, cost efficiency |-| Ollama (local) | Privacy-sensitive tasks, offline use |+| Model | Best For |+| ---------------------------- | --------------------------------------------- |+| GPT-5, Claude Sonnet 4.6 | Balanced performance, coding, analysis |+| Claude Opus 4.8, o3 | Complex reasoning, nuanced tasks |+| Gemini | Multi-modal tasks, long context |+| GPT-5 mini, Claude Haiku 4.5 | Fast responses, simple tasks, cost efficiency |+| Ollama (local) | Privacy-sensitive tasks, offline use |Match the model to the task complexity and your budget. For Agents that handle routine tasks, a smaller model is often sufficient and faster.diff --git a/docs/usage/getting-started/agent.zh-CN.mdx b/docs/usage/getting-started/agent.zh-CN.mdxindex 0e8e1a91266..bfa22ba1cab 100644--- a/docs/usage/getting-started/agent.zh-CN.mdx+++ b/docs/usage/getting-started/agent.zh-CN.mdx@@ -120,13 +120,13 @@ Agent Builder 是 LobeHub 的内置助理,专门帮你创建其他助理。用不同模型各有所长:-| 模型 | 最适合 |-| ------------------------ | -------------- |-| GPT-4o、Claude Sonnet | 综合性能、代码、分析 |-| Claude Opus、GPT-o1 | 复杂推理、精细任务 |-| Gemini | 多模态任务、长上下文 |-| GPT-4o-mini、Claude Haiku | 快速响应、简单任务、成本优化 |-| Ollama(本地) | 隐私敏感任务、离线使用 |+| 模型 | 最适合 |+| --------------------------- | -------------- |+| GPT-5、Claude Sonnet 4.6 | 综合性能、代码、分析 |+| Claude Opus 4.8、o3 | 复杂推理、精细任务 |+| Gemini | 多模态任务、长上下文 |+| GPT-5 mini、Claude Haiku 4.5 | 快速响应、简单任务、成本优化 |+| Ollama(本地) | 隐私敏感任务、离线使用 |根据任务复杂度和预算选择合适的模型。处理日常任务的助理,较小的模型往往已足够且响应更快。diff --git a/docs/usage/getting-started/resource.mdx b/docs/usage/getting-started/resource.mdxindex cf6ce253aad..6d1b7da0640 100644--- a/docs/usage/getting-started/resource.mdx+++ b/docs/usage/getting-started/resource.mdx@@ -68,7 +68,7 @@ graph LR## Where Resources Come From- **Conversation uploads** — Files uploaded during chats are automatically saved to the Resource Library. Upload a PDF for summarization, and it stays available for future use.-- **AI-generated content** — Images created in the Drawing module are saved automatically. View, download, and reuse them in conversations or drafts anytime.+- **AI-generated content** — Images created in the Image workspace are saved automatically. View, download, and reuse them in conversations or drafts anytime.- **Manual uploads** — Upload files or folders directly to build your knowledge base. Supported formats: documents, images, video, audio, and more.- **Drafts** — Pages created in the writing module are stored here for unified management.- **Notion import** — Import content from Notion into LobeHub for seamless knowledge management across platforms.@@ -233,7 +233,7 @@ When answering product questions:- **Chat + Resource Library** — Reference resources during conversations so the Agent answers from your knowledge- **Pages + Resource Library** — Use materials from the Resource Library while writing to enhance content creation-- **Drawing + Resource Library** — Save generated images to the Resource Library for centralized management of visual assets+- **Image + Resource Library** — Save generated images to the Resource Library for centralized management of visual assets## Use Casesdiff --git a/docs/usage/getting-started/resource.zh-CN.mdx b/docs/usage/getting-started/resource.zh-CN.mdxindex 1c4d7b2702a..093b6632c4f 100644--- a/docs/usage/getting-started/resource.zh-CN.mdx+++ b/docs/usage/getting-started/resource.zh-CN.mdx@@ -17,7 +17,7 @@ tags:## 资源的来源- **对话上传** — 在与助理对话时上传的文件会自动保存到资源库。例如你上传一份 PDF 让助理总结,这份文件会保留在资源库中,下次可以继续使用。-- **AI 生成** — 在画图板块生成的图片会自动保存到资源库。你可以随时查看、下载、在对话和文稿中使用这些图片。+- **AI 生成** — 在图像板块生成的图片会自动保存到资源库。你可以随时查看、下载、在对话和文稿中使用这些图片。- **主动上传** — 你可以在资源库直接上传文件或文件夹,主动构建知识库。支持文档、图片、视频、音频等多种格式。- **文稿创建** — 在文稿板块创建的文稿也会出现在资源库中,与其他资源统一管理。- **Notion 导入** — 你可以将 Notion 中的内容导入到 LobeHub 资源库,打通两个平台的知识管理。@@ -92,7 +92,7 @@ tags:- **对话 + 资源库** — 在对话中引用资源库,让助理基于你的知识提供回答- **文稿 + 资源库** — 编写文稿时使用资源库中的素材,内容创作更高效-- **画图 + 资源库** — 将生成的图片保存到资源库,统一管理所有视觉素材+- **图像 + 资源库** — 将生成的图片保存到资源库,统一管理所有视觉素材## 使用场景diff --git a/docs/usage/getting-started/vision.mdx b/docs/usage/getting-started/vision.mdxindex 218a0c8ea65..f8d3e39ef14 100644--- a/docs/usage/getting-started/vision.mdx+++ b/docs/usage/getting-started/vision.mdx@@ -199,11 +199,11 @@ The more specific your question, the better the analysis:Vision requires a vision-capable model. Look for models with a vision indicator in the model selector:-| Provider | Vision Models |-| --------- | ------------------------------------------------------------------ |-| OpenAI | GPT-4V, GPT-4o, GPT-4o mini |-| Anthropic | Claude 3 Haiku, Claude 3 Sonnet, Claude 3 Opus, Claude 3.5 Sonnet+ |-| Google | Gemini 1.5 Flash, Gemini 1.5 Pro, Gemini Pro Vision |+| Provider | Vision Models |+| --------- | ---------------------------------------------------- |+| OpenAI | GPT-5, GPT-4o, GPT-4o mini |+| Anthropic | Claude Opus 4.8, Claude Sonnet 4.6, Claude Haiku 4.5 |+| Google | Gemini 3.1 Pro, Gemini 2.5 Pro, Gemini 2.5 Flash |Other providers may also offer vision models — check the model's capability tags in the selector.diff --git a/docs/usage/getting-started/vision.zh-CN.mdx b/docs/usage/getting-started/vision.zh-CN.mdxindex 9b7e4ec056a..aa1ccff3358 100644--- a/docs/usage/getting-started/vision.zh-CN.mdx+++ b/docs/usage/getting-started/vision.zh-CN.mdx@@ -136,11 +136,11 @@ LobeHub 支持视觉功能 —— 助理能够 "看见" 并理解你分享的图视觉功能需要选择支持视觉的模型。在模型选择器中查找带有视觉能力标记的模型:-| 提供商 | 视觉模型 |-| --------- | ------------------------------------------------------------------ |-| OpenAI | GPT-4V、GPT-4o、GPT-4o mini |-| Anthropic | Claude 3 Haiku、Claude 3 Sonnet、Claude 3 Opus、Claude 3.5 Sonnet 及以上 |-| Google | Gemini 1.5 Flash、Gemini 1.5 Pro、Gemini Pro Vision |+| 提供商 | 视觉模型 |+| --------- | -------------------------------------------------- |+| OpenAI | GPT-5、GPT-4o、GPT-4o mini |+| Anthropic | Claude Opus 4.8、Claude Sonnet 4.6、Claude Haiku 4.5 |+| Google | Gemini 3.1 Pro、Gemini 2.5 Pro、Gemini 2.5 Flash |其他提供商也可能提供视觉模型 —— 请在选择器中查看模型的能力标签。diff --git a/docs/usage/providers.mdx b/docs/usage/providers.mdxindex dd73f9a5da4..617dfa52a73 100644--- a/docs/usage/providers.mdx+++ b/docs/usage/providers.mdx@@ -12,7 +12,7 @@ tags:- Local Model Support- AWS Bedrock- Google AI- - ChatGLM+ - Zhipu- Moonshot AI- 01 AI- Together AI@@ -39,11 +39,11 @@ LobeHub's multi-provider architecture offers several key advantages:LobeHub integrates with 70+ AI model providers:-- **Major commercial** — OpenAI (GPT-4o, o1), Anthropic (Claude), Google (Gemini), Microsoft Azure OpenAI, AWS Bedrock+- **Major commercial** — OpenAI (GPT-5, o3), Anthropic (Claude), Google (Gemini), Microsoft Azure OpenAI, AWS Bedrock- **Inference platforms** — OpenRouter, Together AI, Groq, Fireworks AI, SambaNova- **Chinese providers** — Zhipu, Moonshot, DeepSeek, Baichuan, Qwen (Alibaba), Wenxin (Baidu), Spark (iFlytek)- **Local models** — Ollama, LM Studio (no API costs, complete privacy, offline capability)-- **Image generation** — DALL-E 3, fal.ai, BFL, ComfyUI+- **Image generation** — GPT Image, Flux, Seedream, Imagen, ComfyUI## Setting Up Providersdiff --git a/docs/usage/providers.zh-CN.mdx b/docs/usage/providers.zh-CN.mdxindex 65db5cf2928..1422e2ce021 100644--- a/docs/usage/providers.zh-CN.mdx+++ b/docs/usage/providers.zh-CN.mdx@@ -9,7 +9,7 @@ tags:- 本地模型支持- AWS Bedrock- Google AI- - ChatGLM+ - 智谱- Moonshot AI- 01 AI- Together AI@@ -36,11 +36,11 @@ LobeHub 的多提供商架构带来了以下核心优势:LobeHub 集成了 70+ AI 模型提供商:-- **主流商业提供商** — OpenAI(GPT-4o、o1)、Anthropic(Claude)、Google(Gemini)、Microsoft Azure OpenAI、AWS Bedrock+- **主流商业提供商** — OpenAI(GPT-5、o3)、Anthropic(Claude)、Google(Gemini)、Microsoft Azure OpenAI、AWS Bedrock- **推理平台** — OpenRouter、Together AI、Groq、Fireworks AI、SambaNova- **国内提供商** — 智谱、Moonshot、DeepSeek、百川、通义千问(阿里)、文心一言(百度)、讯飞星火- **本地模型** — Ollama、LM Studio(无 API 费用,完全隐私,支持离线)-- **图像生成** — DALL-E 3、fal.ai、BFL、ComfyUI+- **图像生成** — GPT Image、Flux、Seedream、Imagen、ComfyUI## 配置提供商diff --git a/docs/usage/providers/aihubmix.mdx b/docs/usage/providers/aihubmix.mdxindex 8a2e6f0ac23..611eee9b7ee 100644--- a/docs/usage/providers/aihubmix.mdx+++ b/docs/usage/providers/aihubmix.mdx@@ -41,10 +41,10 @@ AiHubMix provides access to a variety of popular AI models, including:- **GPT-4o Mini** – A cost-effective lightweight model from OpenAI- **GPT-4o** – OpenAI’s flagship multimodal model-- **Claude 3.5 Sonnet** – Anthropic’s advanced reasoning model-- **Claude 3.5 Haiku** – A fast and efficient Claude model-- **Gemini Pro 1.5** – Google’s model with long-context support-- **DeepSeek V3** – A model with strong reasoning capabilities+- **Claude Opus 4.8** – Anthropic’s advanced reasoning model+- **Claude Haiku 4.5** – A fast and efficient Claude model+- **Gemini 3.1 Pro** – Google’s model with long-context support+- **DeepSeek V4** – A model with strong reasoning capabilities## How to Usediff --git a/docs/usage/providers/aihubmix.zh-CN.mdx b/docs/usage/providers/aihubmix.zh-CN.mdxindex 6817ee90ee0..9881485a0e3 100644--- a/docs/usage/providers/aihubmix.zh-CN.mdx+++ b/docs/usage/providers/aihubmix.zh-CN.mdx@@ -41,10 +41,10 @@ AiHubMix 提供多种热门 AI 模型的访问,包括:- **GPT-4o Mini** - OpenAI 的高性价比小型模型- **GPT-4o** - OpenAI 的旗舰多模态模型-- **Claude 3.5 Sonnet** - Anthropic 的高级推理模型-- **Claude 3.5 Haiku** - 快速高效的 Claude 模型-- **Gemini Pro 1.5** - Google 的长上下文支持模型-- **DeepSeek V3** - 具有高级推理能力的模型+- **Claude Opus 4.8** - Anthropic 的高级推理模型+- **Claude Haiku 4.5** - 快速高效的 Claude 模型+- **Gemini 3.1 Pro** - Google 的长上下文支持模型+- **DeepSeek V4** - 具有高级推理能力的模型## 使用方法diff --git a/docs/usage/providers/anthropic.mdx b/docs/usage/providers/anthropic.mdxindex 2472cc6f40c..10391c413f0 100644--- a/docs/usage/providers/anthropic.mdx+++ b/docs/usage/providers/anthropic.mdx@@ -2,7 +2,7 @@title: Using the Anthropic Claude API Key in LobeHubdescription: >-Learn how to configure and use the Anthropic Claude API in LobeHub, including- Claude 3.5 Sonnet, Claude 3 Opus, and Claude 3 Haiku.+ Claude Opus 4.8, Claude Sonnet 4.6, and Claude Haiku 4.5.tags:- Anthropic Claude- APIdiff --git a/docs/usage/providers/anthropic.zh-CN.mdx b/docs/usage/providers/anthropic.zh-CN.mdxindex 34d817f20c0..b0b9ab7c827 100644--- a/docs/usage/providers/anthropic.zh-CN.mdx+++ b/docs/usage/providers/anthropic.zh-CN.mdx@@ -1,8 +1,8 @@---title: 在 LobeHub 中使用 Anthropic Claude API Keydescription: >-- 学习如何在 LobeHub 中配置和使用 Anthropic Claude API, Claude 3.5 sonnet / Claude 3 Opus /- Claude 3 haiku+ 学习如何在 LobeHub 中配置和使用 Anthropic Claude API, Claude Opus 4.8 / Claude Sonnet 4.6 /+ Claude Haiku 4.5tags:- Anthropic Claude- APIdiff --git a/docs/usage/providers/comfyui.mdx b/docs/usage/providers/comfyui.mdxindex 309d156365c..e5bae415d6a 100644--- a/docs/usage/providers/comfyui.mdx+++ b/docs/usage/providers/comfyui.mdx@@ -1,18 +1,4 @@----title: ''-description: >-- Learn to configure ComfyUI in LobeHub for high-quality image generation and- editing.-tags:- - ComfyUI- - FLUX- - Image Generation- - AI Image Editing- - Text-to-Image------````markdown----title: Using ComfyUI in LobeHub for Image Generationdescription: Learn how to configure and use the ComfyUI service in LobeHub to support high-quality image generation and editing with the FLUX model series.tags:@@ -38,7 +24,7 @@ ComfyUI is a powerful GUI for Stable Diffusion and Flow Diffusion, offering a no- **Extensive Model Support**: Supports 223 models, including 130 FLUX and 93 SD models- **Config-Driven Architecture**: Registry system enables intelligent model selection- **Multi-Format Support**: Compatible with .safetensors and .gguf formats, with various quantization levels-- **Dynamic Precision Options**: Supports default, fp8_e4m3fn, fp8_e5m2, and fp8_e4m3fn_fast+- **Dynamic Precision Options**: Supports default, fp8\_e4m3fn, fp8\_e5m2, and fp8\_e4m3fn\_fast- **Multiple Authentication Methods**: Supports None, Basic Auth, Bearer Token, and Custom Headers- **Smart Component Selection**: Automatically selects optimal T5, CLIP, and VAE encoders- **Enterprise-Grade Optimizations**: Includes NF4, SVDQuant, TorchAO, MFLUX variants@@ -78,7 +64,7 @@ In the chat interface:```plaintextGenerate an image: A cute orange cat sitting on a sunny windowsill, warm lighting, detailed fur texture-````+```**Using FLUX Dev (High-Quality Generation)**:diff --git a/docs/usage/providers/deepseek.mdx b/docs/usage/providers/deepseek.mdxindex be33e6f7b8e..99ec60162ff 100644--- a/docs/usage/providers/deepseek.mdx+++ b/docs/usage/providers/deepseek.mdx@@ -15,7 +15,7 @@ tags:<Image alt={'Using DeepSeek in LobeHub'} cover src={'/blog/assets34400653/b4d12904-9d5d-46de-bd66-901eeb9c8e52.webp'} />-[DeepSeek](https://www.deepseek.com/) is a cutting-edge open-source large language model (LLM). The latest versions, DeepSeek-V3 and DeepSeek-R1, feature significant architectural and performance improvements, particularly in reasoning capabilities. Through innovative training methods and reinforcement learning techniques, DeepSeek has achieved near state-of-the-art performance, rivaling top-tier models from OpenAI.+[DeepSeek](https://www.deepseek.com/) is a cutting-edge open-source large language model (LLM). The latest versions, DeepSeek V4 Pro and DeepSeek V4 Flash, feature significant architectural and performance improvements, particularly in reasoning capabilities. Through innovative training methods and reinforcement learning techniques, DeepSeek has achieved near state-of-the-art performance, rivaling top-tier models from OpenAI.This guide will walk you through how to use DeepSeek in LobeHub:diff --git a/docs/usage/providers/deepseek.zh-CN.mdx b/docs/usage/providers/deepseek.zh-CN.mdxindex 653dc38fc1d..8bd3ac9dbc1 100644--- a/docs/usage/providers/deepseek.zh-CN.mdx+++ b/docs/usage/providers/deepseek.zh-CN.mdx@@ -13,7 +13,7 @@ tags:<Image alt={'在 LobeHub 中使用 DeepSeek'} cover src={'/blog/assets34400653/b4d12904-9d5d-46de-bd66-901eeb9c8e52.webp'} />-[DeepSeek](https://www.deepseek.com/) 是一款先进的开源大型语言模型(LLM)。最新的 DeepSeek-V3 和 DeepSeek-R1 在架构和性能上进行了显著优化,特别是在推理能力方面表现出色。它通过创新性的训练方法和强化学习技术,成功地提升了模型的推理能力,并且其性能已逼近 OpenAI 的顶尖水平。+[DeepSeek](https://www.deepseek.com/) 是一款先进的开源大型语言模型(LLM)。最新的 DeepSeek V4 Pro 和 DeepSeek V4 Flash 在架构和性能上进行了显著优化,特别是在推理能力方面表现出色。它通过创新性的训练方法和强化学习技术,成功地提升了模型的推理能力,并且其性能已逼近 OpenAI 的顶尖水平。本文档将指导你如何在 LobeHub 中使用 DeepSeek:diff --git a/docs/usage/providers/fal.mdx b/docs/usage/providers/fal.mdxindex bd0893e8af1..aa38f48521b 100644--- a/docs/usage/providers/fal.mdx+++ b/docs/usage/providers/fal.mdx@@ -2,11 +2,10 @@title: Using Fal API Key in LobeHubdescription: >-Learn how to configure and use the Fal API Key in LobeHub to generate- AI-powered images and videos with cutting-edge models like FLUX and Kling.+ AI-powered images with cutting-edge models like FLUX and Seedream.tags:- Fal- Image Generation- - Video Generation- API Key- Web UI---@@ -15,7 +14,7 @@ tags:<Image alt={'Using Fal in LobeHub'} cover src={'https://hub-apac-1.lobeobjects.space/docs/f253e749baaa2ccac498014178f93091.png'} />-[Fal.ai](https://fal.ai/) is a high-performance inference platform specializing in AI media generation. It offers state-of-the-art image and video generation models such as FLUX, Kling, and HiDream. This guide will walk you through how to use Fal within LobeHub:+[Fal.ai](https://fal.ai/) is a high-performance inference platform specializing in AI media generation. It offers state-of-the-art image generation and editing models such as FLUX, Seedream, and Qwen Image. This guide will walk you through how to use Fal within LobeHub:<Steps>### Step 1: Obtain Your Fal API Key@@ -56,7 +55,7 @@ tags:<Image alt={'Enter your API Key'} inStep src={'https://hub-apac-1.lobeobjects.space/docs/fa056feecba0133c76abe1ad12706c05.png'} />- Paste the API key you obtained earlier;- - Choose a Fal model (e.g., `Flux.1 Schnell`, `Flux.1 Kontext Dev`) for image or video generation.+ - Choose a Fal model (e.g., `Flux.1 Schnell`, `Flux.1 Kontext Dev`) for image generation.<Image alt={'Select a Fal model for media generation'} inStep src={'https://hub-apac-1.lobeobjects.space/docs/7560502f31b8500032922103fc22e69b.png'} />@@ -65,4 +64,4 @@ tags:</Callout></Steps>-And that’s it! You’re now ready to create stunning visual content in LobeHub using Fal’s advanced image and video generation models.+And that’s it! You’re now ready to create stunning visual content in LobeHub using Fal’s advanced image generation models.diff --git a/docs/usage/providers/fal.zh-CN.mdx b/docs/usage/providers/fal.zh-CN.mdxindex ba4cea51cb2..5ffe78c2923 100644--- a/docs/usage/providers/fal.zh-CN.mdx+++ b/docs/usage/providers/fal.zh-CN.mdx@@ -1,10 +1,9 @@---title: 在 LobeHub 中使用 Fal API Key-description: 学习如何在 LobeHub 中配置和使用 Fal API Key,使用 FLUX、Kling 等尖端模型进行 AI 图像和视频生成。+description: 学习如何在 LobeHub 中配置和使用 Fal API Key,使用 FLUX、Seedream 等尖端模型进行 AI 图像生成。tags:- Fal- 图像生成- - 视频生成- API Key- Web UI---@@ -13,7 +12,7 @@ tags:<Image alt={'在 LobeHub 中使用 Fal'} cover src={'https://hub-apac-1.lobeobjects.space/docs/f253e749baaa2ccac498014178f93091.png'} />-[Fal.ai](https://fal.ai/) 是一个专门从事 AI 媒体生成的快速推理平台,提供包括 FLUX、Kling、HiDream 等在内的最先进图像和视频生成模型。本文将指导你如何在 LobeHub 中使用 Fal:+[Fal.ai](https://fal.ai/) 是一个专门从事 AI 媒体生成的快速推理平台,提供包括 FLUX、Seedream、Qwen Image 等在内的最先进图像生成与编辑模型。本文将指导你如何在 LobeHub 中使用 Fal:<Steps>### 步骤一:获取 Fal API Key@@ -54,7 +53,7 @@ tags:<Image alt={'填入 API 密钥'} inStep src={'https://hub-apac-1.lobeobjects.space/docs/fa056feecba0133c76abe1ad12706c05.png'} />- 粘贴获取到的 API Key;- - 选择一个 Fal 模型(如 `Flux.1 Schnell`、`Flux.1 Kontext Dev`)用于图像或视频生成。+ - 选择一个 Fal 模型(如 `Flux.1 Schnell`、`Flux.1 Kontext Dev`)用于图像生成。<Image alt={'选择 Fal 模型进行媒体生成'} inStep src={'https://hub-apac-1.lobeobjects.space/docs/7560502f31b8500032922103fc22e69b.png'} />@@ -63,4 +62,4 @@ tags:</Callout></Steps>-至此,你已经可以在 LobeHub 中使用 Fal 提供的先进图像和视频生成模型来创作精美的视觉内容了。+至此,你已经可以在 LobeHub 中使用 Fal 提供的先进图像生成模型来创作精美的视觉内容了。diff --git a/docs/usage/providers/github.mdx b/docs/usage/providers/github.mdxindex cf706be5b6b..ac1c7878f34 100644--- a/docs/usage/providers/github.mdx+++ b/docs/usage/providers/github.mdx@@ -46,11 +46,7 @@ Currently, usage of the Playground and free API is subject to limits on requests<Image alt={'Save Access Token'} inStep src={'/blog/assets9880145be3e52b8f9dcd8343cd34a6ca.webp'} /><Callout type={"warning"}>- - During the GitHub Models testing phase, you must apply to join the [waitlist](https://github.com/marketplace/models/waitlist/join) to gain access.-- ```- - Be sure to store your access token securely, as it will only be shown once. If you lose it, you’ll need to generate a new one.- ```+ Be sure to store your access token securely, as it will only be shown once. If you lose it, you’ll need to generate a new one.</Callout>### Step 2: Configure GitHub Models in LobeHubdiff --git a/docs/usage/providers/github.zh-CN.mdx b/docs/usage/providers/github.zh-CN.mdxindex 04a11b9f140..4eadb36b967 100644--- a/docs/usage/providers/github.zh-CN.mdx+++ b/docs/usage/providers/github.zh-CN.mdx@@ -45,9 +45,7 @@ tags:<Image alt={'保存访问令牌'} inStep src={'/blog/assets9880145be3e52b8f9dcd8343cd34a6ca.webp'} /><Callout type={"warning"}>- - GitHub Models 测试期间,要使用 GitHub Models,用户需要申请加入[等待名单(waitlist)](https://github.com/marketplace/models/waitlist/join) 通过后才能获得访问权限。-- - 请安全地存储访问令牌,因为它只会出现一次。如果您意外丢失它,您将需要创建一个新令牌。+ 请安全地存储访问令牌,因为它只会出现一次。如果您意外丢失它,您将需要创建一个新令牌。</Callout>### 步骤二:在 LobeHub 中配置 GitHub Modelsdiff --git a/docs/usage/providers/groq.mdx b/docs/usage/providers/groq.mdxindex 63e84663dd1..974c3b236ca 100644--- a/docs/usage/providers/groq.mdx+++ b/docs/usage/providers/groq.mdx@@ -5,7 +5,7 @@ description: >-experience its powerful performance.tags:- LLAMA3- - Qwen2+ - Qwen3- API keys- Web UI- API Keydiff --git a/docs/usage/providers/groq.zh-CN.mdx b/docs/usage/providers/groq.zh-CN.mdxindex 09259776bfc..8a8b3336ecd 100644--- a/docs/usage/providers/groq.zh-CN.mdx+++ b/docs/usage/providers/groq.zh-CN.mdx@@ -3,7 +3,7 @@ title: 在 LobeHub 中使用 Groq API Keydescription: 了解如何获取 GroqCloud API Key,并在 LobeHub 中配置 Groq,体验 Groq 强大的性能。tags:- LLAMA3- - Qwen2+ - Qwen3- API keys- Web UI- API Keydiff --git a/docs/usage/providers/modelscope.mdx b/docs/usage/providers/modelscope.mdxindex 5db8ea3bf1c..f10f192c93f 100644--- a/docs/usage/providers/modelscope.mdx+++ b/docs/usage/providers/modelscope.mdx@@ -43,7 +43,7 @@ ENABLED_MODELSCOPE=1MODELSCOPE_API_KEY=your_modelscope_api_token# Optional: Custom model list (comma-separated)-MODELSCOPE_MODEL_LIST=deepseek-ai/DeepSeek-V3-0324,Qwen/Qwen3-235B-A22B+MODELSCOPE_MODEL_LIST=deepseek-ai/DeepSeek-V3.2,Qwen/Qwen3-235B-A22B# Optional: Proxy URL (if needed)MODELSCOPE_PROXY_URL=https://your-proxy-url@@ -57,16 +57,15 @@ If you're using Docker, add the ModelScope environment variables to your `dockerenvironment:- ENABLED_MODELSCOPE=1- MODELSCOPE_API_KEY=your_modelscope_api_token- - MODELSCOPE_MODEL_LIST=deepseek-ai/DeepSeek-V3-0324,Qwen/Qwen3-235B-A22B+ - MODELSCOPE_MODEL_LIST=deepseek-ai/DeepSeek-V3.2,Qwen/Qwen3-235B-A22B```## Available ModelsModelScope provides access to a variety of models, including:-- **DeepSeek Models**: DeepSeek-V3, DeepSeek-R1 series-- **Qwen Models**: Qwen3 series, Qwen2.5 series-- **Llama Models**: Meta-Llama-3 series+- **DeepSeek Models**: DeepSeek-V3.2, DeepSeek-V3.1 series+- **Qwen Models**: Qwen3 series (including Qwen3-Next)- **Other Models**: Various open-source models## Troubleshooting@@ -121,8 +120,8 @@ 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+deepseek-ai/DeepSeek-V3.2+deepseek-ai/DeepSeek-V3.1Qwen/Qwen3-235B-A22BQwen/Qwen3-32B```diff --git a/docs/usage/providers/modelscope.zh-CN.mdx b/docs/usage/providers/modelscope.zh-CN.mdxindex 42e6bd2bfde..dcdbf91b68b 100644--- a/docs/usage/providers/modelscope.zh-CN.mdx+++ b/docs/usage/providers/modelscope.zh-CN.mdx@@ -43,7 +43,7 @@ ENABLED_MODELSCOPE=1MODELSCOPE_API_KEY=your_modelscope_api_token# 可选:自定义模型列表(逗号分隔)-MODELSCOPE_MODEL_LIST=deepseek-ai/DeepSeek-V3-0324,Qwen/Qwen3-235B-A22B+MODELSCOPE_MODEL_LIST=deepseek-ai/DeepSeek-V3.2,Qwen/Qwen3-235B-A22B# 可选:代理 URL(如需要)MODELSCOPE_PROXY_URL=https://your-proxy-url@@ -57,16 +57,15 @@ MODELSCOPE_PROXY_URL=https://your-proxy-urlenvironment:- ENABLED_MODELSCOPE=1- MODELSCOPE_API_KEY=your_modelscope_api_token- - MODELSCOPE_MODEL_LIST=deepseek-ai/DeepSeek-V3-0324,Qwen/Qwen3-235B-A22B+ - MODELSCOPE_MODEL_LIST=deepseek-ai/DeepSeek-V3.2,Qwen/Qwen3-235B-A22B```## 可用模型ModelScope 提供各种模型的访问,包括:-- **DeepSeek 模型**:DeepSeek-V3、DeepSeek-R1 系列-- **Qwen 模型**:Qwen3 系列、Qwen2.5 系列-- **Llama 模型**:Meta-Llama-3 系列+- **DeepSeek 模型**:DeepSeek-V3.2、DeepSeek-V3.1 系列+- **Qwen 模型**:Qwen3 系列(包含 Qwen3-Next)- **其他模型**:各种开源模型## 故障排除@@ -121,8 +120,8 @@ DEBUG_MODELSCOPE_CHAT_COMPLETION=1ModelScope 使用命名空间前缀格式的模型 ID,例如:```-deepseek-ai/DeepSeek-V3-0324-deepseek-ai/DeepSeek-R1-0528+deepseek-ai/DeepSeek-V3.2+deepseek-ai/DeepSeek-V3.1Qwen/Qwen3-235B-A22BQwen/Qwen3-32B```diff --git a/docs/usage/providers/ollama.mdx b/docs/usage/providers/ollama.mdxindex 5250c77e2db..a6e29291e52 100644--- a/docs/usage/providers/ollama.mdx+++ b/docs/usage/providers/ollama.mdx@@ -15,7 +15,7 @@ tags:<Image alt={'Using Ollama in LobeHub'} borderless cover src={'/blog/assets17870709/f579b39b-e771-402c-a1d1-620e57a10c75.webp'} />-Ollama is a powerful framework for running large language models (LLMs) locally. It supports a variety of models, including Llama 2, Mistral, and more. LobeHub now integrates seamlessly with Ollama, allowing you to leverage these models directly within your chat interface.+Ollama is a powerful framework for running large language models (LLMs) locally. It supports a variety of models, including Llama 3.1, Mistral, and more. LobeHub now integrates seamlessly with Ollama, allowing you to leverage these models directly within your chat interface.This guide will walk you through how to use Ollama in LobeHub:@@ -143,7 +143,7 @@ Ollama supports a wide range of models. You can browse the available models in t### Install via LobeHub-LobeHub comes pre-configured with popular LLMs like llama3, Gemma, and Mistral. When you select a model for the first time, LobeHub will prompt you to download it.+LobeHub comes pre-configured with popular LLMs like Llama 3.1, Gemma 2, and Mistral. When you select a model for the first time, LobeHub will prompt you to download it.<Image alt="LobeHub prompts to install Ollama model" height="460" src="/blog/assets28616219/4e81decc-776c-43b8-9a54-dfb43e9f601a.webp" />@@ -151,10 +151,10 @@ Once the download is complete, you can start chatting.### Pull Models via Ollama CLI-Alternatively, you can install models directly via the terminal. For example, to install llama3:+Alternatively, you can install models directly via the terminal. For example, to install llama3.1:```bash-ollama pull llama3+ollama pull llama3.1```<Video height={524} src="/blog/assets28616219/95828c11-0ae5-4dfa-84ed-854124e927a6.mp4" />@@ -168,6 +168,3 @@ You can configure Ollama settings in LobeHub under `Settings` -> `AI Providers`.<Callout type={'info'}>To learn how to deploy LobeHub with Ollama integration, visit [Integrating with Ollama](/en/docs/self-hosting/examples/ollama).</Callout>--```-```diff --git a/docs/usage/providers/ollama.zh-CN.mdx b/docs/usage/providers/ollama.zh-CN.mdxindex 3adf514b0b9..01145543399 100644--- a/docs/usage/providers/ollama.zh-CN.mdx+++ b/docs/usage/providers/ollama.zh-CN.mdx@@ -13,7 +13,7 @@ tags:<Image alt={'在 LobeHub 中使用 Ollama'} borderless cover src={'/blog/assets17870709/f579b39b-e771-402c-a1d1-620e57a10c75.webp'} />-Ollama 是一款强大的本地运行大型语言模型(LLM)的框架,支持多种语言模型,包括 Llama 2, Mistral 等。现在,LobeHub 已经支持与 Ollama 的集成,这意味着你可以在 LobeHub 中轻松使用 Ollama 提供的语言模型来增强你的应用。+Ollama 是一款强大的本地运行大型语言模型(LLM)的框架,支持多种语言模型,包括 Llama 3.1, Mistral 等。现在,LobeHub 已经支持与 Ollama 的集成,这意味着你可以在 LobeHub 中轻松使用 Ollama 提供的语言模型来增强你的应用。本文档将指导你如何在 LobeHub 中使用 Ollama:@@ -143,7 +143,7 @@ Ollama 支持多种模型,你可以在 [Ollama Library](https://ollama.com/lib### LobeHub 中安装-在 LobeHub 中,我们默认开启了一些常用的大语言模型,例如 llama3、 Gemma 、 Mistral 等。当你选中模型进行对话时,我们会提示你需要下载该模型。+在 LobeHub 中,我们默认开启了一些常用的大语言模型,例如 Llama 3.1、 Gemma 2 、 Mistral 等。当你选中模型进行对话时,我们会提示你需要下载该模型。<Image alt="LobeHub 提示安装 Ollama 模型" height="460" src="/blog/assets28616219/4e81decc-776c-43b8-9a54-dfb43e9f601a.webp" />@@ -151,10 +151,10 @@ Ollama 支持多种模型,你可以在 [Ollama Library](https://ollama.com/lib### 用 Ollama 拉取模型到本地-当然,你也可以通过在终端执行以下命令安装模型,以 llama3 为例:+当然,你也可以通过在终端执行以下命令安装模型,以 llama3.1 为例:```bash-ollama pull llama3+ollama pull llama3.1```<Video height={524} src="/blog/assets28616219/95828c11-0ae5-4dfa-84ed-854124e927a6.mp4" />diff --git a/docs/usage/providers/openai.mdx b/docs/usage/providers/openai.mdxindex 6c457646e95..cf6499cbea6 100644--- a/docs/usage/providers/openai.mdx+++ b/docs/usage/providers/openai.mdx@@ -2,7 +2,7 @@title: Using OpenAI API Key in LobeHubdescription: >-Learn how to configure and use your OpenAI API Key in LobeHub, supporting- GPT-4o / GPT-4-turbo / GPT-4-vision+ GPT-4o / GPT-4-turbo / GPT-4.1tags:- ChatGPT- GPT-4diff --git a/docs/usage/providers/openai.zh-CN.mdx b/docs/usage/providers/openai.zh-CN.mdxindex dfa7d3628ad..8c50e722c2f 100644--- a/docs/usage/providers/openai.zh-CN.mdx+++ b/docs/usage/providers/openai.zh-CN.mdx@@ -1,6 +1,6 @@---title: 在 LobeHub 中使用 OpenAI API Key-description: 学习如何在 LobeHub 中配置和使用 OpenAI API Key,支持 GPT-4o / GPT-4-turbo / GPT-4-vision+description: 学习如何在 LobeHub 中配置和使用 OpenAI API Key,支持 GPT-4o / GPT-4-turbo / GPT-4.1tags:- ChatGPT- GPT-4diff --git a/docs/usage/providers/openrouter.mdx b/docs/usage/providers/openrouter.mdxindex d0c6ddb8c0c..97f9a8f9de1 100644--- a/docs/usage/providers/openrouter.mdx+++ b/docs/usage/providers/openrouter.mdx@@ -13,7 +13,7 @@ tags:<Image alt={'Using OpenRouter in LobeHub'} cover src={'/blog/assets34400653/40520a43-ac03-4954-8a4d-282fbb946066.webp'} />-[OpenRouter](https://openrouter.ai/) is a platform that provides access to a wide range of high-quality large language model APIs. It supports models from OpenAI (including GPT-3.5/4), Anthropic (Claude2, Instant), LLaMA 2, PaLM Bison, and more.+[OpenRouter](https://openrouter.ai/) is a platform that provides access to a wide range of high-quality large language model APIs. It supports models from OpenAI (including GPT-4.1 and the o-series), Anthropic (Claude Opus 4.5, Claude Sonnet 4.5), Meta (Llama 3.3), and more.This guide will walk you through how to use OpenRouter in LobeHub:diff --git a/docs/usage/providers/openrouter.zh-CN.mdx b/docs/usage/providers/openrouter.zh-CN.mdxindex daadd5bbbeb..98afba8ab8d 100644--- a/docs/usage/providers/openrouter.zh-CN.mdx+++ b/docs/usage/providers/openrouter.zh-CN.mdx@@ -11,7 +11,7 @@ tags:<Image alt={'在 LobeHub 中使用 OpenRouter'} cover src={'/blog/assets34400653/40520a43-ac03-4954-8a4d-282fbb946066.webp'} />-[OpenRouter](https://openrouter.ai/) 是一个提供多种优秀大语言模型 API 的服务,它支持 OpenAI (包括 GPT-3.5/4)、Anthropic (Claude2、Instant)、LLaMA 2 和 PaLM Bison 等众多模型。+[OpenRouter](https://openrouter.ai/) 是一个提供多种优秀大语言模型 API 的服务,它支持 OpenAI(包括 GPT-4.1 和 o 系列)、Anthropic(Claude Opus 4.5、Claude Sonnet 4.5)、Meta(Llama 3.3)等众多模型。本文档将指导你如何在 LobeHub 中使用 OpenRouter:diff --git a/docs/usage/providers/vercel-ai-gateway.mdx b/docs/usage/providers/vercel-ai-gateway.mdxindex 98fc678d139..90ca0bf1d33 100644--- a/docs/usage/providers/vercel-ai-gateway.mdx+++ b/docs/usage/providers/vercel-ai-gateway.mdx@@ -42,9 +42,9 @@ That's it! You can now start chatting in LobeHub using models provided by VercelVercel AI Gateway supports a variety of model providers, including:- **OpenAI**: `openai/gpt-4o`, `openai/gpt-4o-mini`, `openai/o1`, and more-- **Anthropic**: `anthropic/claude-3-5-sonnet`, `anthropic/claude-3-opus`, and more+- **Anthropic**: `anthropic/claude-3.5-sonnet`, `anthropic/claude-3-opus`, and more- **Google**: `google/gemini-2.5-pro`, `google/gemini-2.0-flash`, and more-- **DeepSeek**: `deepseek/deepseek-chat`, `deepseek/deepseek-reasoner`, and more+- **DeepSeek**: `deepseek/deepseek-v3`, `deepseek/deepseek-r1`, and more- And many others...To view the full list of supported models, visit the [Vercel AI Gateway Models](https://vercel.com/ai-gateway/models) page.diff --git a/docs/usage/providers/vercel-ai-gateway.zh-CN.mdx b/docs/usage/providers/vercel-ai-gateway.zh-CN.mdxindex 752be462942..e91bf35af10 100644--- a/docs/usage/providers/vercel-ai-gateway.zh-CN.mdx+++ b/docs/usage/providers/vercel-ai-gateway.zh-CN.mdx@@ -42,9 +42,9 @@ tags:Vercel AI Gateway 支持多种模型提供商,包括:- **OpenAI**: `openai/gpt-4o`、`openai/gpt-4o-mini`、`openai/o1` 等-- **Anthropic**: `anthropic/claude-3-5-sonnet`、`anthropic/claude-3-opus` 等+- **Anthropic**: `anthropic/claude-3.5-sonnet`、`anthropic/claude-3-opus` 等- **Google**: `google/gemini-2.5-pro`、`google/gemini-2.0-flash` 等-- **DeepSeek**: `deepseek/deepseek-chat`、`deepseek/deepseek-reasoner` 等+- **DeepSeek**: `deepseek/deepseek-v3`、`deepseek/deepseek-r1` 等- 以及更多...如需查看完整的支持模型列表,请访问 [Vercel AI Gateway 模型](https://vercel.com/ai-gateway/models)。diff --git a/docs/usage/providers/volcengine.mdx b/docs/usage/providers/volcengine.mdxindex 7674471fac9..b230b043eb8 100644--- a/docs/usage/providers/volcengine.mdx+++ b/docs/usage/providers/volcengine.mdx@@ -15,7 +15,7 @@ tags:<Image alt={'Using Volcengine in LobeHub'} cover src={'/blog/assets80a8b9627374fc345f4bf8e3adf11074.webp'} />-[Volcengine](https://www.volcengine.com/) is a cloud service platform under ByteDance. Through its "Volcano Ark" platform, it provides large language model (LLM) services, supporting several mainstream models such as Baichuan Intelligence and Mobvoi.+[Volcengine](https://www.volcengine.com/) is a cloud service platform under ByteDance. Through its "Volcano Ark" platform, it provides large language model (LLM) services, supporting several mainstream models such as Doubao, DeepSeek, and GLM.This guide will walk you through how to use Volcengine in LobeHub:diff --git a/docs/usage/providers/volcengine.zh-CN.mdx b/docs/usage/providers/volcengine.zh-CN.mdxindex fadfc572aa4..b0ae91380c7 100644--- a/docs/usage/providers/volcengine.zh-CN.mdx+++ b/docs/usage/providers/volcengine.zh-CN.mdx@@ -13,7 +13,7 @@ tags:<Image alt={'在 LobeHub 中使用火山引擎'} cover src={'/blog/assets80a8b9627374fc345f4bf8e3adf11074.webp'} />-[火山引擎](https://www.volcengine.com/)是字节跳动旗下的云服务平台,通过 "火山方舟" 提供大型语言模型 (LLM) 服务,支持多个主流模型如百川智能、Mobvoi 等。+[火山引擎](https://www.volcengine.com/)是字节跳动旗下的云服务平台,通过 "火山方舟" 提供大型语言模型 (LLM) 服务,支持多个主流模型如豆包(Doubao)、DeepSeek、GLM 等。本文档将指导你如何在 LobeHub 中使用火山引擎:diff --git a/docs/usage/start.mdx b/docs/usage/start.mdxindex d15b631d6be..8bcfd54945f 100644--- a/docs/usage/start.mdx+++ b/docs/usage/start.mdx@@ -113,7 +113,7 @@ Not every question needs the most powerful model.A quick translation? A lightweight model handles it in milliseconds for a fraction of the cost. A nuanced legal analysis? Route it to the model with the deepest reasoning capabilities.-LobeHub gives you access to **70+ providers**, including GPT-4o, Claude, Gemini, DeepSeek, Llama, and Qwen, from over a dozen providers. Switch models mid-conversation, or let your Agent pick the best one for each turn. If your data needs to stay on-device, you can run local models too.+LobeHub gives you access to **70+ providers**, including GPT-5, Claude, Gemini, DeepSeek, Llama, and Qwen, from over a dozen providers. Switch models mid-conversation, or let your Agent pick the best one for each turn. If your data needs to stay on-device, you can run local models too.Each Agent can have its own default model. Your code reviewer uses one model while your copywriter uses another, all running automatically without you making a choice each time.@@ -159,7 +159,7 @@ Imagine a customer support Agent that knows your entire help center. A legal assNeed a hero image for a blog post? A diagram for your architecture doc? A quick mockup to pitch an idea?-Ask your Agent. It generates images using DALL-E 3, fal.ai, and other models, and renders them as Artifacts right in the chat. No switching to a separate design tool, no export-download-reupload cycle. The image is there, in context, next to the conversation that produced it.+Ask your Agent. It generates images using GPT Image, Flux, and other models, and renders them as Artifacts right in the chat. No switching to a separate design tool, no export-download-reupload cycle. The image is there, in context, next to the conversation that produced it.<Cards><Card href={'/docs/usage/agent/artifacts'} title={'Artifacts'} />diff --git a/docs/usage/start.zh-CN.mdx b/docs/usage/start.zh-CN.mdxindex 5f009af9292..4ff23ab255f 100644--- a/docs/usage/start.zh-CN.mdx+++ b/docs/usage/start.zh-CN.mdx@@ -112,7 +112,7 @@ LobeHub 引入了 **Agent Groups**,让您可以像对待真实队友一样与一段快速翻译?轻量模型几毫秒搞定,成本微乎其微。一份需要深度推理的法律分析?交给推理能力最强的模型。-LobeHub 接入了 **70+ 模型**,包括 GPT-4o、Claude、Gemini、DeepSeek、Llama、Qwen 等,来自十几家服务商。你可以在对话中随时切换模型,也可以让助理自动为每个回合选择最优模型。如果你的数据需要留在本地,还可以接入本地模型。+LobeHub 接入了 **70+ 模型**,包括 GPT-5、Claude、Gemini、DeepSeek、Llama、Qwen 等,来自十几家服务商。你可以在对话中随时切换模型,也可以让助理自动为每个回合选择最优模型。如果你的数据需要留在本地,还可以接入本地模型。每个助理都可以设置独立的默认模型。你的代码审查员用一个模型,文案用另一个,全自动运行,无需每次手动选择。@@ -158,7 +158,7 @@ LobeHub 支持[模型上下文协议(MCP)](/zh/docs/usage/community/mcp-mark需要一张博客文章的封面图?一张架构文档的流程图?一个用来推销创意的快速原型?-直接问你的助理。它使用 DALL-E 3、fal.ai 等模型生成图片,并以 Artifact 的形式直接渲染在聊天里。不需要切换到另一个设计工具,不需要导出、下载、再上传。图片就在那里,在上下文中,紧挨着产生它的对话。+直接问你的助理。它使用 GPT Image、Flux 等模型生成图片,并以 Artifact 的形式直接渲染在聊天里。不需要切换到另一个设计工具,不需要导出、下载、再上传。图片就在那里,在上下文中,紧挨着产生它的对话。<Cards><Card href={'/zh/docs/usage/agent/artifacts'} title={'Artifacts'} />diff --git a/docs/usage/user-interface/appearance.mdx b/docs/usage/user-interface/appearance.mdxindex 59a494b499d..8787c254618 100644--- a/docs/usage/user-interface/appearance.mdx+++ b/docs/usage/user-interface/appearance.mdx@@ -55,14 +55,24 @@ When your conversation or document includes code blocks, you can choose a **syntMermaid is a text-based diagram tool. When your conversation or document includes Mermaid diagrams (flowcharts, sequence diagrams, etc.), you can choose a **Mermaid theme** for them. Align it with your overall theme so diagrams look consistent with the rest of the interface.-## Mode Selection+## Response Animation-| Mode | Description |-| --------------------- | ------------------------------------------------------------------------------------ |-| **Professional Mode** | Full interface with all panels and options — best for power users |-| **Simplified Mode** | Streamlined interface with fewer elements — best for focused work or smaller screens |+Choose the animation speed used for the application's response actions (e.g. message streaming and transitions).-**Tip:** Use Simplified Mode when you want less visual noise and more space for the conversation. Switch to Professional Mode when you need quick access to panels, settings, or multiple views.+| Mode | Description |+| ----------- | --------------------------------- |+| **Off** | Disable response animations |+| **Agile** | Quick, snappy animation timing |+| **Elegant** | Smoother, slower animation timing |++## Right-Click Menu Mode++Choose whether the right-click context menu is enabled for some list items.++| Mode | Description |+| ------------ | --------------------------------------------------- |+| **Disabled** | No right-click menu on the supported list items |+| **Default** | Enable the right-click menu for the supported items |<Cards><Card href={'/docs/usage/user-interface/shortcuts'} title={'Keyboard Shortcuts'} />diff --git a/docs/usage/user-interface/appearance.zh-CN.mdx b/docs/usage/user-interface/appearance.zh-CN.mdxindex 4ec7f8e5f79..326be5cd4f2 100644--- a/docs/usage/user-interface/appearance.zh-CN.mdx+++ b/docs/usage/user-interface/appearance.zh-CN.mdx@@ -53,14 +53,24 @@ tags:Mermaid 是一种用文本描述图表的工具。当对话或文稿中包含 Mermaid 图表(流程图、时序图等)时,可选择 **Mermaid 主题**。与整体主题协调,让图表与界面风格一致。-## 模式选择+## 响应动画-| 模式 | 说明 |-| -------- | ------------------------ |-| **专业模式** | 完整界面,包含所有面板和选项 —— 适合重度用户 |-| **精简模式** | 精简界面,元素更少 —— 适合专注工作或小屏设备 |+选择应用程序操作响应动作(如消息流式输出、界面过渡)的动画速度。-**提示:** 想要更少视觉干扰、更多对话空间时用精简模式。需要快速访问面板、设置或多视图时用专业模式。+| 模式 | 说明 |+| ------ | --------- |+| **关闭** | 关闭响应动画 |+| **敏捷** | 动画速度更快、更轻 |+| **优雅** | 动画速度更慢、更柔 |++## 右键菜单方案++选择是否为部分列表项启用右键菜单。++| 模式 | 说明 |+| ------- | ------------- |+| **不使用** | 支持的列表项不显示右键菜单 |+| **默认** | 为支持的列表项启用右键菜单 |<Cards><Card href={'/zh/docs/usage/user-interface/shortcuts'} title={'快捷键'} />diff --git a/docs/usage/user-interface/shortcuts.mdx b/docs/usage/user-interface/shortcuts.mdxindex b355fc93621..5954b147959 100644--- a/docs/usage/user-interface/shortcuts.mdx+++ b/docs/usage/user-interface/shortcuts.mdx@@ -2,7 +2,7 @@title: Keyboard Shortcutsdescription: >-Master LobeHub with keyboard shortcuts — command palette, Agent switching,- focus mode, and more. Customize to fit your workflow.+ message regeneration, and more. Customize to fit your workflow.tags:- LobeHub- Keyboard Shortcuts@@ -22,30 +22,28 @@ Click your user avatar in the top-right corner → **App Settings** → **Shortc## Essential Shortcuts-| Action | Shortcut |-| ---------------------------------- | -------------------------------------- |-| **Open Command Menu** | `⌘ + K` (Mac) / `Ctrl + K` (Win/Linux) |-| **Focus search** | `⌘ + J` / `Ctrl + J` |-| **Switch to pinned Agent** | `Ctrl + 1–9` |-| **Switch to default conversation** | `Ctrl + 0` |-| **Toggle left panel** | `⌘ + [` / `Ctrl + [` |-| **Toggle right panel** | `⌘ + ]` / `Ctrl + ]` |-| **Focus mode** | `⌘ + \` / `Ctrl + \` |-| **Shortcut help** | `Ctrl + Shift + ?` |--**Focus mode** hides all panels except the current conversation — ideal for distraction-free writing or long reads.+| Action | Shortcut |+| -------------------------- | -------------------------------------- |+| **Open Command Menu** | `⌘ + K` (Mac) / `Ctrl + K` (Win/Linux) |+| **Focus search** | `⌘ + J` / `Ctrl + J` |+| **Switch to pinned Agent** | `Ctrl + 1–9` |+| **Toggle left panel** | `⌘ + [` / `Ctrl + [` |+| **Toggle right panel** | `⌘ + ]` / `Ctrl + ]` |+| **Shortcut help** | `Ctrl + Shift + ?` |## Conversation Shortcuts-| Action | Shortcut |-| ------------------------------- | ------------------------------------ |-| **Open conversation settings** | `⌘ + ,` / `Ctrl + ,` |-| **Regenerate message** | `⌘ + R` / `Ctrl + R` |-| **Delete last message** | `⌘ + D` / `Ctrl + D` |-| **Delete and regenerate** | `⌘ + Shift + R` / `Ctrl + Shift + R` |-| **New Topic** | `⌘ + N` / `Ctrl + N` |-| **Add message without sending** | `⌘ + Enter` / `Ctrl + Enter` |-| **Edit message** | `Ctrl + Alt` + double-click message |+Conversation shortcuts use the **Option** key on Mac and **Alt** on Windows/Linux — a different modifier from the Essential Shortcuts above.++| Action | Shortcut |+| ------------------------------- | -------------------------------------------------------------------------- |+| **Open conversation settings** | `Option + ,` (Mac) / `Alt + ,` (Win) |+| **Regenerate message** | `Option + R` / `Alt + R` |+| **Delete last message** | `Option + D` / `Alt + D` |+| **Delete and regenerate** | `Option + Shift + R` / `Alt + Shift + R` |+| **New Topic** | `Option + N` / `Alt + N` |+| **Add message without sending** | `Option + Enter` / `Alt + Enter` |+| **Edit message** | `Option + double-click` message (Mac) / `Alt + double-click` message (Win) |**Add message without sending** — useful when you want to add context to the conversation without triggering an immediate response. The Agent will see the new message when it next replies.@@ -69,9 +67,7 @@ Most shortcuts can be customized. In the Shortcuts settings panel, click the sho**Power-user workflow** — `⌘ + K` to open Command Menu → type Agent name → Enter. Switch Agents in under a second.-**Quick iteration** — `⌘ + R` to regenerate. `⌘ + Shift + R` if you want to delete the last message first, then regenerate.--**Distraction-free writing** — `⌘ + \` for Focus mode. No sidebar, no panels — just the conversation.+**Quick iteration** — `Option + R` (Mac) / `Alt + R` (Win) to regenerate. `Option + Shift + R` / `Alt + Shift + R` if you want to delete the last message first, then regenerate.**Multi-Agent work** — Pin your top Agents to the sidebar, then use `Ctrl + 1–9` to switch between them without touching the mouse.diff --git a/docs/usage/user-interface/shortcuts.zh-CN.mdx b/docs/usage/user-interface/shortcuts.zh-CN.mdxindex 934c50e921e..4413d5e2468 100644--- a/docs/usage/user-interface/shortcuts.zh-CN.mdx+++ b/docs/usage/user-interface/shortcuts.zh-CN.mdx@@ -1,6 +1,6 @@---title: 快捷键-description: 用快捷键掌控 LobeHub——命令面板、助理切换、专注模式等。按你的习惯自定义。+description: 用快捷键掌控 LobeHub——命令面板、助理切换、重新生成消息等。按你的习惯自定义。tags:- LobeHub- 快捷键@@ -25,25 +25,23 @@ LobeHub 提供丰富的键盘快捷键,让你少用鼠标、多用手感。掌| **打开命令菜单** | `⌘ + K`(Mac)/ `Ctrl + K`(Win/Linux) || **聚焦搜索** | `⌘ + J` / `Ctrl + J` || **切换置顶助理** | `Ctrl + 1–9` |-| **切换默认会话** | `Ctrl + 0` || **显示 / 隐藏左侧面板** | `⌘ + [` / `Ctrl + [` || **显示 / 隐藏右侧面板** | `⌘ + ]` / `Ctrl + ]` |-| **专注模式** | `⌘ + \` / `Ctrl + \` || **快捷键帮助** | `Ctrl + Shift + ?` |-**专注模式** 只保留当前对话,隐藏其他面板 —— 适合专注写作或长文阅读。-## 会话快捷键-| 操作 | 快捷键 |-| ------------ | ------------------------------------ |-| **打开会话设置** | `⌘ + ,` / `Ctrl + ,` |-| **重新生成消息** | `⌘ + R` / `Ctrl + R` |-| **删除最后一条消息** | `⌘ + D` / `Ctrl + D` |-| **删除并重新生成** | `⌘ + Shift + R` / `Ctrl + Shift + R` |-| **新建话题** | `⌘ + N` / `Ctrl + N` |-| **添加消息但不发送** | `⌘ + Enter` / `Ctrl + Enter` |-| **编辑消息** | `Ctrl + Alt` + 双击消息 |+会话快捷键使用 **Option** 键(Mac)/ **Alt** 键(Windows/Linux)—— 与上面「常用快捷键」使用的修饰键不同。++| 操作 | 快捷键 |+| ------------ | ---------------------------------------- |+| **打开会话设置** | `Option + ,`(Mac)/ `Alt + ,`(Win) |+| **重新生成消息** | `Option + R` / `Alt + R` |+| **删除最后一条消息** | `Option + D` / `Alt + D` |+| **删除并重新生成** | `Option + Shift + R` / `Alt + Shift + R` |+| **新建话题** | `Option + N` / `Alt + N` |+| **添加消息但不发送** | `Option + Enter` / `Alt + Enter` |+| **编辑消息** | `Option + 双击消息`(Mac)/ `Alt + 双击消息`(Win) |**添加消息但不发送** —— 想在不触发生成的情况下补充上下文时使用。助理会在下次回复时看到这条新消息。@@ -67,9 +65,7 @@ LobeHub 提供丰富的键盘快捷键,让你少用鼠标、多用手感。掌**高效工作流** — `⌘ + K` 打开命令菜单 → 输入助理名 → 回车。一秒内切换助理。-**快速迭代** — `⌘ + R` 重新生成。`⌘ + Shift + R` 先删除最后一条消息再重新生成。--**专注写作** — `⌘ + \` 进入专注模式。无侧边栏、无面板 —— 只有对话。+**快速迭代** — `Option + R`(Mac)/ `Alt + R`(Win)重新生成。`Option + Shift + R` / `Alt + Shift + R` 先删除最后一条消息再重新生成。**多助理协作** — 把常用助理置顶,用 `Ctrl + 1–9` 切换,无需动鼠标。diff --git a/docs/usage/user-interface/stats.mdx b/docs/usage/user-interface/stats.mdxindex dc56b070cfe..5f6e8ce6c79 100644--- a/docs/usage/user-interface/stats.mdx+++ b/docs/usage/user-interface/stats.mdx@@ -30,7 +30,7 @@ Click your profile avatar in the top-right corner of the homepage → **App Sett| **Number of Agents** | Total Agents you've created and used || **Number of Topics** | Total conversation Topics with Agents || **Number of Messages** | Total messages sent and received |-| **Total Word Count** | Cumulative word count across all conversations |+| **Total Tokens** | Cumulative token count across all conversations |### Activity Calendardiff --git a/docs/usage/user-interface/stats.zh-CN.mdx b/docs/usage/user-interface/stats.zh-CN.mdxindex 96fc53eadb2..97206335bff 100644--- a/docs/usage/user-interface/stats.zh-CN.mdx+++ b/docs/usage/user-interface/stats.zh-CN.mdx@@ -22,13 +22,13 @@ tags:### 基础数据-| 指标 | 说明 |-| -------- | ------------ |-| **使用天数** | 从首次使用到现在的总天数 |-| **助理数** | 创建和使用的助理总数 |-| **话题数** | 与助理的对话话题总数 |-| **消息数** | 发送和接收的消息总数 |-| **累计字数** | 所有对话的累计文字数量 |+| 指标 | 说明 |+| -------------- | ----------------- |+| **使用天数** | 从首次使用到现在的总天数 |+| **助理数** | 创建和使用的助理总数 |+| **话题数** | 与助理的对话话题总数 |+| **消息数** | 发送和接收的消息总数 |+| **累计 Token 数** | 所有对话的累计 Token 消耗量 |### 活跃度日历diff --git a/docs/wiki/HOME.md b/docs/wiki/HOME.mdindex 6f1c547635b..a391861ca93 100644--- a/docs/wiki/HOME.md+++ b/docs/wiki/HOME.md@@ -8,4 +8,4 @@-We've moved the contributing wiki to [this page](https://lobehub.com/zh/docs/development/start).+We've moved the contributing wiki to [this page](https://lobehub.com/docs/development/start).