feat(codex): decouple upstream format selector from model-mapping toggle

The Codex provider form tied Chat-format conversion and route takeover (model
mapping) to one toggle, so a provider serving a native Responses API could not
use model mapping without forcing Chat Completions conversion.

- Promote the upstream format (Chat Completions / Responses) to an independent,
  always-visible selector that triggers no sub-menus on its own.
- The local-routing toggle now solely gates the advanced sub-sections: model
  mapping catalog, plus reasoning capability when the format is Chat.
- Persist modelCatalog / codexChatReasoning based on the takeover toggle and
  derive its initial state from saved catalog presence (no new persisted field).
- Refresh codexConfig i18n (zh/en/ja/zh-TW): add upstreamFormat* keys and reword
  the routing/advanced hints to reflect the decoupling.
- Fix codexChatProviderPresets test expectation for the Doubao Seed 2.1 Pro rename.
This commit is contained in:
Jason
2026-06-24 23:35:42 +08:00
parent 213f55a6d2
commit a4eb5f3778
7 changed files with 168 additions and 67 deletions
@@ -28,7 +28,7 @@ const expectedChatPresets = new Map<
"DouBaoSeed",
{
baseUrl: "https://ark.cn-beijing.volces.com/api/v3",
contextWindows: { "doubao-seed-2-0-code-preview-latest": 256000 },
contextWindows: { "doubao-seed-2-1-pro": 256000 },
},
],
[