lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
40.89k stars 9.32k forks source link

[Bug] 无法删除/修改之前客户端环境变量时期所设置的模型 #2003

Closed zhuozhiyongde closed 5 months ago

zhuozhiyongde commented 5 months ago

💻 Operating System

macOS

📦 Environment

Docker

🌐 Browser

Safari

🐛 Bug Description

如题,近期更新了可视化的 Model list,但是在使用问题中出现了如下问题。

以往

我原先通过部署一个私有的 LobeChat 网站,供朋友们使用,然而我还有一些不愿意允许公开访问的模型,但是我想自己用,于是我通过创建一个新的 OpenAI API Key,并在客户端设置页面搭配类似如下的环境变量,实现只有本地可用 Claude 模型。

-all,+gpt-3.5-turbo-0125=GPT-3.5 Turbo,+gpt-4-0125-preview=GPT-4 Turbo,+gpt-4-vision-preview=GPT-4 Vision,+claude-3-opus-20240229=Claude-3 Opus,+claude-3-sonnet-20240229=Claude-3 Sonnet,+claude-3-haiku-20240307=Claude-3 Haiku

这样的环境变量使用。

现在

然而,更新后,我发现我似乎无法设置这个变量了,也即无法在客户端完全的自定义模型变量,取而代之的是一个获取列表的功能,这造成了不便,我无法移除、重命名原先通过本地环境变量添加的模型,也无法覆盖命名(修改提供的模型的显示名)。

举个例子,我现在的服务器 docker 配置如下:

OPENAI_MODEL_LIST=-all,+gpt-3.5-turbo-0125=GPT-3.5 Turbo,+gpt-4-turbo-2024-04-09=GPT-4 Turbo

在本地,我看到的是这样的:

image

可以看到,我无法移除/重命名原先客户端环境变量时期添加的 Claude 系列的模型,亦无法将这个原先客户端环境变量时期所设置的 GPT-4-New 重命名为 GPT-4 Turbo。

🚦 Expected Behavior

No response

📷 Recurrence Steps

No response

📝 Additional Information

No response

lobehubbot commented 5 months ago

👀 @zhuozhiyongde

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

zhuozhiyongde commented 5 months ago

我还注意到,即使我重置了设置,面对本地变量和客户端变量的冲突的时候,还会出现奇怪的重复:

image

MegaSuite commented 5 months ago

我通过vercel部署,也出现了类似的问题 IMG_3216 IMG_3217

zhuozhiyongde commented 5 months ago

换句话说,就是不支持修改名列默认模型列表的默认模型的显示名、删除已添加的默认模型。

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


In other words, it does not support modifying the display name of the default model listed in the default model list or deleting the added default model.

MegaSuite commented 5 months ago

我通过vercel部署,也出现了类似的问题 IMG_3216 IMG_3217

通过点击下图标注的刷新按钮解决了这个问题 IMG_3218

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I deployed through vercel and a similar problem occurred! [IMG_3216](https://private-user-images.githubusercontent.com/108850837/321876115-93107450-ec63-42b7-be1d-7c19478e4bd7.jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5c CI6IkpXVCJ9 ..EMDWPmIzY6M8KlnTdCvyUoEJbInYGbb7ZBFNjSdD22Q) ![IMG_3217](https://private-user-images.githubusercontent.com/108850837/321876130-04d1e5ca-406d-401a-8ad3-e1b34545a50a .jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..Wqbabow4b_SyMLB3JSOmiN-xhpaZQBNZP6iruRG5OUs)

This issue was solved by clicking the refresh button marked below

XiaolongYang-HZAU commented 5 months ago

vercel部署遇到了一样的问题,必须手动点击模型列表中的刷新按钮,环境变量的模型才会生效

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Vercel deployment encountered the same problem. You must manually click the refresh button in the model list for the environment variable model to take effect.

arvinxx commented 5 months ago

我发现我似乎无法设置这个变量了,也即无法在客户端完全的自定义模型变量,取而代之的是一个获取列表的功能,这造成了不便,我无法移除、重命名原先通过本地环境变量添加的模型,也无法覆盖命名(修改提供的模型的显示名)。

这个应该是我之前的一个实现逻辑问题,会优先找预设列表中存在的同名 id,如果存在则认为是LobeChat 内置的模型,不允许修改。这个我后续修正下。

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I found that I can't seem to set this variable, that is, I can't completely customize the model variable on the client. Instead, it has a function to get a list. This causes inconvenience. I can't remove or rename the local environment variable. For added models, the naming cannot be overridden (modifying the display name of the provided model).

This should be an implementation logic problem I had before. I will first look for the ID with the same name that exists in the preset list. If it exists, it is considered to be a built-in model of LobeChat and is not allowed to be modified. I'll correct this later.

arvinxx commented 5 months ago

不过我觉得可能更好的方式应该是通过 one-api 这样的平台,你部署用的 apikey 可以只限制基础模型的 model-list,然后自己再建一个包含 opus的 apiKey 。这样就你自己的电脑上填写 api key,拉个模型列表就好了

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


However, I think a better way is to use a platform like one-api. The apikey you use for deployment can only limit the model-list of the basic model, and then build an apiKey containing opus yourself. Is this more convenient?

BlazarWinGX commented 5 months ago

463e4186-c578-481c-b9d1-1cd93f87da02 6c1aded0-0f14-4c09-8f7e-fa96386bad01 我也遇到了同样的问题,使用docker-compose部署,无法自定义模型。

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


463e4186-c578-481c-b9d1-1cd93f87da02 6c1aded0-0f14-4c09-8f7e-fa96386bad01 I also encountered the same problem, using docker-compose to deploy and unable to customize the model.

zhuozhiyongde commented 5 months ago

不过我觉得可能更好的方式应该是通过 one-api 这样的平台,你部署用的 apikey 可以只限制基础模型的 model-list,然后自己再建一个包含 opus的 apiKey 。这样就你自己的电脑上填写 api key,拉个模型列表就好了

我觉得没必要吧,,,原先 lobe chat 就能做的事情,为啥要再让用户自己搞一个

这本身就是修改一个 Models 请求字段的事情,又搞一个 docker 感觉 duck 不必

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


But I think a better way is to use a platform like one-api. The apikey you use for deployment can only limit the model-list of the basic model, and then build an apiKey including opus yourself. In this way, just fill in the api key on your own computer and pull up a model list.

I don’t think it’s necessary. Why should users have to do something that lobe chat can do in the past?

This in itself is a matter of modifying a Models request field, and building a docker feels unnecessary for duck.

zhuozhiyongde commented 5 months ago

one-api 更多的还是做更多渠道/API供应商的负载均衡吧

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


One-api should do more load balancing for more channels/API providers.

zhuozhiyongde commented 5 months ago

我发现我似乎无法设置这个变量了,也即无法在客户端完全的自定义模型变量,取而代之的是一个获取列表的功能,这造成了不便,我无法移除、重命名原先通过本地环境变量添加的模型,也无法覆盖命名(修改提供的模型的显示名)。

这个应该是我之前的一个实现逻辑问题,会优先找预设列表中存在的同名 id,如果存在则认为是LobeChat 内置的模型,不允许修改。这个我后续修正下。

我觉得就不应该不允许修改内置模型,比如我想本地给内置模型重命名一下显示名,为啥就不行(

这本来就应该是一个完全客户端可控的配置项,对于服务端如果想限制,那么配置 API-Key 的权限才应该是更好的吧。

不过这也引发了一个问题,是否可以增加一个在 docker 部署的时候的选项,类似于“不允许客户端使用超出授权范围的模型”(在客户端不额外提供自己的 API 配置的情况下)。这似乎有点越权嫌疑,不应该是 Lobe Chat 干的事情,但我细想了一下觉得还是有必要的,原生的 OpenAI API Key 可能没有提供向现在这些代理提供的这么多的细粒度的管理吧?万一服务端设置的是只开 3.5,但是客户端自行修改开了 4,是不是就不太好。

@arvinxx

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I found that I can't seem to set this variable, that is, I can't completely customize the model variable on the client. Instead, it has a function to get a list. This causes inconvenience. I can't remove or rename the original variable through the local environment. Models added by variables cannot override the naming (modify the display name of the provided model).

This should be an implementation logic problem I had before. I will first look for the ID with the same name that exists in the preset list. If it exists, it is considered to be a built-in model of LobeChat and is not allowed to be modified. I'll correct this later.

I think it shouldn’t be allowed to modify built-in models. For example, if I want to rename the display name of a built-in model locally, why can’t I do it (

This should be a completely client-controllable configuration item. If you want to restrict the server, it would be better to configure the API-Key permissions.

However, this also raises a question, whether it is possible to add an option during docker deployment, similar to "not allowing the client to use models beyond the authorization scope" (when the client does not provide its own API configuration additionally). This seems to be a bit overstepping the authority and should not be done by Lobe Chat, but after thinking about it carefully, I think it is still necessary. The native OpenAI API Key may not provide as much fine-grained management as provided to these agents now, right? What if the server is set to only open 3.5, but the client changes it to 4, isn't it good?

@arvinxx

zhuozhiyongde commented 5 months ago

我似乎理解错了意思,作者大佬你的意思应该是使用 One-API,直接在 API 层面鉴权,但我现在其实就是这么做的(我写了我在本地用个新的 API Key),所以提这个 issue 时想的和权限无关,而是我发现现在无法修改环境变量,配置显示名罢了。

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I seem to have misunderstood the meaning. Author, you should mean to use One-API to authenticate directly at the API level, but that is actually what I am doing now (I wrote a new API Key that I use locally), So when I raised this issue, I had nothing to do with permissions, but I found that I can't modify the environment variables and configure the display name.

arvinxx commented 5 months ago

又搞一个 docker 感觉 duck 不必

你没懂我的意思。 One-api是支持key 颗粒度的模型管理的。比如给 a key 配置了 3.5 的模型,那么用户输入a key然后点下获取,模型列表里就只会有3.5。

像你说的这个情况,我感觉就是你默认的部署镜像就用a key。 然后你给自己创建一个 b key ,里面添加 opus / 4 等自己要用的模型,然后把这个key填到你自己的本地电脑上,再拉取一下列表就是这个 key 的模型了。

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Building another docker feels like duck is not necessary

You don't understand me. One-api supports key granular model management. For example, if a 3.5 model is configured for a key, then if the user enters a key and clicks to get it, there will only be 3.5 in the model list.

In the case you mentioned, I feel that your default deployment image is to use a key. Then you create a b key for yourself, add opus / 4 and other models you want to use, then fill in this key on your own local computer, and then pull the list to be the model of this key.

zhuozhiyongde commented 5 months ago

又搞一个 docker 感觉 duck 不必

你没懂我的意思。 One-api是支持key 颗粒度的模型管理的。比如给 a key 配置了 3.5 的模型,那么用户输入a key然后点下获取,模型列表里就只会有3.5。

像你说的这个情况,我感觉就是你默认的部署镜像就用a key。 然后你给自己创建一个 b key ,里面添加 opus / 4 等自己要用的模型,然后把这个key填到你自己的本地电脑上,再拉取一下列表就是这个 key 的模型了。

我就是这么做的呀

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Build another docker and feel that duck is not necessary

You don't understand me. One-api supports key granular model management. For example, if a 3.5 model is configured for a key, then if the user enters a key and clicks to get it, there will only be 3.5 in the model list.

In the case you mentioned, I feel that your default deployment image is to use a key. Then you create a b key for yourself, add opus / 4 and other models you want to use, then fill in this key on your own local computer, and then pull the list to be the model of this key.

That's what I did

zhuozhiyongde commented 5 months ago

我用的API提供商本来就用到了one-api,我就是开了两个Key来管理权限,但是现在的问题是:

  1. 我无法修改默认模型的显示名、是否启用函数、识图等配置项
  2. 我觉得其实 lobe-chat 可以做一个这个选项,来允许没有使用 one-api 这样的“中间件”的用户在服务端实现额外模型的权限禁用
lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The API provider I used originally used one-api, and I just opened two keys to manage permissions, but the problem now is:

  1. I cannot modify the display name of the default model, whether to enable functions, image recognition and other configuration items.
  2. I think lobe-chat can actually make this option to allow users who do not use "middleware" such as one-api to disable the permissions of additional models on the server side.
arvinxx commented 5 months ago

我觉得就不应该不允许修改内置模型,比如我想本地给内置模型重命名一下显示名,为啥就不行(

如果诉求上是服务端希望自己完全控制模型列表的话,那就干脆这个配置做成全自定义,不和我们预定义的list 合并。但这样一来就是所有的能力这些都要你自己定义,比如function call 这些。

如果你是希望在浏览器里修改服务端预定义的模型名,那这个需求是不合理的。

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I think it shouldn’t be allowed to modify the built-in model. For example, I want to rename the display name of the built-in model locally, but why can’t it (

If the request is that the server wants to fully control the model list, then simply make this configuration fully customized and not merge with our predefined list. But this means that all capabilities must be defined by yourself, such as function calls.

zhuozhiyongde commented 5 months ago

这里的默认模型,指的是“在默认模型列表上的模型”,也即在 modelProviders 里的。

zhuozhiyongde commented 5 months ago

我觉得就不应该不允许修改内置模型,比如我想本地给内置模型重命名一下显示名,为啥就不行(

如果诉求上是服务端希望自己完全控制模型列表的话,那就干脆这个配置做成全自定义,不和我们预定义的list 合并。但这样一来就是所有的能力这些都要你自己定义,比如function call 这些。

如果你是希望在浏览器里修改服务端预定义的模型名,那这个需求是不合理的。

我的首要诉求是,在客户端(启用私有 api key url)的情况下可以完整的配置模型,其次是在服务端可以配置是否限制客户端(在不提供额外的 Key 的情况下)修改启用模型、模型的配置。

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I think it should not be allowed to modify the built-in model. For example, I want to rename the display name of the built-in model locally. Why can't it (

If the request is that the server wants to fully control the model list, then simply make this configuration fully customized and not merge with our predefined list. But this means that all capabilities must be defined by yourself, such as function calls.

If you want to modify the server-side predefined model name in the browser, then this requirement is unreasonable.

My first request is that the model can be fully configured on the client (private api key url is enabled), and on the server it can be configured whether to restrict the client (without providing additional Key) from modifying the enabled model and model. Configuration.

zhuozhiyongde commented 5 months ago

或者说,我希望客户端在不提供额外的 key 的时候不允许 patch 服务端给的信息,但是如果客户端已经提供了额外的 key,那你客户端就成了服务端,允许你 patch,服务端就当一个 proxy 帮你完成请求罢了。

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


In other words, I hope that the client is not allowed to patch the information given by the server when it does not provide additional keys. However, if the client has provided additional keys, then your client becomes the server, allowing you to patch and serve The client just acts as a proxy to help you complete the request.

arvinxx commented 5 months ago

我无法修改默认模型的显示名、是否启用函数、识图等配置项

如果你现在已经通过 api key 拉到列表了,为什么还需要额外定义模型的显示名 fc vision这些配置呢? 理论上这个应该已经配置好了吧

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I cannot modify the display name of the default model, whether to enable functions, image recognition and other configuration items

If you have already pulled the list through the api key, why do you need to additionally define the display name of the model, fc vision, and other configurations? In theory, this should already be configured.

arvinxx commented 5 months ago

我觉得其实 lobe-chat 可以做一个这个选项,来允许没有使用 one-api 这样的“中间件”的用户在服务端实现额外模型的权限禁用

这个不计划做,不属于 lobe-chat 的范畴。应该交由 one-api这样的去管。

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I think lobe-chat can actually make this option to allow users who do not use "middleware" such as one-api to disable permissions for additional models on the server side.

This is not planned and does not fall into the scope of lobe-chat. It should be left to someone like one-api to take care of it.

zhuozhiyongde commented 5 months ago

通过 api key 拉到

比如说我现在拉到的是 GPT-4 New 的显示名称,我希望他显示为 GPT-4 Turbo(

或者考虑一些奇葩的二开,他没有提供根据 api key 获取 models list 的情况呢

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Pull to via api key

For example, what I am pulling now is the display name of GPT-4 New, and I want it to be displayed as GPT-4 Turbo (

Or consider some weird second versions, which do not provide the situation of obtaining the models list based on the api key.

arvinxx commented 5 months ago

在客户端(启用私有 api key url)的情况下可以完整的配置模型

这个需求现在我理解应该满足了啊? 你应该可以通过输入自定义模型id 来完成配置的吧

zhuozhiyongde commented 5 months ago

我觉得其实 lobe-chat 可以做一个这个选项,来允许没有使用 one-api 这样的“中间件”的用户在服务端实现额外模型的权限禁用

这个不计划做,不属于 lobe-chat 的范畴。应该交由 one-api这样的去管。

确实,我也感觉有点越权,但我是觉得做了也无伤大雅,还是那句话,不是所有人都有 one-api 中间件让你细粒度鉴权的,万一直接接到 openai 的官方源,(对于没有配置经验的人)就可能会出现预期外的情况。我在服务端开的只有 3.5,但是为啥你客户端可以加 4 的模型这样子的

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The model can be fully configured on the client side (private api key url enabled)

Now I understand that this need should be met, right? You should be able to complete the configuration by entering a custom model id.

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I think lobe-chat can actually make this option to allow users who do not use "middleware" such as one-api to disable permissions for additional models on the server side.

This is not planned and does not belong to the scope of lobe-chat. It should be left to someone like one-api to take care of it.

Indeed, I also feel that it is a bit overstepping my authority, but I think it is harmless to do it. Again, not everyone has one-api middleware that allows you to authenticate fine-grained. In case you directly connect to the official source of openai, (For those without configuration experience) Unexpected situations may occur. I only have 3.5 enabled on the server, but why can you add a 4 model on the client like this?

zhuozhiyongde commented 5 months ago

在客户端(启用私有 api key url)的情况下可以完整的配置模型

这个需求现在我理解应该满足了啊? 你应该可以通过输入自定义模型id 来完成配置的吧

可以加模型(而且只能加不能删),但是不能修改显示名与功能配置,也即不能 patch 拉到的 model 信息

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The model can be fully configured on the client side (private api key url enabled)

Now I understand that this requirement should be met? You should be able to complete the configuration by entering a custom model id.

Models can be added (and can only be added but not deleted), but the display name and function configuration cannot be modified, that is, the pulled model information cannot be patched.

arvinxx commented 5 months ago

通过 api key 拉到

比如说我现在拉到的是 GPT-4 New 的显示名称,我希望他显示为 GPT-4 Turbo(

我理解你应该可以通过添加 gpt-4-turbo 这个模型来覆盖原有的显示,我有专门做成用户定义的模型会覆盖预设模型的逻辑。

或者考虑一些奇葩的二开,他没有提供根据 api key 获取 models list 的情况呢

这个不考虑了,为啥我要管这种奇葩?

zhuozhiyongde commented 5 months ago

我觉得其实 lobe-chat 可以做一个这个选项,来允许没有使用 one-api 这样的“中间件”的用户在服务端实现额外模型的权限禁用

这个不计划做,不属于 lobe-chat 的范畴。应该交由 one-api这样的去管。

确实,我也感觉有点越权,但我是觉得做了也无伤大雅,还是那句话,不是所有人都有 one-api 中间件让你细粒度鉴权的,万一直接接到 openai 的官方源,(对于没有配置经验的人)就可能会出现预期外的情况。我在服务端开的只有 3.5,但是为啥你客户端可以加 4 的模型这样子的

而且如果做了,应该设置为默认开启。