Skip to content

feat: 新版本前端设置页"模型定价"添加"未定价模型"选项,补充便捷的未定价模型管理功能 - #5564

Closed
funkpopo wants to merge 46 commits into
QuantumNous:mainfrom
funkpopo:new-front-model-price-fix-clean
Closed

feat: 新版本前端设置页"模型定价"添加"未定价模型"选项,补充便捷的未定价模型管理功能#5564
funkpopo wants to merge 46 commits into
QuantumNous:mainfrom
funkpopo:new-front-model-price-fix-clean

Conversation

@funkpopo

@funkpopo funkpopo commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

⚠️ 提交说明 / PR Notice

Important

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

📝 变更描述 / Description

新版前端界面"模型定价"页,仅有"模型价格""工具价格""上游价格同步"选项,导致管理员新增渠道和模型后,管理未定价模型的操作较繁琐。添加"未定价模型"选项,方便捕获未定价模型列表,并提供快捷配置入口。

🚀 变更类型 / Type of change

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

✅ 提交前检查项 / Checklist

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

📸 运行证明 / Proof of Work

(请在此粘贴截图、关键日志或测试报告,以证明变更生效)

Summary by CodeRabbit

  • New Features
    • Added an “Unpriced Models” tab to model pricing settings with a searchable editor and a “Set price” flow (desktop panel / mobile sheet).
  • Improvements
    • “Save model prices” is now shown in visual mode, committing pending edits before applying changes.
    • Unpriced model lists no longer include deleted draft rows; delete success messaging is updated.
    • Unpriced model selection is keyboard-accessible.
  • Localization
    • Added new strings for unpriced pricing states and failure notifications across EN/ZH/FR/JA/RU/VI.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds an "Unpriced Models" tab to the model pricing settings. Introduces useUpdateModelRatios (billing-mode-aware PUT mutation), UnpricedModelsEditor (searchable list with desktop panel and mobile sheet), and UnpricedModelCard (accessible card primitive). Updates the save button visibility and delete-draft filtering in existing editors. Adds localization across six languages.

Changes

Unpriced Models Pricing Workflow

Layer / File(s) Summary
Model ratio mutation pipeline
web/default/src/features/system-settings/models/use-update-model-ratios.ts
New useUpdateModelRatios hook fetches current options, applies billing-mode-dependent pricing updates (tiered_expr / per-request / per-token), PUTs each derived key, and invalidates system-options and enabled-models caches.
Unpriced model card UI primitive
web/default/src/features/system-settings/models/unpriced-model-card.tsx
New UnpricedModelCard renders a keyboard-accessible card with active styling, truncated model name, localized "Price not set" status, and a "Set price" edit button with propagation stop.
Unpriced models editor
web/default/src/features/system-settings/models/unpriced-models-editor.tsx
New UnpricedModelsEditor queries enabled models, parses per-model ratio fields, filters to unpriced models, provides search, and renders a desktop ModelPricingEditorPanel or mobile ModelPricingSheet with save/toast/cache-invalidation flow.
Pricing tab wiring and editor behavior updates
web/default/src/features/system-settings/models/ratio-settings-card.tsx, web/default/src/features/system-settings/billing/section-registry.tsx, web/default/src/features/system-settings/models/model-ratio-form.tsx, web/default/src/features/system-settings/models/model-ratio-visual-editor.tsx
Extends RatioTabId with 'unpriced-models', adds its label/column/render branch to RatioSettingsCard, registers it in billing section config, promotes the save button to always-visible in ModelRatioForm, and fixes visual-editor deleted-draft filtering and translated delete toast.
Localization
web/default/src/i18n/locales/en.json, web/default/src/i18n/locales/zh.json, web/default/src/i18n/locales/fr.json, web/default/src/i18n/locales/ja.json, web/default/src/i18n/locales/ru.json, web/default/src/i18n/locales/vi.json
Adds translation keys for option fetch/update error messages and model removal confirmation across six locales.

Sequence Diagram

sequenceDiagram
  actor User
  participant UnpricedModelsEditor
  participant useUpdateModelRatios
  participant OptionAPI as /api/option/
  participant EnabledModelsAPI as /api/channel/models_enabled
  participant QueryCache

  User->>UnpricedModelsEditor: opens Unpriced Models tab
  UnpricedModelsEditor->>EnabledModelsAPI: GET models_enabled
  EnabledModelsAPI-->>UnpricedModelsEditor: enabled model list
  UnpricedModelsEditor->>UnpricedModelsEditor: filter unpriced, apply search
  User->>UnpricedModelsEditor: selects model, sets price, clicks Save
  UnpricedModelsEditor->>useUpdateModelRatios: mutate(ModelRatioData)
  useUpdateModelRatios->>OptionAPI: GET /api/option/
  OptionAPI-->>useUpdateModelRatios: current options map
  useUpdateModelRatios->>useUpdateModelRatios: apply billingMode rules
  loop each changed option key
    useUpdateModelRatios->>OptionAPI: PUT /api/option/
  end
  useUpdateModelRatios->>QueryCache: invalidate system-options, enabled-models
  UnpricedModelsEditor->>User: success toast
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~65 minutes

Possibly related PRs

  • QuantumNous/new-api#5275: The main PR's ModelRatioForm change to always render the save button while routing visual-mode saves through commitOpenEditor() directly aligns with #5275's fix to ensure open visual pricing drafts are committed before the parent save runs.

Suggested reviewers

  • seefs001

🐰 A new tab has appeared, hooray!
Unpriced models lined up to play,
Set a price with a click or a space,
The mutation saves each one in place,
Now every model has its day! 🥕

🚥 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 PR title describes the main feature addition (unpriced models option) and aligns with the changeset's core purpose of adding this functionality.
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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (2)
web/default/src/features/system-settings/models/unpriced-model-card.tsx (1)

31-35: ⚡ Quick win

Use props.xxx access instead of destructuring component props.

Please align this component with the TSX guideline by taking a single props object and referencing fields directly.

Suggested refactor
-export function UnpricedModelCard({
-  modelName,
-  active = false,
-  onEdit,
-}: UnpricedModelCardProps) {
+export function UnpricedModelCard(props: UnpricedModelCardProps) {
+  const active = props.active ?? false
   const { t } = useTranslation()

   return (
@@
-        onClick={onEdit}
+        onClick={props.onEdit}
@@
-          onEdit()
+          props.onEdit()
@@
-          <h4 className='truncate text-sm font-medium'>{modelName}</h4>
+          <h4 className='truncate text-sm font-medium'>{props.modelName}</h4>
@@
-            onEdit()
+            props.onEdit()

As per coding guidelines, “Do not destructure component props; use props.xxx directly instead for clarity.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/features/system-settings/models/unpriced-model-card.tsx`
around lines 31 - 35, The UnpricedModelCard component is destructuring props
directly in the function parameters, but the coding guideline requires using a
single props object instead. Change the function signature to accept a single
props parameter of type UnpricedModelCardProps, then update all references
throughout the component body to access properties via props.modelName,
props.active, and props.onEdit instead of using the destructured variable names
directly.

Source: Coding guidelines

web/default/src/features/system-settings/models/unpriced-models-editor.tsx (1)

73-75: ⚡ Quick win

Avoid destructuring component props in this TSX component.

Please switch to a single props parameter and access props.modelRatios directly to match repository conventions.

As per coding guidelines, “Do not destructure component props; use props.xxx directly instead for clarity.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/features/system-settings/models/unpriced-models-editor.tsx`
around lines 73 - 75, The UnpricedModelsEditor component function is
destructuring the modelRatios prop directly in the function parameters, but the
repository convention requires avoiding prop destructuring. Change the function
signature to accept a single props parameter of type UnpricedModelsEditorProps
instead of destructuring, then update all references to modelRatios within the
function body to use props.modelRatios to access the property directly.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Dockerfile`:
- Around line 10-13: The find command in the RUN instruction hardcodes the path
`dist/static/js`, which causes the entire build to fail if the output directory
structure changes even when bun run build succeeds. Make the find command
non-fatal by appending `|| true` at the end of the find command (after the
`-print`), or alternatively make the search path more flexible by starting the
search from a higher directory level like `dist` with appropriate glob patterns
to accommodate potential layout variations.

In `@web/default/src/features/system-settings/models/unpriced-models-editor.tsx`:
- Around line 257-263: Add an associated label element for the search Input
field that currently only has placeholder text. Create a label element with an
htmlFor attribute that references a unique id on the Input component (you can
generate an id like "search-models" or similar). The label can be visually
hidden using appropriate CSS classes (like a visually-hidden or sr-only utility
class) so it remains accessible to screen readers while not appearing in the UI.
This ensures the Input component with the handleSearchChange handler and
searchQuery value binding has a stable, accessible field name for assistive
technologies.

In `@web/default/src/features/system-settings/models/use-update-model-ratios.ts`:
- Around line 206-213: The update loop iterates through multiple options with
individual API calls to the put endpoint, and if one request fails mid-loop,
previously persisted updates remain while later ones do not, creating an
inconsistent state. Replace the individual loop of api.put calls with either a
single batch endpoint that atomically updates all options at once, or implement
rollback semantics that reverts any successfully written keys if a subsequent
update fails during the loop iteration.
- Line 47: Import the translation function from i18next at the top of the
use-update-model-ratios.ts file by adding `import { t } from 'i18next'`. Then,
locate the hardcoded error message strings ('Failed to fetch current options'
and the similar string at line 211) and wrap them with the t() function to
enable i18n translation support. The error messages should be passed as
arguments to t() so they can be properly localized instead of remaining as raw
English literals.

In `@web/default/src/i18n/locales/en.json`:
- Around line 4298-4309: The en.json translation file contains a duplicate key
entry for "Search model name..." which causes one definition to shadow the other
at parse time, creating ambiguity. Locate and remove one of the two duplicate
"Search model name..." entries in the file, keeping only a single instance of
this key with its corresponding translation value to maintain a clean and
unambiguous translation file.

---

Nitpick comments:
In `@web/default/src/features/system-settings/models/unpriced-model-card.tsx`:
- Around line 31-35: The UnpricedModelCard component is destructuring props
directly in the function parameters, but the coding guideline requires using a
single props object instead. Change the function signature to accept a single
props parameter of type UnpricedModelCardProps, then update all references
throughout the component body to access properties via props.modelName,
props.active, and props.onEdit instead of using the destructured variable names
directly.

In `@web/default/src/features/system-settings/models/unpriced-models-editor.tsx`:
- Around line 73-75: The UnpricedModelsEditor component function is
destructuring the modelRatios prop directly in the function parameters, but the
repository convention requires avoiding prop destructuring. Change the function
signature to accept a single props parameter of type UnpricedModelsEditorProps
instead of destructuring, then update all references to modelRatios within the
function body to use props.modelRatios to access the property directly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ce11896f-5b93-4351-9f9d-6ba7b084cb4c

📥 Commits

Reviewing files that changed from the base of the PR and between 8d87d5f and 308d9c6.

📒 Files selected for processing (10)
  • Dockerfile
  • web/default/src/features/system-settings/billing/section-registry.tsx
  • web/default/src/features/system-settings/models/model-ratio-form.tsx
  • web/default/src/features/system-settings/models/model-ratio-visual-editor.tsx
  • web/default/src/features/system-settings/models/ratio-settings-card.tsx
  • web/default/src/features/system-settings/models/unpriced-model-card.tsx
  • web/default/src/features/system-settings/models/unpriced-models-editor.tsx
  • web/default/src/features/system-settings/models/use-update-model-ratios.ts
  • web/default/src/i18n/locales/en.json
  • web/default/src/i18n/locales/zh.json

Comment thread Dockerfile
Comment on lines +206 to +213
// Send all updates
for (const update of updates) {
const res = await api.put('/api/option/', update)
const response = res.data
if (!response.success) {
throw new Error(response.message || 'Failed to update option')
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Prevent partial config writes across pricing keys.

Line 207 updates each option independently; if one request fails mid-loop, persisted pricing state becomes internally inconsistent (some keys updated, some stale). This path should be atomic (single batch endpoint/transaction) or include rollback semantics for already-written keys.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/features/system-settings/models/use-update-model-ratios.ts`
around lines 206 - 213, The update loop iterates through multiple options with
individual API calls to the put endpoint, and if one request fails mid-loop,
previously persisted updates remain while later ones do not, creating an
inconsistent state. Replace the individual loop of api.put calls with either a
single batch endpoint that atomically updates all options at once, or implement
rollback semantics that reverts any successfully written keys if a subsequent
update fails during the loop iteration.

Comment thread web/default/src/i18n/locales/en.json

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/default/src/features/system-settings/models/unpriced-model-card.tsx`:
- Line 31: The function `UnpricedModelCard` is missing an explicit return type
annotation. Add a return type annotation to the function signature after the
parameters list (following the closing parenthesis). Since this is a React
component in a TSX file, use JSX.Element or React.ReactElement as the return
type to comply with the coding guidelines for web/default files that require
explicit type annotations for both parameters and return values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 08313bee-e4f5-40f2-b10f-544f95361163

📥 Commits

Reviewing files that changed from the base of the PR and between 308d9c6 and f2f7411.

📒 Files selected for processing (10)
  • privacy-filter
  • web/default/src/features/system-settings/models/unpriced-model-card.tsx
  • web/default/src/features/system-settings/models/unpriced-models-editor.tsx
  • web/default/src/features/system-settings/models/use-update-model-ratios.ts
  • web/default/src/i18n/locales/en.json
  • web/default/src/i18n/locales/fr.json
  • web/default/src/i18n/locales/ja.json
  • web/default/src/i18n/locales/ru.json
  • web/default/src/i18n/locales/vi.json
  • web/default/src/i18n/locales/zh.json
✅ Files skipped from review due to trivial changes (4)
  • privacy-filter
  • web/default/src/i18n/locales/ru.json
  • web/default/src/i18n/locales/vi.json
  • web/default/src/i18n/locales/ja.json
🚧 Files skipped from review as they are similar to previous changes (3)
  • web/default/src/features/system-settings/models/unpriced-models-editor.tsx
  • web/default/src/features/system-settings/models/use-update-model-ratios.ts
  • web/default/src/i18n/locales/zh.json

Comment thread web/default/src/features/system-settings/models/unpriced-model-card.tsx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
web/default/src/i18n/locales/en.json (1)

4345-4345: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove the duplicate Search model name... key.

This is the same duplicate entry flagged earlier; the later copy still shadows the first one at parse time.

🛠️ Suggested cleanup
-    "Search model name...": "Search model name...",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/i18n/locales/en.json` at line 4345, Remove the duplicate
entry for the key "Search model name..." from the en.json locale file. Search
for all occurrences of this key in the file and delete the later duplicate
entry, keeping only the first occurrence to prevent key shadowing at parse time.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/default/src/i18n/locales/zh.json`:
- Line 3578: The translation key "Search model name..." is declared twice in the
zh.json file with one entry shadowing the other, causing Biome linting warnings.
Find both occurrences of the "Search model name..." key in the file and remove
one of the duplicate entries, keeping only a single copy of this translation to
resolve the duplication issue.

---

Duplicate comments:
In `@web/default/src/i18n/locales/en.json`:
- Line 4345: Remove the duplicate entry for the key "Search model name..." from
the en.json locale file. Search for all occurrences of this key in the file and
delete the later duplicate entry, keeping only the first occurrence to prevent
key shadowing at parse time.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cd007c00-4991-41d6-9d0c-4c3f4ba57fe5

📥 Commits

Reviewing files that changed from the base of the PR and between f2f7411 and 3179873.

📒 Files selected for processing (6)
  • web/default/src/i18n/locales/en.json
  • web/default/src/i18n/locales/fr.json
  • web/default/src/i18n/locales/ja.json
  • web/default/src/i18n/locales/ru.json
  • web/default/src/i18n/locales/vi.json
  • web/default/src/i18n/locales/zh.json
✅ Files skipped from review due to trivial changes (3)
  • web/default/src/i18n/locales/vi.json
  • web/default/src/i18n/locales/fr.json
  • web/default/src/i18n/locales/ja.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/default/src/i18n/locales/ru.json

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

♻️ Duplicate comments (1)
web/default/src/i18n/locales/en.json (1)

4345-4345: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove the duplicate Search model name... key.

This is the same duplicate entry flagged earlier; the later copy still shadows the first one at parse time.

🛠️ Suggested cleanup
-    "Search model name...": "Search model name...",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/i18n/locales/en.json` at line 4345, Remove the duplicate
entry for the key "Search model name..." from the en.json locale file. Search
for all occurrences of this key in the file and delete the later duplicate
entry, keeping only the first occurrence to prevent key shadowing at parse time.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/default/src/i18n/locales/zh.json`:
- Line 3578: The translation key "Search model name..." is declared twice in the
zh.json file with one entry shadowing the other, causing Biome linting warnings.
Find both occurrences of the "Search model name..." key in the file and remove
one of the duplicate entries, keeping only a single copy of this translation to
resolve the duplication issue.

---

Duplicate comments:
In `@web/default/src/i18n/locales/en.json`:
- Line 4345: Remove the duplicate entry for the key "Search model name..." from
the en.json locale file. Search for all occurrences of this key in the file and
delete the later duplicate entry, keeping only the first occurrence to prevent
key shadowing at parse time.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cd007c00-4991-41d6-9d0c-4c3f4ba57fe5

📥 Commits

Reviewing files that changed from the base of the PR and between f2f7411 and 3179873.

📒 Files selected for processing (6)
  • web/default/src/i18n/locales/en.json
  • web/default/src/i18n/locales/fr.json
  • web/default/src/i18n/locales/ja.json
  • web/default/src/i18n/locales/ru.json
  • web/default/src/i18n/locales/vi.json
  • web/default/src/i18n/locales/zh.json
✅ Files skipped from review due to trivial changes (3)
  • web/default/src/i18n/locales/vi.json
  • web/default/src/i18n/locales/fr.json
  • web/default/src/i18n/locales/ja.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/default/src/i18n/locales/ru.json
🛑 Comments failed to post (1)
web/default/src/i18n/locales/zh.json (1)

3578-3578: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove the duplicate translation key.

Search model name... is already declared elsewhere in this JSON, so one entry will silently shadow the other and Biome will keep flagging the file. Keep only one copy.

🧰 Tools
🪛 Biome (2.5.0)

[error] 3578-3578: The key Search model name... was already declared.

(lint/suspicious/noDuplicateObjectKeys)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/i18n/locales/zh.json` at line 3578, The translation key
"Search model name..." is declared twice in the zh.json file with one entry
shadowing the other, causing Biome linting warnings. Find both occurrences of
the "Search model name..." key in the file and remove one of the duplicate
entries, keeping only a single copy of this translation to resolve the
duplication issue.

Source: Linters/SAST tools

@funkpopo funkpopo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solve i18n conflict.

@funkpopo
funkpopo force-pushed the new-front-model-price-fix-clean branch from 268fdc8 to c78c23e Compare June 22, 2026 09:25
funkpopo added 8 commits June 23, 2026 00:34
- Deleted Privacy Filter service and its settings from operation settings.
- Removed Privacy Filter middleware from video router.
- Updated error codes to remove references to privacy filter failures.
- Removed Privacy Filter UI components and translations from the frontend.
- Cleaned up related settings in the operations settings structure.
@funkpopo funkpopo closed this Jun 29, 2026
@funkpopo
funkpopo deleted the new-front-model-price-fix-clean branch June 29, 2026 08:39
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