fix(settings): restrict model selection for Deepinfra in production without API key
This commit is contained in:
parent
4d3c2cf3cf
commit
77c955bfae
1 changed files with 4 additions and 2 deletions
|
|
@ -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]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue