diff --git a/CHANGELOG.md b/CHANGELOG.md
index f0f1da986a18..d87e041a8062 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,33 @@
# Changelog
+## [Version 1.41.0](https://github.com/lobehub/lobe-chat/compare/v1.40.4...v1.41.0)
+
+Released on **2024-12-28**
+
+#### ✨ Features
+
+- **auth**: Add WeChat authentication support.
+- **misc**: Support white list for discover assistant.
+
+
+
+
+Improvements and Fixes
+
+#### What's improved
+
+- **auth**: Add WeChat authentication support, closes [#5195](https://github.com/lobehub/lobe-chat/issues/5195) ([95153a4](https://github.com/lobehub/lobe-chat/commit/95153a4))
+- **misc**: Support white list for discover assistant, closes [#5216](https://github.com/lobehub/lobe-chat/issues/5216) ([90bb20d](https://github.com/lobehub/lobe-chat/commit/90bb20d))
+
+
+
+
+
+[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
+
+
+
### [Version 1.40.4](https://github.com/lobehub/lobe-chat/compare/v1.40.3...v1.40.4)
Released on **2024-12-28**
diff --git a/changelog/v1.json b/changelog/v1.json
index 1abccca2babd..7e5ca6ff3236 100644
--- a/changelog/v1.json
+++ b/changelog/v1.json
@@ -1,4 +1,11 @@
[
+ {
+ "children": {
+ "features": ["Support white list for discover assistant."]
+ },
+ "date": "2024-12-28",
+ "version": "1.41.0"
+ },
{
"children": {
"improvements": ["Update deepseek V3 model."]
diff --git a/docs/self-hosting/advanced/auth/next-auth/wechat.mdx b/docs/self-hosting/advanced/auth/next-auth/wechat.mdx
new file mode 100644
index 000000000000..031887045679
--- /dev/null
+++ b/docs/self-hosting/advanced/auth/next-auth/wechat.mdx
@@ -0,0 +1,46 @@
+---
+title: Configure Wechat Authentication Service in LobeChat
+description: Learn how to configure Wechat authentication service in LobeChat, including creating a new Wechat App, setting permissions, and environment variables.
+tags:
+ - Wechat Authentication
+ - Wechat App
+ - Environment Variable Configuration
+ - Single Sign-On
+ - LobeChat
+---
+
+# Configure Wechat Authentication Service
+
+## Wechat Configuration Process
+
+
+ ### Create a Wechat Application
+
+Click [here](https://open.weixin.qq.com/cgi-bin/index) and then click "Management Center", "Website Application", and "Create Website Application" in sequence.
+
+Fill in the information as required by the official website prompts and submit for review.
+
+After successful creation, click "Application Details" to obtain the AppID and AppSecret.
+
+### Configure Environment Variables
+
+When deploying LobeChat, you need to configure the following environment variables:
+
+| Environment Variable | Type | Description |
+| --- | --- | --- |
+| `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the command: `openssl rand -base64 32` |
+| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the Single Sign-On provider for LobeChat. Use `github` for Github. |
+| `WECHAT_CLIENT_ID` | Required | Client ID from the Wechat website application details page |
+| `WECHAT_CLIENT_SECRET` | Required | Client Secret from the Wechat website application details page |
+| `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. Only set it if the default generated redirect address is incorrect. `https://example.com/api/auth` |
+
+
+ Go to [📘 Environment Variables](/en/docs/self-hosting/environment-variables/auth#wechat) for more details about related variables.
+
+
+
+
+
+ After successful deployment, users will be able to authenticate through the WeChat Open Platform
+ and use LobeChat.
+
diff --git a/docs/self-hosting/advanced/auth/next-auth/wechat.zh-CN.mdx b/docs/self-hosting/advanced/auth/next-auth/wechat.zh-CN.mdx
new file mode 100644
index 000000000000..82c977319e19
--- /dev/null
+++ b/docs/self-hosting/advanced/auth/next-auth/wechat.zh-CN.mdx
@@ -0,0 +1,43 @@
+---
+title: 在 LobeChat 中配置微信身份验证服务
+description: 学习如何在 LobeChat 中配置微信身份验证服务,包括创建新的微信网站应用、设置权限和环境变量。
+tags:
+ -微信身份验证
+ -微信网站应用
+ - 环境变量配置
+ - 单点登录
+ - LobeChat
+---
+
+# 配置微信身份验证服务
+
+##微信配置流程
+
+
+ ### 创建微信网站应用
+
+点击 [这里](https://open.weixin.qq.com/cgi-bin/index) 依次点击“管理中心”、“网站应用”、“创建网站应用”
+
+按照管网提示要求填写信息并提交审核。
+
+创建成功后,点击“应用详情”,可获知AppID和AppSecret。
+
+### 配置环境变量
+
+在部署 LobeChat 时,你需要配置以下环境变量:
+
+| 环境变量 | 类型 | 描述 |
+| --- | --- | --- |
+| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
+| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Github 请填写 `github`。 |
+| `WECHAT_CLIENT_ID` | 必选 |微信网站应用详情页的 客户端 ID |
+| `WECHAT_CLIENT_SECRET` | 必选 |微信网站应用详情页的 客户端 Secret |
+| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
+
+
+ 前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#wechat) 可查阅相关变量详情。
+
+
+
+
+部署成功后,用户将可以通过微信开放平台身份认证并使用 LobeChat。
diff --git a/package.json b/package.json
index c5f4770925d5..305d4ee3889f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@lobehub/chat",
- "version": "1.40.4",
+ "version": "1.41.0",
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
"keywords": [
"framework",
diff --git a/src/app/(backend)/webapi/assistant/store/route.ts b/src/app/(backend)/webapi/assistant/store/route.ts
index 54e696749236..036a7bac5ce4 100644
--- a/src/app/(backend)/webapi/assistant/store/route.ts
+++ b/src/app/(backend)/webapi/assistant/store/route.ts
@@ -1,6 +1,5 @@
import { NextResponse } from 'next/server';
-import { DEFAULT_LANG } from '@/const/locale';
import { AssistantStore } from '@/server/modules/AssistantStore';
export const runtime = 'edge';
@@ -11,18 +10,10 @@ export const GET = async (req: Request) => {
const market = new AssistantStore();
- let res: Response;
+ const data = await market.getAgentIndex(locale as any);
- res = await fetch(market.getAgentIndexUrl(locale as any));
-
- if (res.status === 404) {
- res = await fetch(market.getAgentIndexUrl(DEFAULT_LANG));
- }
-
- const data = await res.json();
return NextResponse.json(data);
- } catch (e) {
- console.error(e);
+ } catch {
return new Response(`failed to fetch agent market index`, {
headers: {
'Access-Control-Allow-Origin': '*',
diff --git a/src/app/(main)/discover/(detail)/provider/[slug]/features/ProviderConfig.tsx b/src/app/(main)/discover/(detail)/provider/[slug]/features/ProviderConfig.tsx
index 21df86c01343..0e14c3b49a4d 100644
--- a/src/app/(main)/discover/(detail)/provider/[slug]/features/ProviderConfig.tsx
+++ b/src/app/(main)/discover/(detail)/provider/[slug]/features/ProviderConfig.tsx
@@ -5,12 +5,11 @@ import { Button, Dropdown } from 'antd';
import { createStyles } from 'antd-style';
import { ChevronDownIcon, SquareArrowOutUpRight } from 'lucide-react';
import Link from 'next/link';
+import { useRouter } from 'next/navigation';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { FlexboxProps } from 'react-layout-kit';
-import { useOpenSettings } from '@/hooks/useInterceptingRoutes';
-import { SettingsTabs } from '@/store/global/initialState';
import { DiscoverProviderItem } from '@/types/discover';
const useStyles = createStyles(({ css }) => ({
@@ -29,7 +28,11 @@ interface ProviderConfigProps extends FlexboxProps {
const ProviderConfig = memo(({ data }) => {
const { styles } = useStyles();
const { t } = useTranslation('discover');
- const openSettings = useOpenSettings(SettingsTabs.LLM);
+
+ const router = useRouter();
+ const openSettings = () => {
+ router.push('/settings/llm');
+ };
const icon = ;
@@ -56,7 +59,7 @@ const ProviderConfig = memo(({ data }) => {
if (!items || items?.length === 0)
return (
-