feat(provider-form): consolidate codex form into advanced options section

- Fold local routing toggle, model mapping, reasoning overrides and custom
  User-Agent into a single collapsible advanced section, mirroring the
  Claude form (auto-expands when UA is set or local routing is enabled)
- Custom User-Agent becomes configurable for native Responses providers;
  it was previously reachable only when openai_chat routing was on
- Collapsed hint names local routing as the entry point for Chat
  Completions / non-GPT providers
- Backfill all missing codexConfig keys in zh-TW locale
This commit is contained in:
Jason
2026-06-10 21:32:26 +08:00
parent 596019505f
commit e776160912
5 changed files with 299 additions and 220 deletions
+3 -2
View File
@@ -1261,8 +1261,9 @@
"reasoningModeHint": "Enable when the upstream Chat Completions API supports toggling thinking on/off. Providers like Kimi, GLM and Qwen usually fall into this category.",
"reasoningEffortToggle": "Supports Reasoning Effort",
"reasoningEffortHint": "Enable when the upstream supports thinking-depth control such as low/high/max. Enabling this also turns on thinking mode and converts Codex's reasoning.effort into the upstream Chat parameter.",
"reasoningSectionToggle": "Reasoning Capability (Advanced · usually auto-detected)",
"reasoningSectionHint": "Preset providers are configured automatically; custom providers are inferred from name/URL. Expand to override manually only when auto-detection is wrong."
"reasoningGroupTitle": "Reasoning Capability",
"reasoningSectionHint": "Preset providers are configured automatically; custom providers are inferred from name/URL. Override manually only when auto-detection is wrong.",
"advancedSectionHint": "Includes local routing, model mapping, reasoning overrides and custom User-Agent. Enable local routing here when your provider uses the Chat Completions protocol or non-GPT models."
},
"geminiConfig": {
"envFile": "Environment Variables (.env)",
+3 -2
View File
@@ -1261,8 +1261,9 @@
"reasoningModeHint": "上流の Chat Completions API が思考(thinking)のオン/オフ切り替えに対応している場合に有効化します。Kimi、GLM、Qwen などが通常このタイプに該当します。",
"reasoningEffortToggle": "思考レベルに対応",
"reasoningEffortHint": "上流が low/high/max などの思考の深さの制御に対応している場合に有効化します。有効にすると思考モードも自動的にオンになり、Codex の reasoning.effort を上流の Chat パラメータに変換します。",
"reasoningSectionToggle": "思考能力(詳細・通常は自動識別)",
"reasoningSectionHint": "プリセットの供給元は自動的に設定され、カスタム供給元は名前/URL から自動推論されます。自動識別が正しくない場合のみ展開して手動で上書きしてください。"
"reasoningGroupTitle": "思考能力",
"reasoningSectionHint": "プリセットの供給元は自動的に設定され、カスタム供給元は名前/URL から自動推論されます。自動識別が正しくない場合のみ手動で上書きしてください。",
"advancedSectionHint": "ローカルルーティング、モデルマッピング、思考能力、カスタム User-Agent の設定を含みます。供給元が Chat Completions プロトコルまたは GPT 以外のモデルを使用する場合は、ここでローカルルーティングを有効にしてください。"
},
"geminiConfig": {
"envFile": "環境変数 (.env)",
+28 -1
View File
@@ -1207,7 +1207,34 @@
"modelNamePlaceholder": "例如: gpt-5-codex",
"contextWindow1M": "1M 上下文視窗",
"autoCompactLimit": "壓縮閾值",
"autoCompactLimitHint": "上下文 token 數達到此閾值時自動壓縮歷史"
"autoCompactLimitHint": "上下文 token 數達到此閾值時自動壓縮歷史",
"autoCompactLimitPlaceholder": "例如: 90000",
"localRoutingToggle": "需要本地路由映射",
"localRoutingOnHint": "Codex 目前僅原生支援 OpenAI Responses API 與 GPT 系列模型;如果您的供應商使用 Chat Completions 協定或非 GPT 模型(如 DeepSeek、Kimi),則需要打開本開關,並在使用過程中保持本地路由開啟。",
"localRoutingOffHint": "如果您的供應商不是原生 OpenAI Responses API,或者模型名不是 Codex 預設的 GPT 系列,請打開此開關。",
"modelMappingTitle": "模型映射",
"modelMappingHint": "產生 Codex model_catalog_json,讓 /model 指令顯示這些第三方模型名;表中條目按填寫內容原樣儲存。修改後需要重新啟動 Codex 才能重新整理模型清單。",
"addCatalogModel": "新增模型",
"catalogDisplayName": "顯示名稱",
"catalogModelId": "模型 ID",
"catalogColumnDisplay": "選單顯示名",
"catalogColumnModel": "實際請求模型",
"catalogColumnContext": "上下文視窗",
"catalogDisplayNamePlaceholder": "例如: DeepSeek V4 Flash",
"catalogModelPlaceholder": "例如: deepseek-v4-flash",
"contextWindow": "上下文視窗",
"contextWindowPlaceholder": "例如: 128000",
"upstreamModelName": "上游模型名稱",
"upstreamModelNameHint": "Chat 格式下這裡填寫真實上游模型;路由會把 Codex 的 Responses 請求轉換為 Chat Completions 並保持該模型。",
"modelMetadataAdvanced": "模型中繼資料進階選項",
"modelMetadataAdvancedHint": "用於未知模型的 Codex 中繼資料覆寫;清空欄位會從 config.toml 刪除對應設定。",
"reasoningModeToggle": "支援思考模式",
"reasoningModeHint": "上游 Chat Completions 介面支援開啟或關閉 thinking 時啟用。Kimi、GLM、Qwen 等通常屬於這一類。",
"reasoningEffortToggle": "支援思考等級",
"reasoningEffortHint": "上游支援 low/high/max 等思考深度控制時啟用。啟用後會自動啟用思考模式,並把 Codex 的 reasoning.effort 轉成上游 Chat 參數。",
"reasoningGroupTitle": "思考能力",
"reasoningSectionHint": "預設供應商已自動設定;自訂供應商會按名稱/位址自動推斷。僅當自動識別不準時才需手動覆寫。",
"advancedSectionHint": "包含本地路由映射、模型映射、思考能力與自訂 User-Agent。供應商使用 Chat Completions 協定或非 GPT 模型時,需在此開啟本地路由映射。"
},
"geminiConfig": {
"envFile": "環境變數 (.env)",
+3 -2
View File
@@ -1261,8 +1261,9 @@
"reasoningModeHint": "上游 Chat Completions 接口支持开启或关闭 thinking 时启用。Kimi、GLM、Qwen 等通常属于这一类。",
"reasoningEffortToggle": "支持思考等级",
"reasoningEffortHint": "上游支持 low/high/max 等思考深度控制时启用。启用后会自动启用思考模式,并把 Codex 的 reasoning.effort 转成上游 Chat 参数。",
"reasoningSectionToggle": "思考能力(高级·通常自动识别)",
"reasoningSectionHint": "预设供应商已自动配置;自定义供应商会按名称/地址自动推断。仅当自动识别不准时才需展开手动覆盖。"
"reasoningGroupTitle": "思考能力",
"reasoningSectionHint": "预设供应商已自动配置;自定义供应商会按名称/地址自动推断。仅当自动识别不准时才需手动覆盖。",
"advancedSectionHint": "包含本地路由映射、模型映射、思考能力与自定义 User-Agent。供应商使用 Chat Completions 协议或非 GPT 模型时,需在此开启本地路由映射。"
},
"geminiConfig": {
"envFile": "环境变量 (.env)",