Skip to content

fix(i18n): clarify thinking adapter copy - #5242

Merged
seefs001 merged 1 commit into
mainfrom
fix/thinking-adapter-i18n
Jun 5, 2026
Merged

seefs001 merged 1 commit into
mainfrom
fix/thinking-adapter-i18n

Conversation

@QuentinHsu

@QuentinHsu QuentinHsu commented Jun 2, 2026 •

Copy link
Copy Markdown
Collaborator
  • update the global thinking blacklist label to describe skipped suffix processing instead of disabled model thinking.
  • rename Claude and Gemini adapter labels to thinking suffix adapter and sync all default locales.
  • revise Claude helper text to clarify suffix request adaptation while keeping billing predictable.

⚠️ 提交说明 / PR Notice

Important

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

📝 变更描述 / Description

(简述:做了什么?为什么这样改能生效?请基于你对代码逻辑的理解来写,避免粘贴未经整理的内容)

问题描述

  • 模型设置中的 thinking adapter 相关中文文案容易被理解为禁用模型思考能力,而实际配置控制的是 -thinking / -nothinking 后缀自动处理。
  • Claude 说明文案容易被理解为转换模型类型,而实际是将带 -thinking 后缀的请求适配为 Anthropic 原生思考请求行为。

修复方式

  • 将 default 主题中的全局 thinking 黑名单标签改为“跳过思考后缀处理”的语义。
  • 将 Claude 和 Gemini 的 Thinking Adapter source key 改为 Thinking Suffix Adapter,中文翻译为“思考后缀适配器”。
  • 更新 Claude 说明文案,并同步 en、zh、fr、ja、ru、vi 六个 locale。
  • 同步调整 classic 主题对应 label 为“不自动处理思考后缀的模型列表”。

测试说明

  • 已运行 bun run i18n:sync,所有 locale 的 missing、extras、untranslated 计数均为 0。
  • bun run build:check 失败在既有的 usage-logs-mobile-card.tsx 类型错误,和本次文案改动无关。

🚀 变更类型 / Type of change

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

🔗 关联任务 / Related Issue

✅ 提交前检查项 / Checklist

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

📸 运行证明 / Proof of Work

(请在此粘贴截图、关键日志或测试报告,以证明变更生效)
CleanShot 2026-06-02 at 13 00 17

Summary by CodeRabbit

  • Documentation
    • Refined terminology and clarified descriptions for thinking suffix adapter settings across model-specific and global configurations
    • Updated translations across English, French, Japanese, Russian, Vietnamese, and Chinese language locales
    • Improved labeling for model configuration options related to thinking suffix processing

- update the global thinking blacklist label to describe skipped suffix processing instead of disabled model thinking.
- rename Claude and Gemini adapter labels to thinking suffix adapter and sync all default locales.
- revise Claude helper text to clarify suffix request adaptation while keeping billing predictable.
@coderabbitai

coderabbitai Bot commented Jun 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR updates UI labels and i18n translations across both classic and default web interfaces to clarify Anthropic thinking suffix adapter terminology. Labels change from "Thinking Adapter" to "Thinking Suffix Adapter", and blacklist descriptions are rephrased to emphasize -thinking suffix handling rather than capability disablement. Translations are updated across six languages consistently.

Changes

Thinking Suffix Adapter Terminology Alignment

Layer / File(s) Summary
UI component label updates
web/classic/src/pages/Setting/Model/SettingGlobalModel.jsx, web/default/src/features/system-settings/models/claude-settings-card.tsx, web/default/src/features/system-settings/models/gemini-settings-card.tsx, web/default/src/features/system-settings/models/global-settings-card.tsx
Form labels and descriptions in global and model-specific settings cards rename "Thinking Adapter" to "Thinking Suffix Adapter" and revise blacklist descriptions to clarify suffix handling behavior instead of capability disablement.
Multilingual i18n translation updates
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
All language locales are updated to align with new UI terminology: new descriptions explain -thinking suffix adaptation behavior, "Thinking Adapter" becomes "Thinking Suffix Adapter", blacklist descriptions replace "Disable" phrasing with "skip thinking suffix processing", and older/superseded translation keys are removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • #5194: This PR implements the exact terminology clarifications requested in the issue—renaming misleading Chinese labels like "禁用思考处理的模型列表" to "不自动处理思考后缀的模型列表" and updating "Thinking Adapter" phrasing across UI and all supported languages.

Possibly related PRs

  • QuantumNous/new-api#2189: The referenced PR implements the ShouldPreserveThinkingSuffix logic that controls when the -thinking suffix is stripped; this PR updates the UI labels and descriptions that explain this same suffix-handling behavior to users.

Suggested reviewers

  • Calcium-Ion
  • seefs001

Poem

🐰 With whiskers twitching bright,
We clarify the thinking adapter's light,
From shadows of misleading phrasing freed,
"Suffix" and "skip" now plant the clearer seed,
Across six languages, our message rings true—
Hopping toward clarity, for me and for you! 🌟

🚥 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 'fix(i18n): clarify thinking adapter copy' accurately describes the main purpose of the changeset: updating UI labels and translations to clarify terminology around thinking adapter functionality.
Linked Issues check ✅ Passed All coding requirements from issue #5194 are met: global blacklist label changed to reflect suffix skipping behavior, 'Thinking Adapter' renamed to 'Thinking Suffix Adapter', Claude helper text clarified, and all changes applied consistently across web/default, web/classic, and all locales (en, zh, fr, ja, ru, vi).
Out of Scope Changes check ✅ Passed All changes are in scope and directly address the linked issue #5194: UI label updates, terminology clarification, and translation synchronization across components and locale files.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/thinking-adapter-i18n

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.

@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: 2

🤖 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/fr.json`:
- Line 2392: Update the French translations to keep the literal suffixes
"-thinking" and "-nothinking" visible instead of translating them as the generic
word "thinking"; specifically change the value for the key "Models that skip
thinking suffix processing" and the other affected entry (line ~3930) so they
reference the exact suffixes (e.g., "Modèles qui n’appliquent pas
automatiquement les suffixes -thinking/-nothinking") or similar wording that
preserves the literal suffix tokens.

In `@web/default/src/i18n/locales/ru.json`:
- Line 2392: The Russian translation for the key "Models that skip thinking
suffix processing" removed the literal hyphenated suffix notation; update the
value to preserve and display the exact suffixes (e.g., "-thinking" /
"-nothinking") in the Russian label so it reads as an explicit suffix handling
note (also apply the same fix to the other occurrence of this label around the
later duplicate at the other key). Ensure the translated sentence includes the
hyphen-prefixed tokens exactly as `-thinking` and `-nothinking` to match the
source intent.
🪄 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: d24b9bcd-130d-441a-b2ca-b29d7308d41b

📥 Commits

Reviewing files that changed from the base of the PR and between 0ff9c35 and 2c52b8b.

📒 Files selected for processing (10)
  • web/classic/src/pages/Setting/Model/SettingGlobalModel.jsx
  • web/default/src/features/system-settings/models/claude-settings-card.tsx
  • web/default/src/features/system-settings/models/gemini-settings-card.tsx
  • web/default/src/features/system-settings/models/global-settings-card.tsx
  • 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

"Models losing the most positions": "Modèles qui perdent le plus de places",
"Models not in list, may fail to invoke": "Modèles non listés, peut échouer lors de l'invocation",
"Models that are being used but not configured in the system": "Modèles utilisés mais non configurés dans le système",
"Models that skip thinking suffix processing": "Modèles qui ignorent le traitement des suffixes thinking",

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 | 🟡 Minor | ⚡ Quick win

Keep the literal suffixes in the French labels.

Line 2392 and Line 3930 reintroduce ambiguity by translating the feature as generic thinking instead of naming the actual -thinking / -nothinking suffix handling. That weakens the clarification this PR is meant to ship. Consider wording that keeps the literal suffixes visible, e.g. Adaptateur de suffixes -thinking/-nothinking and Modèles qui n’appliquent pas automatiquement les suffixes -thinking/-nothinking.

Also applies to: 3930-3930

🤖 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/fr.json` at line 2392, Update the French
translations to keep the literal suffixes "-thinking" and "-nothinking" visible
instead of translating them as the generic word "thinking"; specifically change
the value for the key "Models that skip thinking suffix processing" and the
other affected entry (line ~3930) so they reference the exact suffixes (e.g.,
"Modèles qui n’appliquent pas automatiquement les suffixes
-thinking/-nothinking") or similar wording that preserves the literal suffix
tokens.

"Models losing the most positions": "Модели, потерявшие больше всего позиций",
"Models not in list, may fail to invoke": "Модели не в списке, вызов может не сработать",
"Models that are being used but not configured in the system": "Модели, которые используются, но не настроены в системе",
"Models that skip thinking suffix processing": "Модели, пропускающие обработку суффиксов thinking",

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 | 🟡 Minor | ⚡ Quick win

Keep the literal suffix notation in these Russian labels.

Both translations drop the hyphenated suffix wording from the source, so the UI reads like generic “thinking” behavior again instead of explicit -thinking / -nothinking suffix handling. That weakens the clarification this PR is trying to make.

Suggested wording
-    "Models that skip thinking suffix processing": "Модели, пропускающие обработку суффиксов thinking",
+    "Models that skip thinking suffix processing": "Модели, для которых пропускается обработка суффиксов `-thinking` / `-nothinking`",

-    "Thinking Suffix Adapter": "Адаптер суффикса thinking",
+    "Thinking Suffix Adapter": "Адаптер суффиксов `-thinking`"

Also applies to: 3930-3930

🤖 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/ru.json` at line 2392, The Russian translation
for the key "Models that skip thinking suffix processing" removed the literal
hyphenated suffix notation; update the value to preserve and display the exact
suffixes (e.g., "-thinking" / "-nothinking") in the Russian label so it reads as
an explicit suffix handling note (also apply the same fix to the other
occurrence of this label around the later duplicate at the other key). Ensure
the translated sentence includes the hyphen-prefixed tokens exactly as
`-thinking` and `-nothinking` to match the source intent.

@seefs001
seefs001 merged commit 189913b into main Jun 5, 2026
1 check passed
Soein added a commit to Soein/new-api that referenced this pull request Jun 6, 2026
… id 等)

主要变更(QuantumNous/new-api → adc390c):
- feat: 渠道被禁用后可配置是否清空渠道粘性 (QuantumNous#5306)
- feat(web): profile 页显示 user id (QuantumNous#5317)
- fix: 复用 channel handler 的 stream scanner buffer (QuantumNous#5225)
- fix: 收窄 OpenAI o 系列模型适配范围 (QuantumNous#5293)
- fix(relay): GLM Anthropic 兼容避免 chunked encoding (QuantumNous#5307)
- fix: 新增 relay idle 连接超时配置 (QuantumNous#5309)
- fix: 限制匿名请求体大小 (QuantumNous#5244)
- fix(distributor): 修复 video generations task_id 模型解析 (QuantumNous#5133)
- fix(dify): 远程图片字段赋值前初始化 file pointer (QuantumNous#5134)
- fix(i18n): 优化 thinking adapter 文案 (QuantumNous#5242)

去合规一致性:上游未触及任何合规文件,合并完整保留本地去合规状态
(payment_setting.go / payment-settings-section.tsx / recharge-form-card.tsx /
risk-acknowledgement-dialog.tsx 均未被改动)。

i18n:web/default 6 语言(en/zh/fr/ja/ru/vi)key 并集三路合并 + i18n:sync
规范化,4584 keys/语言,missing/extras/untranslated 全为 0。

验证:go build ./... ✅ + bun run typecheck ✅
szxufan pushed a commit to szxufan/new-api that referenced this pull request Jun 9, 2026
Cherry-picked from main branch with conflict resolution:
- Updated "Thinking Adapter" to "Thinking Suffix Adapter"
- Updated "Disable thinking processing models" to "Models that skip thinking suffix processing"
- Improved description text for better clarity
- Resolved conflicts by keeping dev branch layout while applying new i18n keys
52assert added a commit to 52assert/new-api that referenced this pull request Jun 10, 2026
…codes

* origin/main: (45 commits)
  fix(openai): support streaming image relay and image edit for images API  (QuantumNous#4608)
  perf(web): improve dialog sizing and footer layout
  feat(web): add shared dialog wrapper
  perf(web): simplify public page hero copy
  perf(model-pricing): move pricing tabs into page title
  feat(json-editor): add reusable JSON code editor
  perf(model-pricing): improve JSON pricing editor layout
  perf(model-pricing): reduce duplicate model name display
  fix: support six-decimal steps in model pricing editor
  fix: respect theme for multiselect combobox popover
  fix: reuse stream scanner buffer in channel handlers (QuantumNous#5225)
  fix: 收窄 OpenAI o 系列模型适配范围 (QuantumNous#5293)
  fix(i18n): clarify thinking adapter copy (QuantumNous#5242)
  fix: limit anonymous request body (QuantumNous#5244)
  fix(relay): fix Anthropic-compatible compatibility for GLM (avoid chunked encoding) (QuantumNous#5307)
  feat: 支持配置渠道被禁用后是否清空渠道粘性 (QuantumNous#5306)
  fix: add relay idle connection timeout config (QuantumNous#5309)
  feat(web): show user id on profile page
  perf(model-pricing): refine visual editor actions
  refactor(model-pricing): split visual pricing editor modules
  ...

# Conflicts:
#	router/api-router.go
#	web/default/src/features/usage-logs/components/usage-logs-mobile-card.tsx
@Calcium-Ion
Calcium-Ion deleted the fix/thinking-adapter-i18n branch June 13, 2026 08:34
OuYang-HX pushed a commit to OuYang-HX/new-api that referenced this pull request Jun 13, 2026
- update the global thinking blacklist label to describe skipped suffix processing instead of disabled model thinking.
- rename Claude and Gemini adapter labels to thinking suffix adapter and sync all default locales.
- revise Claude helper text to clarify suffix request adaptation while keeping billing predictable.
ruanhangjian pushed a commit to ruanhangjian/new-api that referenced this pull request Jul 11, 2026
- update the global thinking blacklist label to describe skipped suffix processing instead of disabled model thinking.
- rename Claude and Gemini adapter labels to thinking suffix adapter and sync all default locales.
- revise Claude helper text to clarify suffix request adaptation while keeping billing predictable.
zhaodechao2008 pushed a commit to zhaodechao2008/new-api that referenced this pull request Jul 27, 2026
- update the global thinking blacklist label to describe skipped suffix processing instead of disabled model thinking.
- rename Claude and Gemini adapter labels to thinking suffix adapter and sync all default locales.
- revise Claude helper text to clarify suffix request adaptation while keeping billing predictable.
330079598 pushed a commit to 330079598/new-api that referenced this pull request Aug 19, 2026
- update the global thinking blacklist label to describe skipped suffix processing instead of disabled model thinking.
- rename Claude and Gemini adapter labels to thinking suffix adapter and sync all default locales.
- revise Claude helper text to clarify suffix request adaptation while keeping billing predictable.
salem-2007 added a commit to salem-2007/new-api that referenced this pull request Sep 10, 2026
- update the global thinking blacklist label to describe skipped suffix processing instead of disabled model thinking.
- rename Claude and Gemini adapter labels to thinking suffix adapter and sync all default locales.
- revise Claude helper text to clarify suffix request adaptation while keeping billing predictable.
junjundesk pushed a commit to junjundesk/new-api that referenced this pull request Oct 3, 2026
- update the global thinking blacklist label to describe skipped suffix processing instead of disabled model thinking.
- rename Claude and Gemini adapter labels to thinking suffix adapter and sync all default locales.
- revise Claude helper text to clarify suffix request adaptation while keeping billing predictable.
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.

i18n: 模型设置中 thinking adapter 相关中文文案容易误导

2 participants