From 77c955bfae302699e1419ba541253924a0ba1c7f Mon Sep 17 00:00:00 2001 From: Richard Roberson Date: Sun, 9 Nov 2025 17:19:37 -0700 Subject: [PATCH] fix(settings): restrict model selection for Deepinfra in production without API key --- src/components/SettingsModal.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsx index 837fd6c..f58a50f 100644 --- a/src/components/SettingsModal.tsx +++ b/src/components/SettingsModal.tsx @@ -81,11 +81,13 @@ export function SettingsModal() { { id: 'custom', name: 'Other' } ]; case 'deepinfra': - if (!isDev) { + // In production without an API key, limit to free tier model + if (!isDev && !localApiKey) { return [ { id: 'hexgrad/Kokoro-82M', name: 'hexgrad/Kokoro-82M' } ]; } + // In dev or with an API key, allow all models return [ { id: 'hexgrad/Kokoro-82M', name: 'hexgrad/Kokoro-82M' }, { id: 'canopylabs/orpheus-3b-0.1-ft', name: 'canopylabs/orpheus-3b-0.1-ft' }, @@ -100,7 +102,7 @@ export function SettingsModal() { { id: 'tts-1', name: 'TTS-1' } ]; } - }, [localTTSProvider]); + }, [localTTSProvider, localApiKey]); const supportsCustom = useMemo(() => localTTSProvider !== 'openai', [localTTSProvider]);