fix: update model version references in settings and tests#1022
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (6)
📝 WalkthroughWalkthrough此更新统一调整了多语言本地化字符串和测试配置中的模型标识示例(如 Claude Sonnet 4.5→4.6、GPT 5.2→5.3、GLM 4.6→5.1),并更新了 routing.codexOverrides.reasoningEffort 的兼容性说明。 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review Summary
This PR updates model version references across 18 i18n files, 1 source file, and 1 test file. The changes are mechanical string replacements bumping model names to newer versions (e.g., claude-sonnet-4.5 to 4.6, gpt-5.1-codex to gpt-5.3-codex). One minor inconsistency was found in the zh-CN locale.
PR Size: L
- Lines changed: 124 (62 additions + 62 deletions)
- Files changed: 20
- Note: The L classification is driven by file count across 5 i18n locales. The actual change scope is small — no split is warranted.
Issues Found
| Category | Critical | High | Medium | Low |
|---|---|---|---|---|
| Logic/Bugs | 0 | 0 | 0 | 0 |
| Security | 0 | 0 | 0 | 0 |
| Error Handling | 0 | 0 | 0 | 0 |
| Types | 0 | 0 | 0 | 0 |
| Comments/Docs | 0 | 0 | 0 | 1 |
| Tests | 0 | 0 | 0 | 0 |
| Simplification | 0 | 0 | 0 | 0 |
High Priority Issues (Should Fix)
None.
Low Priority Issues
messages/zh-CN/settings/providers/form/strings.json:23—modelRedirectsDescusesclaude-sonnet-4-6(hyphen) while all other locales and zh-CN files useclaude-sonnet-4.6(dot). This inconsistency was introduced by this PR (the old value used dot notation). See inline comment for suggested fix.
Review Coverage
- Logic and correctness - Clean
- Security (OWASP Top 10) - Clean
- Error handling - Clean
- Type safety - Clean
- Documentation accuracy - 1 inconsistency (see above)
- Test coverage - Test updated to match production code
- Code clarity - Good
Automated review by Claude AI
| "limitAmountMonthly": "月消费上限 (USD)", | ||
| "modelRedirects": "模型重定向", | ||
| "modelRedirectsDesc": "将 Claude Code 客户端请求的模型(如 claude-sonnet-4.5)重定向到上游供应商实际支持的模型(如 glm-4.6、gemini-pro)。用于成本优化或接入第三方 AI 服务。", | ||
| "modelRedirectsDesc": "将 Claude Code 客户端请求的模型(如 claude-sonnet-4-6)重定向到上游供应商实际支持的模型(如 glm-5.1、gemini-pro)。用于成本优化或接入第三方 AI 服务。", |
There was a problem hiding this comment.
[Low] [STANDARD-VIOLATION] Inconsistent model name format — uses hyphen (claude-sonnet-4-6) instead of dot (claude-sonnet-4.6)
Why this is a problem: Every other locale (en, ja, ru, zh-TW) and even the zh-CN modelRedirect.json and providers-i18n-additions.json files use claude-sonnet-4.6 (dot notation) in description text. This file alone uses claude-sonnet-4-6 (hyphen notation). The old value was claude-sonnet-4.5 (dot), so this inconsistency was introduced by this PR.
Suggested fix:
"modelRedirectsDesc": "将 Claude Code 客户端请求的模型(如 claude-sonnet-4.6)重定向到上游供应商实际支持的模型(如 glm-5.1、gemini-pro)。用于成本优化或接入第三方 AI 服务。"There was a problem hiding this comment.
Pull request overview
Updates model/version references used by provider API testing and the Settings UI (including i18n strings) to reflect newer default model IDs and examples.
Changes:
- Bump default Codex model references from
gpt-5.1-codex/gpt-5.2-codextogpt-5.3-codexin provider API tests and related UI/test fixtures. - Update Anthropic Messages API test defaults (
defaultModel,userAgent) and refresh model redirect examples/placeholders across locales. - Revise provider settings help text for reasoning-effort options across multiple languages.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/settings/providers/api-test-button.test.tsx | Updates mocked preset default model used in unit tests. |
| src/actions/providers.ts | Updates default models for provider connectivity tests and Anthropic UA. |
| messages/zh-TW/settings/providers/form/sections.json | Updates reasoning-effort help/options text (zh-TW). |
| messages/zh-TW/settings/providers/form/modelRedirect.json | Updates model redirect description/placeholders (zh-TW). |
| messages/zh-TW/settings/prices.json | Updates price form placeholders to gpt-5.3-codex (zh-TW). |
| messages/zh-CN/settings/providers/form/strings.json | Updates model redirect strings and placeholders (zh-CN). |
| messages/zh-CN/settings/providers/form/sections.json | Updates reasoning-effort help/options text (zh-CN). |
| messages/zh-CN/settings/providers/form/modelRedirect.json | Updates model redirect placeholders/description (zh-CN). |
| messages/zh-CN/settings/prices.json | Updates price form placeholders to gpt-5.3-codex (zh-CN). |
| messages/ru/settings/providers/form/sections.json | Updates reasoning-effort help/options text (ru). |
| messages/ru/settings/providers/form/modelRedirect.json | Updates model redirect description/placeholders (ru). |
| messages/ru/settings/prices.json | Updates price form placeholders to gpt-5.3-codex (ru). |
| messages/providers-i18n-additions.json | Updates provider form i18n additions (zh-CN + en), including examples/placeholders. |
| messages/ja/settings/providers/form/sections.json | Updates reasoning-effort help/options text (ja). |
| messages/ja/settings/providers/form/modelRedirect.json | Updates model redirect description/placeholders (ja). |
| messages/ja/settings/prices.json | Updates price form placeholders to gpt-5.3-codex (ja). |
| messages/en/settings/providers/form/strings.json | Updates provider form strings (en), including model redirect examples/placeholders. |
| messages/en/settings/providers/form/sections.json | Updates reasoning-effort help/options text (en). |
| messages/en/settings/providers/form/modelRedirect.json | Updates model redirect description/placeholders (en). |
| messages/en/settings/prices.json | Updates price form placeholders to gpt-5.3-codex (en). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| path: "/v1/messages", | ||
| defaultModel: "claude-sonnet-4-5-20250929", | ||
| defaultModel: "claude-sonnet-4-6", | ||
| headers: (apiKey, context) => resolveAnthropicAuthHeaders(apiKey, context.providerUrl), |
There was a problem hiding this comment.
testProviderAnthropicMessages now falls back to defaultModel: "claude-sonnet-4-6", but the UI defaults (ApiTestButton) and other probe presets in the repo use date-suffixed Anthropic model IDs (e.g. claude-haiku-4-5-20251001, claude-sonnet-4-5-20250929). This mismatch can make the API test behave unexpectedly when the user clears the model field, and may fail against upstreams that require the full dated model ID. Consider reusing the same default model constant as the UI/presets (or switching this fallback back to a known dated ID) so all entry points are consistent.
| "deleteRule": "刪除規則", | ||
| "ruleMoved": "規則在編輯期間已變更,請再試一次", | ||
| "description": "將 Claude Code 客戶端請求的模型(如 claude-sonnet-4.5)重新導向到上游供應商實際支援的模型(如 glm-4.6、gemini-pro)。用於成本最佳化或接入第三方 AI 服務。", | ||
| "description": "將 Claude Code 客戶端請求的模型(如 claude-sonnet-4.6)重新導向到上游供應商實際支援的模型(如 glm-5.1、gemini-pro)。用於成本最佳化或接入第三方 AI 服務。", |
There was a problem hiding this comment.
描述中的模型示例使用「claude-sonnet-4.6」,但 sourcePlaceholder 使用「claude-sonnet-4-6」。兩者格式不一致,使用者照示例複製時可能導致規則無法命中。建議統一為同一種模型 ID 格式。
There was a problem hiding this comment.
Code Review
This pull request updates model version references and examples across various localization files and source code, transitioning from older versions like Claude 4.5 and GPT 5.2 to newer ones such as Claude 4.6 and GPT 5.3/5.4. It also updates the user agent string in provider actions and refines reasoning effort descriptions. Feedback was provided regarding a consistency issue in the Simplified Chinese translation where a dash was used instead of a dot for a model version.
| "limitAmountMonthly": "月消费上限 (USD)", | ||
| "modelRedirects": "模型重定向", | ||
| "modelRedirectsDesc": "将 Claude Code 客户端请求的模型(如 claude-sonnet-4.5)重定向到上游供应商实际支持的模型(如 glm-4.6、gemini-pro)。用于成本优化或接入第三方 AI 服务。", | ||
| "modelRedirectsDesc": "将 Claude Code 客户端请求的模型(如 claude-sonnet-4-6)重定向到上游供应商实际支持的模型(如 glm-5.1、gemini-pro)。用于成本优化或接入第三方 AI 服务。", |
There was a problem hiding this comment.
Dash vs. dot inconsistency in zh-CN description
modelRedirectsDesc was changed to claude-sonnet-4-6 (hyphen-separated), while every other locale's equivalent description string — including the sibling messages/zh-CN/settings/providers/form/modelRedirect.json (line 31) — uses the dot-notation claude-sonnet-4.6. This creates an intra-locale inconsistency where the two zh-CN files describing the same feature use different formatting for the same model name.
| "modelRedirectsDesc": "将 Claude Code 客户端请求的模型(如 claude-sonnet-4-6)重定向到上游供应商实际支持的模型(如 glm-5.1、gemini-pro)。用于成本优化或接入第三方 AI 服务。", | |
| "modelRedirectsDesc": "将 Claude Code 客户端请求的模型(如 claude-sonnet-4.6)重定向到上游供应商实际支持的模型(如 glm-5.1、gemini-pro)。用于成本优化或接入第三方 AI 服务。", |
Prompt To Fix With AI
This is a comment left during a code review.
Path: messages/zh-CN/settings/providers/form/strings.json
Line: 23
Comment:
**Dash vs. dot inconsistency in zh-CN description**
`modelRedirectsDesc` was changed to `claude-sonnet-4-6` (hyphen-separated), while every other locale's equivalent description string — including the sibling `messages/zh-CN/settings/providers/form/modelRedirect.json` (line 31) — uses the dot-notation `claude-sonnet-4.6`. This creates an intra-locale inconsistency where the two zh-CN files describing the same feature use different formatting for the same model name.
```suggestion
"modelRedirectsDesc": "将 Claude Code 客户端请求的模型(如 claude-sonnet-4.6)重定向到上游供应商实际支持的模型(如 glm-5.1、gemini-pro)。用于成本优化或接入第三方 AI 服务。",
```
How can I resolve this? If you propose a fix, please make it concise.Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ding <44717411+ding113@users.noreply.github.com>
Summary
Update outdated model version references across i18n placeholder strings, provider API test defaults, and test fixtures to reflect current model versions.
Problem
Example model names used in UI placeholders and API test defaults referenced older model versions (e.g.
claude-sonnet-4-5-20250929,gpt-5.1-codex,glm-4.6), making them inaccurate for current users and potentially confusing during provider setup.Solution
Bulk update all model version references to current versions across all 5 supported languages and provider test code. No functional logic changes.
Changes
i18n Placeholder Updates (all 5 languages: en, ja, ru, zh-CN, zh-TW)
gpt-5.2-codex/GPT-5.2 Codex->gpt-5.3-codex/GPT-5.3 Codexclaude-sonnet-4.5->claude-sonnet-4.6claude-sonnet-4-5-20250929->claude-sonnet-4-6glm-4.6->glm-5.1gpt-5-turbo->gpt-5.4-proxhighis no longer model-restrictedProvider API Test Defaults (
src/actions/providers.ts)claude-sonnet-4-5-20250929->claude-sonnet-4-6claude-cli/2.0.50->claude-cli/2.1.76gpt-5.1-codex->gpt-5.3-codexgpt-5.1-codex->gpt-5.3-codexTest Fixture Update
api-test-button.test.tsx: updated test fixturedefaultModeltogpt-5.3-codexTesting
Automated Tests
Manual Testing
No manual testing required -- changes are limited to placeholder strings and test default values with no behavioral impact.
Checklist
Description enhanced by Claude AI
Greptile Summary
This PR bulk-updates stale model version references across i18n placeholder strings (all 5 locales), provider API test defaults, and the
reasoningEfforthelp text. The changes are documentation/UI-only with no functional logic impact.strings.jsonfiles forja,ru, andzh-TWwere skipped — each still holds the oldclaude-sonnet-4-5-20250929,glm-4.6, andgpt-5-turboplaceholder values, creating visible inconsistencies with themodelRedirect.jsonfiles that were updated for these same locales.api-test-button.test.tsxwas updated togpt-5.3-codex, but the file is unchanged and still readsgpt-5.1-codex; the test passes because the mock is asserted to not be called, but the stated change was not committed.Confidence Score: 4/5
Do not merge until the missing strings.json updates for ja, ru, and zh-TW are added; the test fixture omission is minor but the PR description is misleading.
One real P1 finding: three locale strings.json files were skipped, leaving users in ja, ru, and zh-TW with inconsistent placeholder text between two UI panels for the same feature. The test fixture discrepancy is P2 (no runtime impact) but undermines the PR's stated completeness. All other changes are correct and internally consistent.
messages/ja/settings/providers/form/strings.json, messages/ru/settings/providers/form/strings.json, messages/zh-TW/settings/providers/form/strings.json — all require the same model-name placeholder updates applied to en and zh-CN.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[PR: Model version reference update] --> B[i18n placeholder strings] A --> C[Provider API test defaults] A --> D[reasoningEffort help text] B --> B1[prices.json ✅ all 5 locales updated] B --> B2[modelRedirect.json ✅ all 5 locales updated] B --> B3[strings.json ⚠️ only en + zh-CN updated ❌ ja / ru / zh-TW skipped] C --> C1[Anthropic Messages claude-sonnet-4-5-20250929 → claude-sonnet-4-6 ✅] C --> C2[OpenAI Chat + Responses gpt-5.1-codex → gpt-5.3-codex ✅] C --> C3[api-test-button.test.tsx fixture gpt-5.1-codex — NOT updated ⚠️ PR description incorrect] D --> D1[en / ja / ru / zh-CN / zh-TW sections.json GPT-5.1 → GPT-5.4 mini xhigh restriction removed ✅ all 5 locales updated]Comments Outside Diff (3)
messages/ja/settings/providers/form/strings.json, line 70-73 (link)strings.jsonfilesThree locale
strings.jsonfiles were not updated alongside theirmodelRedirect.jsoncounterparts, leaving them with old model version placeholders. ThemodelRedirectsSourcePlaceholder(line 70) andmodelRedirectsTargetPlaceholder(line 73) still referenceclaude-sonnet-4-5-20250929andglm-4.6respectively.The same fields are stale in
messages/ru/settings/providers/form/strings.jsonandmessages/zh-TW/settings/providers/form/strings.json. The correspondingmodelRedirect.jsonfiles for all three locales were correctly updated toclaude-sonnet-4-6/glm-5.1in this PR.Prompt To Fix With AI
messages/en/settings/providers/form/strings.json, line 168 (link)sourceModelPlaceholdernot updated in en but was updated in zh-CNThe
modelRedirectsSourcePlaceholderat line 70 of this file was correctly updated toclaude-sonnet-4-6, but the sibling fieldsourceModelPlaceholderhere (line 168) still readse.g. claude-sonnet-4-5-20250929. The zh-CN counterpart (messages/zh-CN/settings/providers/form/strings.jsonline 25) was updated in this PR. If both fields describe the same concept, this one was missed.Prompt To Fix With AI
messages/ja/settings/providers/form/strings.json, line 70-85 (link)The
strings.jsonfiles forja,ru, andzh-TWwere not included in this PR despite each of these locales having parallel entries that reference the old model names. The old values remain in all three files:modelRedirectsSourcePlaceholderclaude-sonnet-4-5-20250929claude-sonnet-4-6modelRedirectsTargetPlaceholderglm-4.6glm-5.1modelWhitelistManualPlaceholdergpt-5-turbogpt-5.4-prosourceModelPlaceholderclaude-sonnet-4-5-20250929claude-sonnet-4-6targetModelPlaceholderglm-4.6glm-5.1Users in the
ja,ru, andzh-TWlocales will see inconsistent placeholders — themodelRedirectpanel shows updated model names while thestrings-keyed UI sections still display the old ones. The same pattern appears inmessages/ru/settings/providers/form/strings.json(lines 70, 73, 85, 168, 174) andmessages/zh-TW/settings/providers/form/strings.json(lines 70, 73, 85, 168, 174).Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (2): Last reviewed commit: "Apply suggestions from code review" | Re-trigger Greptile