fix: scope the overridden config over global for recording

This commit is contained in:
Abhishek Kumar 2026-04-08 19:57:31 +05:30
parent 38d1d928b7
commit 6968d20eff
2 changed files with 10 additions and 3 deletions

View file

@ -36,6 +36,11 @@ interface RecordingsDialogProps {
onOpenChange: (open: boolean) => void;
workflowId: number;
onRecordingsChange?: (recordings: RecordingResponseSchema[]) => void;
ttsOverrides?: {
provider?: string;
model?: string;
voice?: string;
};
}
const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5MB
@ -57,6 +62,7 @@ export const RecordingsDialog = ({
onOpenChange,
workflowId,
onRecordingsChange,
ttsOverrides,
}: RecordingsDialogProps) => {
const { userConfig } = useUserConfig();
const [recordings, setRecordings] = useState<RecordingResponseSchema[]>([]);
@ -77,9 +83,9 @@ export const RecordingsDialog = ({
const languageRef = useRef(language);
languageRef.current = language;
const ttsProvider = (userConfig?.tts?.provider as string) ?? "";
const ttsModel = (userConfig?.tts?.model as string) ?? "";
const ttsVoiceId = (userConfig?.tts?.voice as string) ?? "";
const ttsProvider = ttsOverrides?.provider ?? (userConfig?.tts?.provider as string) ?? "";
const ttsModel = ttsOverrides?.model ?? (userConfig?.tts?.model as string) ?? "";
const ttsVoiceId = ttsOverrides?.voice ?? (userConfig?.tts?.voice as string) ?? "";
const fetchRecordings = useCallback(async () => {
if (!workflowId) return;

View file

@ -914,6 +914,7 @@ function WorkflowSettingsContent({
open={isRecordingsDialogOpen}
onOpenChange={setIsRecordingsDialogOpen}
workflowId={workflowId}
ttsOverrides={workflowConfigurations?.model_overrides?.tts}
/>
<EmbedDialog
open={isEmbedDialogOpen}