Skip to content

[cherrypick release-2.0] fix(web): 用户只能看到本人分组的模型 (#129) - #183

Closed
suanova-bot[bot] wants to merge 1 commit into
release-2.0from
cherrypick-178-to-release-2.0
Closed

suanova-bot[bot] wants to merge 1 commit into
release-2.0from
cherrypick-178-to-release-2.0

Conversation

@suanova-bot

@suanova-bot suanova-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown

Description

Backport of #178 to release-2.0.

* 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)
@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zhujian7
zhujian7 deleted the branch release-2.0 October 29, 2026 08:16
@zhujian7 zhujian7 closed this Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants