From 32bf3d0f33c39e2ca8a9ca5816daccf620dc3e92 Mon Sep 17 00:00:00 2001 From: TT <92159997+ssharkkky@users.noreply.github.com> Date: Sat, 5 Sep 2026 23:17:34 +0800 Subject: [PATCH] fix(settings): describe Grok cross-client mapping default as enabled The Grok cross-client model mapping is enabled by default: InitializeDefaultSettings writes "true", and the parser treats a missing/empty value as enabled ("Default true (missing/empty -> enabled)"). However the comment above the defaults and the admin settings UI hint (EN and ZH) both claimed "disabled by default", contradicting the actual behavior. Align the comment and both UI hints with the real default. No behavior change. --- backend/internal/service/setting_parse.go | 3 ++- frontend/src/i18n/locales/en/admin/settings.ts | 2 +- frontend/src/i18n/locales/zh/admin/settings.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/internal/service/setting_parse.go b/backend/internal/service/setting_parse.go index 36e7706dda..ade4de0d41 100644 --- a/backend/internal/service/setting_parse.go +++ b/backend/internal/service/setting_parse.go @@ -192,7 +192,8 @@ func (s *SettingService) InitializeDefaultSettings(ctx context.Context) error { SettingKeyChannelMonitorHideThroughput: "true", SettingKeyChannelMonitorShowQuota: "false", - // Grok: safe defaults — no cross-vendor model rewrite unless operators enable it. + // Grok compatibility defaults: cross-client mapping stays enabled unless + // operators explicitly disable it. SettingKeyGrokDefaultTextModel: "grok-4.6", SettingKeyGrokCrossClientModelMapEnabled: "true", SettingKeyGrokDefaultBaseURLMode: GrokDefaultBaseURLModeCLI, diff --git a/frontend/src/i18n/locales/en/admin/settings.ts b/frontend/src/i18n/locales/en/admin/settings.ts index a40e9f962b..0c1318e8ce 100644 --- a/frontend/src/i18n/locales/en/admin/settings.ts +++ b/frontend/src/i18n/locales/en/admin/settings.ts @@ -465,7 +465,7 @@ export default { grokDefaultTextModel: 'Default Grok text model', grokDefaultTextModelHint: 'Used for empty model values and, only when the switch is enabled, requests from other client model namespaces. Custom Grok model IDs are accepted.', grokCrossClientMap: 'Map other clients to Grok', - grokCrossClientMapHint: 'Disabled by default. When enabled, GPT, Codex, o-series, and Claude model IDs are routed to the default Grok text model above.', + grokCrossClientMapHint: 'Enabled by default for client compatibility. GPT, Codex, o-series, and Claude model IDs are routed to the default Grok text model above. Disable this to require Grok model IDs.', grokDefaultBaseURLMode: 'Default Grok upstream', grokDefaultBaseURLModeHint: 'Used only when a Grok account has no explicit base URL. Media and voice endpoints continue to use their official API hosts.', grokBaseURLModeCLI: 'CLI chat proxy', diff --git a/frontend/src/i18n/locales/zh/admin/settings.ts b/frontend/src/i18n/locales/zh/admin/settings.ts index 78a76ff310..47f95d2afc 100644 --- a/frontend/src/i18n/locales/zh/admin/settings.ts +++ b/frontend/src/i18n/locales/zh/admin/settings.ts @@ -458,7 +458,7 @@ export default { grokDefaultTextModel: '默认 Grok 文本模型', grokDefaultTextModelHint: '用于空模型值;仅在右侧开关开启时也用于其他客户端模型命名空间。允许填写自定义 Grok 模型 ID。', grokCrossClientMap: '映射其他客户端模型到 Grok', - grokCrossClientMapHint: '默认关闭。开启后,GPT、Codex、o 系列和 Claude 模型 ID 会路由到左侧默认 Grok 文本模型。', + grokCrossClientMapHint: '为兼容客户端,默认开启。GPT、Codex、o 系列和 Claude 模型 ID 会路由到左侧默认 Grok 文本模型;关闭后必须使用 Grok 模型 ID。', grokDefaultBaseURLMode: '默认 Grok 上游', grokDefaultBaseURLModeHint: '仅用于 Grok 账号未配置显式 base URL 的文本请求;媒体和语音仍使用官方 API 主机。', grokBaseURLModeCLI: 'CLI 聊天代理',