From 72c112164e6245812a2f1aef75e5ddd33ea16556 Mon Sep 17 00:00:00 2001 From: erio Date: Tue, 9 Jun 2026 23:33:40 +0800 Subject: [PATCH] fix(frontend): bedrock_cc_compat toggle not persisting on reload apiToForm read bedrock_cc_compat as Record (nested map) but formToAPI saves it as a plain bool. Reading true["anthropic"] returns undefined, so the toggle always appeared off after save. Align the read path with the write path: fc?.bedrock_cc_compat === true. --- frontend/src/views/admin/ChannelsView.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/views/admin/ChannelsView.vue b/frontend/src/views/admin/ChannelsView.vue index 38f470a48b..57ea1f3879 100644 --- a/frontend/src/views/admin/ChannelsView.vue +++ b/frontend/src/views/admin/ChannelsView.vue @@ -1205,8 +1205,7 @@ function apiToForm(channel: Channel): PlatformSection[] { const webSearchEnabled = wsEmulation?.[platform] === true const codexImageGenerationBridge = fc?.codex_image_generation_bridge as Record | undefined const codexImageGenerationBridgeEnabled = codexImageGenerationBridge?.[platform] === true - const bedrockCCCompat = fc?.bedrock_cc_compat as Record | undefined - const bedrockCCCompatEnabled = bedrockCCCompat?.[platform] === true + const bedrockCCCompatEnabled = fc?.bedrock_cc_compat === true sections.push({ platform,