Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brand new AI provider Feedback | 全新 AI Provider 管理模块反馈 #5327

Open
4 tasks done
arvinxx opened this issue Jan 7, 2025 · 67 comments
Open
4 tasks done
Labels
Model Provider 模型服务商 tts TTS/STT vision

Comments

@arvinxx
Copy link
Contributor

arvinxx commented Jan 7, 2025

image

We released a brand new AI Provider management module in version v1.44.0, bringing a completely new experience for managing AI service providers. Based on extensive user feedback, we introduced the following in this new Provider version:

  • Create custom service providers (supporting different SDK formats, such as multiple OpenAI format providers), create custom models;
  • Capabilities and parameter customization for all models (currently only FC and Vision are available, more will be opened in the future based on community demand);
  • Custom sorting by service provider, enable custom sorting of models;
  • Supported full-type models at the framework level (language models, embedding models, TTS/STT models, text-to-image models). This framework enables us to support richer modal AI models in the future, such as text-to-video and music models.

As the new feature for the beginning of 2025, we expect this new module to encompass all possibilities for the coming year, making LobeChat the most versatile client in the AI Chat field~

Important

Note: This AI Provider module upgrade is only available under the server DB. Future iterations will support pglite mode. The dexie db will maintain its original implementation and will be completely removed in v2.0.

At the same time, the AI Provider page has undergone a complete rewrite from data storage to front-end implementation in order to achieve better performance and interaction experience. Therefore, at this stage, the logic related to the original environment variables may not be implemented or may have flaws. If you encounter any scenarios that do not meet your expectations, please provide feedback below, and I will strive to complete the fix within T+1 days.

Therefore, when this post is closed, if there are still no feedback on the environment variable issue, it will be removed as a deprecated feature in V2.


我们在 v1.44.0 版本发布了全新的 AI Provider 管理模块,带来了全新的 AI 服务商管理体验。结合诸多用户反馈,我们在这一全新的 Provider 版本中,带来了:

  • 创建自定义服务商(支持不同 SDK 格式,例如多个 OpenAI 格式的服务商)、创建自定义模型;
  • 所有模型的能力、参数自定义(目前仅开放 FCVision,未来将会根据社区诉求开放更多参数,例如模型是否支持流式等);
  • 服务商自定义排序、启用模型的自定义排序;
  • 在框架层支持了全量类型的模型(语言模型、Embedding模型、TTS/STT 模型、文生图模型。这一框架使得我们未来也将能支持上文生视频、音乐模型等更丰富模态的 AI 模型。

image
image
image

Important

注意事项:本次 AI Provider 模块升级,只在服务端 DB 下可用,后续迭代会支持 pglite 模式。而 dexie db 仍保持原有实现,后续将在 v2.0 中完全移除。

由于AI Provider 这个页面从数据存储到前端实现是一次完全的重写,以期获得更好的操作性能和交互体验。因此数据上是完全独立的两套,我们不做任何迁移,升级后你需要自行重新配置对应的 Provider。同时现阶段的实现中,和原有 环境变量 相关的部分的逻辑可能没有实现或者存在瑕疵。如果遇到不符合你的预期场景,请在下方反馈,我会争取在当天评估是否对齐原有逻辑,如需对齐, T+1 天内完成对齐。

待本帖关闭时,如果仍然没有反馈的环境变量问题,也将作为废弃功能在 V2 中移除。

作为 2025 年的开年新特性,我们期望这个新的模块能承载未来一年的全部可能性,让 LobeChat 变成 AI Chat 领域最全面的 AI 客户端 🚀

@arvinxx arvinxx pinned this issue Jan 7, 2025
@lobehub lobehub deleted a comment from lobehubbot Jan 7, 2025
@dosubot dosubot bot added Model Provider 模型服务商 tts TTS/STT vision labels Jan 7, 2025
@YANANEER
Copy link

YANANEER commented Jan 7, 2025

  • OpenAI的模型列表里总有几个模型关不掉,关掉后点击获取模型列表又会自动启用。
  • 模型自定义排序好像只在AI服务商的列表里有效。

我只在环境变量里配置了OPENAI_API_KEY和OPENAI_PROXY_URL


1.44.1更新后模型自定义排序有似乎效了,但那些多出来的模型排序优先级比这个自定义排序的优先级高

@lobehubbot
Copy link
Member

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


  • There are always several models in the OpenAI model list that cannot be turned off. After turning them off, click to get the model list and they will be automatically enabled again.
  • Custom sorting of models seems to be completely useless.

@SpeedupMaster
Copy link
Contributor

  • 环境变量中 *_MODEL_LIST -all 功能失效,无法仅启用需要的模型
  • 是否可以在环境变量里模型排序,之前是可以通过*_MODEL_LIST里添加模型的先后顺序来排
  • 是否能在环境变量里添加自定义服务商?

@lobehubbot
Copy link
Member

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


  • The *_MODEL_LIST -all function in the environment variable is invalid and cannot enable only the required models.
  • Is it possible to sort models in environment variables? Previously, it was possible to sort the models by adding them in *_MODEL_LIST.
  • Is it possible to add a custom service provider in environment variables?

@coulsontl

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@sqkkyzx
Copy link

sqkkyzx commented Jan 8, 2025

1. AI服务商列表中启用的模型与对话页面的可选模型不匹配:

对话页面的模型选项会显示AI服务商中未启用的模型,甚至将模型全部禁用也会显示模型。
image
image
image

备注1:测试过将服务商禁用,对话页面对应服务商会消失,再启用服务商(未启用任何模型),对话页面对应服务商会显示,并且依然存在三个未启用的模型。
备注2:其他服务商也有类似问题。

2. OpenAI(使用AIHUBMIX)点击获取模型列表按钮时,会显示并自动启用其他一些模型,比如 Claude 3.5

备注:猜测是否与 AIHUBMIX 的模型范围限制有关,我从模型范围限制中删除Claude模型的访问权限,然后,在AI服务商列表中删除Claude模型,等待大约10分钟后,再次点击获取模型列表按钮时,不会再出现 Claude 的模型了。

3. 希望保留一些提供商的环境变量功能

像OLLAMA这类,希望禁用下载模型的功能,否则不小心运行太大的模型会对服务器造成影响。或者有一个对所有用户生效的配置全局AI提供商。

@lobehubbot
Copy link
Member

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


1. The model enabled in the AI service provider list does not match the optional model on the Conversation page:

The model option on the Dialogue page will display models that are not enabled in the AI Service Provider, and even disabling all models will display the models.
image
image
image

Note 1: After testing, if the service provider is disabled, the corresponding service provider on the dialogue page will disappear. If the service provider is enabled again (no model is enabled), the corresponding service provider on the dialogue page will be displayed, and there are still three unenabled models.
Note 2: Other service providers have similar problems.

2. When OpenAI (using AIHUBMIX) clicks the Get model list button, some other models will be displayed and automatically enabled, such as Claude 3.5

Note: Guessing whether it is related to the Model Range Limitation of AIHUBMIX, I removed the access rights of the Claude model from the Model Range Limitation, and then deleted the Claude model from the AI Service Provider list. After waiting for about 10 minutes, when you click the Get Model List button again, Claude's model will no longer appear.

3. Hope to retain some of the provider’s environment variable functionality

Like OLLAMA, I hope to disable the function of downloading models, otherwise accidentally running a model that is too large will affect the server. Or have a configured global AI provider that takes effect for all users.

@SAnBlog
Copy link

SAnBlog commented Jan 8, 2025

  • 环境变量中 *_MODEL_LIST -all 功能失效,无法仅启用需要的模型
  • 是否可以在环境变量里模型排序,之前是可以通过*_MODEL_LIST里添加模型的先后顺序来排
  • 是否能在环境变量里添加自定义服务商?

对于环境变量的需求还是很重要的,对于用户来说并不懂配置,希望能兼容原先的环境变量
1.如*_MODEL_LIST
2.在Openai服务商中自定义其他模型等

@lobehubbot
Copy link
Member

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


  • The *_MODEL_LIST -all function in the environment variable is invalid and cannot only enable the required models.
  • Is it possible to sort models in environment variables? Previously, it was possible to sort by the order of adding models in *_MODEL_LIST
  • Is it possible to add a custom service provider in environment variables?

The need for environment variables is still very important. For users who do not know how to configure, they hope to be compatible with the original environment variables.

  1. Such as *_MODEL_LIST
  2. Customize other models in the Openai service provider, etc.

@SAnBlog
Copy link

SAnBlog commented Jan 8, 2025

  • 环境变量中 *_MODEL_LIST -all 功能失效,无法仅启用需要的模型
  • 是否可以在环境变量里模型排序,之前是可以通过*_MODEL_LIST里添加模型的先后顺序来排
  • 是否能在环境变量里添加自定义服务商?

对于环境变量的需求还是很重要的,对于用户来说并不懂配置,希望能兼容原先的环境变量 1.如*_MODEL_LIST 2.在Openai服务商中自定义其他模型等

2 是上文的<是否能在环境变量里添加自定义服务商>,设置里提供了自定义服务商,这就不用在原先的Openai服务商中配置,希望能够在变量里能添加

@lobehubbot
Copy link
Member

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


  • The *_MODEL_LIST -all function in the environment variable is invalid and cannot enable only the required models.
  • Is it possible to sort models in environment variables? Previously, it was possible to sort by the order of adding models in *_MODEL_LIST
  • Is it possible to add a custom service provider in environment variables?

The need for environment variables is still very important. For users who do not know how to configure, they hope to be compatible with the original environment variables 1. Such as *_MODEL_LIST 2. Customize other models in the Openai service provider, etc.

2 is the above ? Custom service providers are provided in the settings, so there is no need to configure them in the original Openai service provider. I hope that I can add them to the variables.

@arvinxx

This comment was marked as resolved.

@lobehubbot
Copy link
Member

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


The problem of sorting and refreshing not taking effect has been fixed in #5330

@arvinxx
Copy link
Contributor Author

arvinxx commented Jan 8, 2025

环境变量中 _MODEL_LIST -all 功能失效,无法仅启用需要的模型
是否可以在环境变量里模型排序,之前是可以通过
_MODEL_LIST里添加模型的先后顺序来排

@SpeedupMaster MODEL_LIST 环境变量会保持原样,今天会兼容上,之前什么样,现在也应该是什么样;

是否能在环境变量里添加自定义服务商?

不考虑在环境变量中添加自定义服务商,能配置的东西太少了,未来可能会考虑加一个全局范围的服务商设定,面向管理员来控制。

还有就是tts和embedding这种非聊天模型也会展示在聊天框的下拉模型列表里

@coulsontl 这个是 by design ,后续这个 ai provider 的页面还会加入文生图、文生视频等各类模型,provider 也不再仅局限于 chat 类的 provider。

@lobehubbot
Copy link
Member

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


The *_MODEL_LIST -all function in the environment variable is invalid and cannot enable only the required models.
Is it possible to sort the models in the environment variables? Previously, it was possible to sort the models by adding them in *_MODEL_LIST.

@SpeedupMaster MODEL_LIST environment variables will remain the same and will be compatible today. What was before should be what it is now;

Is it possible to add a custom service provider in environment variables?

I don’t consider adding a custom service provider in the environment variables. There are too few things that can be configured. In the future, I may consider adding a global service provider setting for administrators to control.

In addition, non-chat models such as tts and embedding will also be displayed in the drop-down model list of the chat box.

@coulsontl This is by design. In the future, various models such as Vincent pictures and Vincent videos will be added to the AI ​​provider page. The provider is no longer limited to chat providers.

@gemnioo
Copy link

gemnioo commented Jan 8, 2025

the cross-region inference in aws bedrock still makes user confused; the naming issues need to be addressed

image

Ref: #4659

@Sun-drenched
Copy link

Sun-drenched commented Jan 8, 2025

docker部署环境下OPENAI_MODEL_LIST环境变量下各项设置失效。
————————————————————————————————
看到之前的回复了,已解决。

@lobehubbot
Copy link
Member

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


Various settings under the OPENAI_MODEL_LIST environment variable in the docker deployment environment are invalid.

@CoolGIS

This comment has been minimized.

@lobehubbot

This comment has been minimized.

@YANANEER

This comment has been minimized.

@lobehubbot

This comment has been minimized.

@arvinxx

This comment has been minimized.

@arvinxx

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@Sun-drenched

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@again2k
Copy link

again2k commented Jan 8, 2025

Azure 和 Groq,始终提示 KEY 不存在或错误,明明是正确的配置

@lobehubbot
Copy link
Member

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


Azure and Groq always prompt that the KEY does not exist or is wrong, but it is obviously the correct configuration.

@jiajiaxd

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@2273446670

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@2273446670

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@TonyBlur
Copy link

TonyBlur commented Jan 9, 2025

目前移动端edge浏览器访问时,无法按住右侧拖动区域对模型进行排序,表现为拖动移动很短一段距离后脱离控制
Screenshot_2025-01-09-11-33-14-470_com.microsoft.emmx.jpg

@TonyBlur
Copy link

TonyBlur commented Jan 9, 2025

未来是否会提供环境变量预配置自定义服务商的功能 期待 ❤️

@lobehubbot
Copy link
Member

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


Looking forward to whether the function of environment variable preconfiguration and custom service provider will be provided in the future ❤️

@TonyBlur
Copy link

TonyBlur commented Jan 9, 2025

当前版本(1.45.0)还存在获取模型列表后,仍然会显示当前API默认的部分模型,但是实际/v1/models中并没有获取到的模型,且无法删除,如下图所示
Screenshot_2025-01-09-11-42-03-068_com.microsoft.emmx.jpg

@lobehubbot
Copy link
Member

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


In the current version (1.45.0), after obtaining the model list, some of the default models of the current API will still be displayed, but the actual models are not obtained in /v1/models and cannot be deleted, as shown in the figure below
Screenshot_2025-01-09-11-42-03-068_com.microsoft.emmx.jpg

@arvinxx
Copy link
Contributor Author

arvinxx commented Jan 9, 2025

OpenAI系部分模型设定的展示名称在聊天界面不能正确显示。(如红色框所示) 另外,有部分未选中模型仍然显示,且优先级比所有选中模型都高。(如绿色框所示) image ** image **

这个应该已经修复了?1.45.3 可以再测试下

@lobehubbot
Copy link
Member

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


The display names set for some OpenAI models are not displayed correctly in the chat interface. (As shown in the red box) In addition, some unselected models are still displayed and have a higher priority than all selected models. (As shown in the green box) ![image](https://private-user-images.githubusercontent.com/11055122/401008596-545339e7-3c4e-4209-9 4f3-5c7d000fd5ef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoic mF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzY0MDA4NTEsIm5iZiI6MTczNjQwMDU1MSw icGF0aCI6Ii8xMTA1NTEyMi80MDEwMDg1OTYtNTQ1MzM5ZTctM2M0ZS00MjA5LTk0ZjMtNWM3ZDAwMGZkNWVmLnBuZz9YLUFtei 1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAx MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA5VDA1MjkxMVomWC1BbXotRXhwaXJ lcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYwYjlhNWVjYzkyOWJhNmY1NjIxZTQ3NGU2MTNmOTFkZTkxODk4Y2QwYjE1ODAwMTgwM GQxODYzMDQyMGY5NTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.3tkJxUucGtRYBKa8o38o8Pyom2qE07lYWWyD85lb_pc) ** ![image](https://private-user-images.githubusercontent.com/11055122/401008802-e1d1f449-9bef-4bba-9 8c6-2060c913b074.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoic mF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzY0MDA4NTEsIm5iZiI6MTczNjQwMDU1MSw icGF0aCI6Ii8xMTA1NTEyMi80MDEwMDg4MDItZTFkMWY0NDktOWJlZi00YmJhLTk4YzYtMjA2MGM5MTNiMDc0LnBuZz9YLUFtei 1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAx MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA5VDA1MjkxMVomWC1BbXotRXhwaXJ lcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNmZWNhZGMyZWNlNzc0MmQxMTk0YzQ2ZjBjMDFlZTBmMDI0ODQwMzhiNDIwZTQ5MDAwY zU1NTBiZDZlY2M3MjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.aUBbaXOq069BaJtzMno6g3XdVCd6s-sLTLWVK4TLANA) **

This should have been fixed? 1.45.3 Can be tested again

@arvinxx
Copy link
Contributor Author

arvinxx commented Jan 9, 2025

@2273446670 v1.45.3 应该已经修复

@lobehubbot
Copy link
Member

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


@2273446670 v1.45.3 should have been fixed

@arvinxx
Copy link
Contributor Author

arvinxx commented Jan 9, 2025

(至少在OpenAI)手动配置了一些模型及展示名称后重新获取模型列表,之前的配置项全部清空。
——重新获取模型列表,至少不应该动已经配置过的模型

现在获取模型列表的逻辑是批量更新,如果不存在则插入一条新的模型记录。如果按你说的来的话,这个逻辑就变成了只做批量插入,不做更新。这里的取舍是更新模型的频次高,还是新增模型的频次高?
如果是后者,那么就换成批量插入,不做更新

频次高低与取舍我也不太清楚。但我觉得目前的批量更新逻辑对应的动作名应该是“重置模型列表”;如果说换成批量插入,才可以称作更新(有模型新增、但保留存量)。不然的话有一定误导性,如果用户之前自己自定义了很多配置项,更新一下全没了,还是有点尴尬。“重置”能够提示已配置项会初始化。

在 v1.45.3 中,已经按照批量插入,不做已有配置项更新的逻辑来处理了。

@lobehubbot
Copy link
Member

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


(At least in OpenAI) After manually configuring some models and display names, re-obtain the model list and clear all previous configuration items.

  • Re-obtain the model list, at least the configured models should not be touched

Now the logic of getting the model list is to update in batches, and insert a new model record if it does not exist. If you go by what you said, the logic becomes only batch inserts and no updates. The trade-off here is whether to update the model more frequently or to add new models more frequently?
If it is the latter, then switch to batch insertion without updating.

I’m not sure about the frequency and trade-offs. But I think the action name corresponding to the current batch update logic should be "reset model list"; if it is replaced by batch insertion, it can be called an update (models are added, but the existing ones are retained). Otherwise, it is somewhat misleading. If the user has customized many configuration items before, it will be a bit embarrassing if they are all gone after the update. "Reset" can prompt that configured items will be initialized.

In v1.45.3, it has been processed according to the logic of batch insertion and no update of existing configuration items.

@arvinxx
Copy link
Contributor Author

arvinxx commented Jan 9, 2025

@jiajiaxd github provider 的问题在 1.45.4 修复

@lobehubbot
Copy link
Member

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


@jiajiaxd github provider problem will be fixed in 1.45.4

@ysicing
Copy link

ysicing commented Jan 9, 2025

@arvinxx Azure 好像也有问题
image

@lobehubbot
Copy link
Member

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


@arvinxx Azure seems to have a problem too
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Model Provider 模型服务商 tts TTS/STT vision
Projects
None yet
Development

No branches or pull requests