Skip to content

fix: exclude unconfigured models from pricing plaza - #4371

Open
feitianbubu wants to merge 1 commit into
QuantumNous:mainfrom
feitianbubu:pr/522f41c1c9153ca6cd98d19d49373b9521cab856
Open

fix: exclude unconfigured models from pricing plaza#4371
feitianbubu wants to merge 1 commit into
QuantumNous:mainfrom
feitianbubu:pr/522f41c1c9153ca6cd98d19d49373b9521cab856

Conversation

@feitianbubu

@feitianbubu feitianbubu commented Apr 21, 2026

Copy link
Copy Markdown
Member

⚠️ 提交说明 / PR Notice

目前未配置的模型会显示在模型广场
未配置的模型描述, 标签都尚未配置, 不应该显示到前端的模型广场

📝 变更描述 / Description

模型列表增加是否配置判断, 过滤未配置模型

📸 运行证明 / Proof of Work

image

修改前:
image

修改后:
image

Summary by CodeRabbit

  • Bug Fixes
    • Improved pricing enrichment logic to properly handle unconfigured models by treating models without a valid identifier the same as disabled models, ensuring accurate pricing data compilation.

@coderabbitai

coderabbitai Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8758e508-92f3-4a80-bfcd-08f3358df523

📥 Commits

Reviewing files that changed from the base of the PR and between f995a86 and fd845d8.

📒 Files selected for processing (1)
  • model/pricing.go

Walkthrough

The updatePricing function's skip condition for model metadata enrichment now treats models with Id == 0 as disabled/unconfigured, in addition to the existing Status != 1 check, preventing metadata population for such models.

Changes

Cohort / File(s) Summary
Pricing Skip Logic
model/pricing.go
Modified updatePricing to skip models when meta.Status != 1 or meta.Id == 0, adding an additional check to exclude unconfigured models from pricing metadata enrichment.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A model with no ID won't take flight,
We skip it now, keeping pricing tight,
With zero we know it's not quite right,
Status and ID both shine so bright! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a check to exclude unconfigured models (those with Id == 0) from the pricing plaza.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

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.

1 participant