Repository navigation
[cherrypick release-2.0] fix(web): 用户只能看到本人分组的模型 (#129) - #183
Closed
suanova-bot[bot] wants to merge 1 commit into
Closed
suanova-bot[bot] wants to merge 1 commit into
suanova-bot[bot] wants to merge 1 commit into
Conversation
* fix(web): 用户只能看到本人分组的模型 (#129) Playground 与 Model Square 之前按「可用分组」展示模型,而可用分组包含 default/vip 等全局分组,分组为 yeebo 的用户会看到并选中别的分组的模型。 - playground:隐藏分组选择列(SHOW_PLAYGROUND_GROUP_SELECTOR),模型列表 改为按账号自己的分组请求,聊天请求携带该分组;账号分组变化时自动刷新。 - Model Square:后端价目表在可用分组过滤后再按本人分组收窄(all 除外, 匿名视图不变);删除 Groups 列;Endpoint Type 只列真实可用的类型。 - 补充对应回归测试。 * fix(web): 隐藏分组选择器时仍写入分组,避免模型选择器被禁用 (#129) * fix(pricing): 管理员在模型广场看到全部分组 (#129) * fix(playground): 只列出能聊天的模型 (#129) Playground 的模型下拉框直接复用 /api/user/models,图片/视频生成模型也一起 列了出来,选中后必然报错。加 endpoint=chat 查询参数,由后端按价目表的端点 类型过滤:媒体生成端点一旦出现就排除(它们挂在 OpenAI 渠道上时也带 openai 端点),responses-only 模型同样不算能聊天。其他调用方不传该参数,行为不变。 * fix: restrict pricing on group lookup failure and preserve pricing filters and playground model selection * chore(i18n): 页脚品牌名统一为「算丰信息」 页脚简介里「算丰」改为「算丰信息」,与站点其他文案的品牌写法保持一致; 繁体同步为「算豐信息」。同一段里「算丰云」指云平台,保持不变。 * fix(playground): 聊天模型过滤按分组取端点能力 (#129) 价目表的 supported_endpoint_types 按模型名合并了全部分组的能力。同名模型 在一组走对话渠道、另一组走视频/图片渠道时,合并结果会把两个能力都算进来, Playground 就会把这组能聊天的模型漏掉。 updatePricing 现在额外记录「模型 -> 分组 -> 端点」一份,模型级元数据 (models 表的端点声明、text-to-image 标签)仍然对每个分组生效; GetModelSupportEndpointTypesByGroups 汇总指定分组的端点能力,供 /api/user/models?endpoint=chat 使用。 * revert: 撤掉 Model Square 的分组收窄改动 (#129) Model Square 的改动不在 issue #129 范围内,先整体回退到 main 的行为: 价目表分组过滤、管理员全量视图、Groups 列与端点类型筛选全部恢复原样, 分支只保留 Playground 的修复。model/pricing.go 的分组端点能力保留, 它是 Playground 聊天模型过滤的依赖。 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> (cherry picked from commit ccf5019)
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #178 to
release-2.0.