From 4ae341756ebf1b0ab74b1085355768352cbab120 Mon Sep 17 00:00:00 2001 From: Seefs <40468931+seefs001@users.noreply.github.com> Date: Sat, 4 Jul 2026 19:50:15 +0800 Subject: [PATCH] fix(channels): show field passthrough controls for Codex (#5902) --- .../table/channels/modals/EditChannelModal.jsx | 10 +++++++--- .../components/drawers/channel-mutate-drawer.tsx | 10 ++++++---- web/default/src/features/channels/lib/channel-form.ts | 4 ++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/web/classic/src/components/table/channels/modals/EditChannelModal.jsx b/web/classic/src/components/table/channels/modals/EditChannelModal.jsx index cad79773..2b07e1f8 100644 --- a/web/classic/src/components/table/channels/modals/EditChannelModal.jsx +++ b/web/classic/src/components/table/channels/modals/EditChannelModal.jsx @@ -1779,10 +1779,14 @@ const EditChannelModal = (props) => { } // type === 1 (OpenAI) 或 type === 14 (Claude): 设置字段透传控制(显式保存布尔值) - if (localInputs.type === 1 || localInputs.type === 14) { + if ( + localInputs.type === 1 || + localInputs.type === 14 || + localInputs.type === 57 + ) { settings.allow_service_tier = localInputs.allow_service_tier === true; // 仅 OpenAI 渠道需要 store / safety_identifier / include_obfuscation - if (localInputs.type === 1) { + if (localInputs.type === 1 || localInputs.type === 57) { settings.disable_store = localInputs.disable_store === true; settings.allow_safety_identifier = localInputs.allow_safety_identifier === true; @@ -2478,7 +2482,7 @@ const EditChannelModal = (props) => { - {inputs.type === 1 && ( + {(inputs.type === 1 || inputs.type === 57) && ( <>
{t('字段透传控制')} diff --git a/web/default/src/features/channels/components/drawers/channel-mutate-drawer.tsx b/web/default/src/features/channels/components/drawers/channel-mutate-drawer.tsx index b766d481..f21228c3 100644 --- a/web/default/src/features/channels/components/drawers/channel-mutate-drawer.tsx +++ b/web/default/src/features/channels/components/drawers/channel-mutate-drawer.tsx @@ -932,7 +932,7 @@ export function ChannelMutateDrawer({ currentSystemPromptOverride ) let fieldPassthroughConfigured = false - if (currentType === 1) { + if (currentType === 1 || currentType === 57) { fieldPassthroughConfigured = Boolean( currentAllowServiceTier || currentDisableStore || @@ -983,7 +983,7 @@ export function ChannelMutateDrawer({ configured: extraSettingsConfigured, }, ] - if (currentType === 1 || currentType === 14) { + if (currentType === 1 || currentType === 14 || currentType === 57) { advancedNavChildren.push({ id: ADVANCED_SETTINGS_SECTION_IDS.fieldPassthrough, title: t('Field passthrough controls'), @@ -4106,7 +4106,9 @@ export function ChannelMutateDrawer({
- {(currentType === 1 || currentType === 14) && ( + {(currentType === 1 || + currentType === 14 || + currentType === 57) && (
- {currentType === 1 && ( + {(currentType === 1 || currentType === 57) && ( <>