Skip to content

修改模型展示名称后,对话页面模型选择框里联网和生图标识不能正常显示 #7160

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

Open
coulsontl opened this issue Mar 26, 2025 · 3 comments
Labels
🐛 Bug Something isn't working | 缺陷 unconfirm 未被维护者确认的问题

Comments

@coulsontl
Copy link
Contributor

coulsontl commented Mar 26, 2025

📦 部署环境

Docker

📦 部署模式

服务端模式(lobe-chat-database 镜像)

📌 软件版本

v1.75.2

💻 系统环境

Other Linux

🌐 浏览器

Chrome

🐛 问题描述

默认的Google预览版本模型的名称太长,于是我手动更新了一下展示名称;但是更新之后在对话页面模型选择框里联网和生图ICON标识不能正常显示了

Image

但是功能是可以正常使用的,并且设置页里也可以正常显示联网和生图ICON标识

Image

📷 复现步骤

手动修改模型的展示名称去掉Experimental字符串

Image

🚦 期望结果

更新展示名称之后,在对话页面模型选择框里也能正常显示联网和生图ICON标识;应该根据id去判断icon的展示而不是使用展示名称去判断

📝 补充信息

No response

@coulsontl coulsontl added the unconfirm 未被维护者确认的问题 label Mar 26, 2025
@lobehubbot
Copy link
Member

👀 @coulsontl

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@dosubot dosubot bot added the 🐛 Bug Something isn't working | 缺陷 label Mar 26, 2025
Copy link

dosubot bot commented Mar 26, 2025

The issue you're experiencing seems to be related to how the icons are determined in the model selection dropdown. The icons should be displayed based on the model's ID and its features, not the display name. The ModelItemRender component is responsible for rendering each model option, and it uses the ModelIcon component to display an icon based on the model's ID. Additionally, feature-specific icons are displayed using the ModelInfoTags component, which relies on the model's properties like files, imageOutput, vision, etc. [1][2][3].

If the icons are not displaying correctly after changing the display name, it might be worth checking if the logic for determining the icons is inadvertently using the display name instead of the ID. Ensure that the ModelIcon and ModelInfoTags components are correctly using the model ID to determine which icons to show.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Copy link

dosubot bot commented Mar 26, 2025

The issue you're experiencing with the icons not displaying correctly in the model selection dropdown after modifying the model's display name is likely due to how the codebase handles icon display logic. The ModelIcon component uses the model's id to determine which icon to display, not the displayName. Therefore, changing the displayName should not affect the icon display, as the logic is independent of the displayName and relies solely on the id [1].

If the icons are not displaying correctly, it might be worth checking if the id is being altered or if there are any other changes in the code that might affect how the id is being used to render icons. Ensure that the id remains consistent and correctly mapped to the icons you expect to display.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 unconfirm 未被维护者确认的问题
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants