Skip to content

fix: list only channel models in unset price models tab - #6126

Merged
t0ng7u merged 1 commit into
QuantumNous:mainfrom
feitianbubu:fix/unset-tab-channel-models-only
Jul 11, 2026
Merged

fix: list only channel models in unset price models tab#6126
t0ng7u merged 1 commit into
QuantumNous:mainfrom
feitianbubu:fix/unset-tab-channel-models-only

Conversation

@feitianbubu

@feitianbubu feitianbubu commented Jul 11, 2026

Copy link
Copy Markdown
Member

⚠️ 提交说明 / PR Notice

Important

  • 请提供人工撰写的简洁摘要,避免直接粘贴未经整理的 AI 输出。

📝 变更描述 / Description

未设置价格模型列表目前的行来源是 渠道启用模型 ∪ 各倍率表出现过的模型名。后者会把一批"只在缓存/音频等次级倍率表里有 key、没有基础价、且不在任何渠道里"的历史遗留条目也列出来

改动:只取渠道设置的启用模型,显示更干净

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix) - 请关联对应 Issue,避免将设计取舍、理解偏差或预期不一致直接归类为 bug
  • ✨ 新功能 (New feature) - 重大特性建议先通过 Issue 沟通
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 IssuesPRs,确认不是重复提交。
  • Bug fix 说明: 若此 PR 标记为 Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在本地运行并通过测试或手动验证,维护者可以据此复核结果。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

📸 运行证明 / Proof of Work

优化前: 会显示在硬编码但未在渠道里配置的模型
image
优化后: 只显示真正的未设置价格模型
image

Summary by CodeRabbit

  • Bug Fixes
    • Improved model ratio editor filtering by showing only candidate models when viewing unset ratios.
    • Preserved existing model lists for other filter modes.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The model ratio visual editor now limits model names to candidates when filterMode is unset; other filter modes retain the merged saved, draft, and candidate model names.

Changes

Model filtering

Layer / File(s) Summary
Conditional model name selection
web/default/src/features/system-settings/models/model-ratio-visual-editor.tsx
modelNames uses only candidate models for the unset filter mode and retains the existing merged set for other modes.

Estimated code review effort: 2 (Simple) | ~5 minutes

Poem

A rabbit checks the model rows,
“Unset” keeps candidates in rows.
Saved and drafts remain in flight,
Other filters work just right.
Hop, hop—clean names take their place!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: limiting the Unset Price Models tab to channel-enabled models.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@t0ng7u
t0ng7u merged commit 7c28993 into QuantumNous:main Jul 11, 2026
2 checks passed
@t0ng7u t0ng7u self-assigned this Jul 11, 2026
JacksonsY added a commit to JacksonsY/new-api that referenced this pull request Jul 12, 2026
上游 v1.0.0-rc.21 之后 2 个提交(PR QuantumNous#6126):未设价模型标签页只列渠道启用的模型。
唯一冲突文件 model-ratio-visual-editor.tsx 自动合并——上游改 modelNames 构造
(unset 模式只取候选模型),与 fork 的 design-system 换肤(第 46/804 行)不重叠。
lansine pushed a commit to evin-pubb/new-api-fork that referenced this pull request Jul 14, 2026
…6126)

Merge pull request QuantumNous#6126 from feitianbubu/fix/unset-tab-channel-models-only
zhaodechao2008 pushed a commit to zhaodechao2008/new-api that referenced this pull request Jul 27, 2026
…6126)

Merge pull request QuantumNous#6126 from feitianbubu/fix/unset-tab-channel-models-only
330079598 pushed a commit to 330079598/new-api that referenced this pull request Aug 19, 2026
…6126)

Merge pull request QuantumNous#6126 from feitianbubu/fix/unset-tab-channel-models-only
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