[Bug] 自定义模型无法设置显示名称,聊天界面显示完整模型 ID,名字巨长
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
问题描述 · Summary
添加自定义模型(OpenAI-compatible 供应商)时,只能填写模型 ID,没有"显示名称"输入框。聊天界面模型名显示为完整模型 ID + 供应商名(如 deepseek/deepseek-v4-flash · com),名字巨长,影响观感。
复现步骤 · Steps to reproduce
- 打开 ZCode → 设置 → 模型供应商 → 添加自定义供应商(OpenAI Compatible)
- 填写 Base URL 和 API Key
- 在"模型"文本框中输入模型 ID(如
deepseek/deepseek-v4-flash) - 保存后打开聊天窗口,查看顶部模型名
期望表现 · Expected behavior
添加模型时可以设置"显示名称"(如 DeepSeek Flash),聊天界面显示短名,API 调用仍使用原始模型 ID。
实际表现 · Actual behavior
没有"显示名称"输入框,聊天界面显示完整模型 ID deepseek/deepseek-v4-flash,且与供应商名拼接显示,名字很长。
补充证据(已排查)· Additional evidence
配置 schema zcode.model-providers.v2 已支持 modelDisplayNames 字段(模型 ID → 显示名 的映射),渲染层逻辑 label = modelDisplayNames?.[模型ID] 也已实现;但 i18n 中的 settings.modelProvider.modelDisplayName("显示名称")在渲染代码中 0 次引用,UI 从未接入此字段。疑似功能未完成即发布。
- ZCode 版本:3.10.2
- 设备 / 系统:macOS (Apple Silicon)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the custom OpenAI-compatible provider settings UI, the zcode.model-providers.v2 schema, and the rendering logic using modelDisplayNames; also check the i18n key settings.modelProvider.modelDisplayName. Add the missing display-name flow while preserving the original model ID for API calls, then verify the saved name appears in the chat header and the existing ID remains unchanged for requests.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100