diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditConnectionModal.tsx b/src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditConnectionModal.tsx index e66aeab809..38524f52b4 100644 --- a/src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditConnectionModal.tsx +++ b/src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditConnectionModal.tsx @@ -657,6 +657,19 @@ export default function EditConnectionModal({ ? ERROR_TYPE_LABELS[testResult.diagnosis.type] || null : null; + const preserveEncryptedReasoningToggle = isResponsesConnection ? ( + setFormData({ ...formData, preserveEncryptedReasoning: checked })} + label={providerText(t, "preserveEncryptedReasoningLabel", "Preserve encrypted reasoning")} + description={providerText( + t, + "preserveEncryptedReasoningDescription", + "Forward encrypted Responses reasoning items supplied by the client." + )} + /> + ) : null; + return (
@@ -750,6 +763,7 @@ export default function EditConnectionModal({ description={t("importFreeModelsOnlyHint")} /> )} + {preserveEncryptedReasoningToggle} setFormData({ ...formData, disableCooling: checked })} @@ -1090,25 +1104,6 @@ export default function EditConnectionModal({ /> )} - {isResponsesConnection && ( - - setFormData({ ...formData, preserveEncryptedReasoning: checked }) - } - label={providerText( - t, - "preserveEncryptedReasoningLabel", - "Preserve encrypted reasoning" - )} - description={providerText( - t, - "preserveEncryptedReasoningDescription", - "Forward encrypted Responses reasoning items supplied by the client." - )} - /> - )} - { expect( el.querySelector('button[role="switch"][aria-label="openaiResponsesStoreLabel"]') ).toBeTruthy(); + const cooldownToggle = el.querySelector( + 'button[role="switch"][aria-label="disableCoolingLabel"]' + )!; + const reasoningToggle = el.querySelector(PRESERVE_TOGGLE)!; + expect(reasoningToggle.parentElement?.nextElementSibling).toBe(cooldownToggle.parentElement); const saveBtn = Array.from(el.querySelectorAll("button")).find( (button) => button.textContent?.trim() === "save" )!;