chore(config): remove Deepinfra model gating and related admin setting
Eliminate the showAllDeepInfraModels runtime/admin config and all code paths that allowed restricting Deepinfra's model catalog. Deepinfra now always shows the full model list regardless of API key or environment variable. Update documentation, environment examples, admin panels, runtime config, provider catalog logic, and tests to reflect this change.
This commit is contained in:
parent
e27d20419d
commit
d5eebd3b11
25 changed files with 5 additions and 118 deletions
|
|
@ -93,6 +93,5 @@ FFMPEG_BIN=
|
|||
# NEXT_PUBLIC_RESTRICT_USER_API_KEYS=true
|
||||
# NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=custom-openai
|
||||
# NEXT_PUBLIC_DEFAULT_TTS_MODEL=kokoro
|
||||
# NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=true
|
||||
# NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true
|
||||
# NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ Runtime-editable settings, one row per key:
|
|||
| `defaultTtsProvider` | Default provider id new users start with (built-in id or shared slug). |
|
||||
| `restrictUserApiKeys` | Restrict user-supplied API keys/base URLs; when `true`, only admin shared providers are allowed. |
|
||||
| `enableTtsProvidersTab` | Whether the user-facing TTS Provider tab in Settings is shown. |
|
||||
| `showAllDeepInfraModels` | Show the full DeepInfra catalog vs. the Kokoro-only subset. |
|
||||
| `showAllProviderModels` | When `false`, users are restricted to each provider's default model (shared provider `defaultModel` or built-in provider default). |
|
||||
| `enableWordHighlight` | Enable whisper.cpp word-by-word highlighting during TTS playback. |
|
||||
| `enableAudiobookExport` | Show the audiobook export entry points on PDF/EPUB pages. |
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ After the first successful deploy and admin login, open **Settings → Admin** a
|
|||
- `restrictUserApiKeys=true` to block user BYOK through the hosted server.
|
||||
- `defaultTtsProvider=replicate` (or your preferred shared slug).
|
||||
- `showAllProviderModels=false` if you want users locked to each provider's default model.
|
||||
- `showAllDeepInfraModels=false` if you want a narrower default catalog.
|
||||
- `enableAudiobookExport=true`.
|
||||
- `enableWordHighlight=false` unless your timestamp stack is configured.
|
||||
|
||||
|
|
|
|||
|
|
@ -405,12 +405,6 @@ Sets the default TTS provider for new users.
|
|||
|
||||
`showAllProviderModels` is a runtime-only admin setting (no env seed). Configure it in **Settings → Admin → Site features**.
|
||||
|
||||
### NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS
|
||||
|
||||
Controls whether the DeepInfra model list shows all models or just the free tier when no API key is set.
|
||||
|
||||
- Default: `true` (show all)
|
||||
- Runtime key: `showAllDeepInfraModels`
|
||||
|
||||
### NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ NEXT_PUBLIC_ENABLE_DOCX_CONVERSION=false
|
|||
NEXT_PUBLIC_ENABLE_DESTRUCTIVE_DELETE_ACTIONS=false
|
||||
NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=deepinfra
|
||||
NEXT_PUBLIC_DEFAULT_TTS_MODEL=hexgrad/Kokoro-82M
|
||||
NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=false
|
||||
NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true
|
||||
NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false
|
||||
# Optional (non-AWS S3-compatible providers):
|
||||
|
|
@ -49,7 +48,6 @@ We recommend setting these defaults for a production-like environment:
|
|||
- `NEXT_PUBLIC_ENABLE_DESTRUCTIVE_DELETE_ACTIONS=false`: Hides destructive "Delete All" actions
|
||||
- `NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=deepinfra`: Points default TTS to a scalable provider
|
||||
- `NEXT_PUBLIC_DEFAULT_TTS_MODEL=hexgrad/Kokoro-82M`: Uses a high-quality default model
|
||||
- `NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=false`: Restricts usage to free models if no key is provided
|
||||
- `NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true`: (Optional) Controls audiobook export UI
|
||||
- `NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false`: (Optional) Controls word highlighting UI (requires timestamp backend)
|
||||
:::
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ This is the single reference page for OpenReader environment variables.
|
|||
| `NEXT_PUBLIC_ENABLE_DESTRUCTIVE_DELETE_ACTIONS` | Client feature flags | `true` unless set to `false` | Set `false` to hide destructive actions |
|
||||
| `NEXT_PUBLIC_DEFAULT_TTS_PROVIDER` | Client feature flags | `custom-openai` | Override default TTS provider |
|
||||
| `NEXT_PUBLIC_DEFAULT_TTS_MODEL` | Client feature flags | `kokoro` | Override default TTS model |
|
||||
| `NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS` | Client feature flags | `true` unless set to `false` | Set `false` to restrict DeepInfra models |
|
||||
| `NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT` | Client feature flags | `true` unless set to `false` | Set `false` to hide audiobook export UI |
|
||||
| `NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT` | Client feature flags | `true` unless set to `false` | Set `false` to disable word highlight + alignment |
|
||||
| `API_BASE` | TTS provider | none | Point to your OpenAI-compatible TTS base URL |
|
||||
|
|
@ -376,13 +375,6 @@ Absolute path or executable name for the ffmpeg binary used by audiobook/process
|
|||
|
||||
- Default: `kokoro`
|
||||
- Example values: `hexgrad/Kokoro-82M`, `tts-1`
|
||||
|
||||
### NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS
|
||||
|
||||
Controls whether the DeepInfra model list shows all models or just the free tier when no API key is set.
|
||||
|
||||
- Default: `true` (show all)
|
||||
- Set `false` to restrict to free tier models when no API key is provided
|
||||
|
||||
### NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ NEXT_PUBLIC_ENABLE_DOCX_CONVERSION=false
|
|||
NEXT_PUBLIC_ENABLE_DESTRUCTIVE_DELETE_ACTIONS=false
|
||||
NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=deepinfra
|
||||
NEXT_PUBLIC_DEFAULT_TTS_MODEL=hexgrad/Kokoro-82M
|
||||
NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=false
|
||||
NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true
|
||||
NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false
|
||||
# Optional (non-AWS S3-compatible providers):
|
||||
|
|
@ -49,7 +48,6 @@ We recommend setting these defaults for a production-like environment:
|
|||
- `NEXT_PUBLIC_ENABLE_DESTRUCTIVE_DELETE_ACTIONS=false`: Hides destructive "Delete All" actions
|
||||
- `NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=deepinfra`: Points default TTS to a scalable provider
|
||||
- `NEXT_PUBLIC_DEFAULT_TTS_MODEL=hexgrad/Kokoro-82M`: Uses a high-quality default model
|
||||
- `NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=false`: Restricts usage to free models if no key is provided
|
||||
- `NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true`: (Optional) Controls audiobook export UI
|
||||
- `NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false`: (Optional) Controls word highlighting UI (requires timestamp backend)
|
||||
:::
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ This is the single reference page for OpenReader environment variables.
|
|||
| `NEXT_PUBLIC_ENABLE_DESTRUCTIVE_DELETE_ACTIONS` | Client feature flags | `true` unless set to `false` | Set `false` to hide destructive actions |
|
||||
| `NEXT_PUBLIC_DEFAULT_TTS_PROVIDER` | Client feature flags | `custom-openai` | Override default TTS provider |
|
||||
| `NEXT_PUBLIC_DEFAULT_TTS_MODEL` | Client feature flags | `kokoro` | Override default TTS model |
|
||||
| `NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS` | Client feature flags | `true` unless set to `false` | Set `false` to restrict DeepInfra models |
|
||||
| `NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT` | Client feature flags | `true` unless set to `false` | Set `false` to hide audiobook export UI |
|
||||
| `NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT` | Client feature flags | `true` unless set to `false` | Set `false` to disable word highlight + alignment |
|
||||
| `API_BASE` | TTS provider | none | Point to your OpenAI-compatible TTS base URL |
|
||||
|
|
@ -376,13 +375,6 @@ Absolute path or executable name for the ffmpeg binary used by audiobook/process
|
|||
|
||||
- Default: `kokoro`
|
||||
- Example values: `hexgrad/Kokoro-82M`, `tts-1`
|
||||
|
||||
### NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS
|
||||
|
||||
Controls whether the DeepInfra model list shows all models or just the free tier when no API key is set.
|
||||
|
||||
- Default: `true` (show all)
|
||||
- Set `false` to restrict to free tier models when no API key is provided
|
||||
|
||||
### NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ NEXT_PUBLIC_ENABLE_DESTRUCTIVE_DELETE_ACTIONS=false
|
|||
NEXT_PUBLIC_ENABLE_TTS_PROVIDERS_TAB=false
|
||||
NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=deepinfra
|
||||
NEXT_PUBLIC_DEFAULT_TTS_MODEL=hexgrad/Kokoro-82M
|
||||
NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=false
|
||||
NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true
|
||||
NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false
|
||||
# Optional (non-AWS S3-compatible providers):
|
||||
|
|
@ -51,7 +50,6 @@ We recommend setting these defaults for a production-like environment:
|
|||
- `NEXT_PUBLIC_ENABLE_TTS_PROVIDERS_TAB=false`: Hides the Settings -> TTS Provider section
|
||||
- `NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=deepinfra`: Points default TTS to a scalable provider
|
||||
- `NEXT_PUBLIC_DEFAULT_TTS_MODEL=hexgrad/Kokoro-82M`: Uses a high-quality default model
|
||||
- `NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=false`: Restricts usage to free models if no key is provided
|
||||
- `NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true`: (Optional) Controls audiobook export UI
|
||||
- `NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false`: (Optional) Controls word highlighting UI (requires timestamp backend)
|
||||
:::
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ This is the single reference page for OpenReader environment variables.
|
|||
| `NEXT_PUBLIC_ENABLE_TTS_PROVIDERS_TAB` | Client feature flags | `true` unless set to `false` | Set `false` to hide the TTS Provider settings tab |
|
||||
| `NEXT_PUBLIC_DEFAULT_TTS_PROVIDER` | Client feature flags | `custom-openai` | Override default TTS provider |
|
||||
| `NEXT_PUBLIC_DEFAULT_TTS_MODEL` | Client feature flags | `kokoro` | Override default TTS model |
|
||||
| `NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS` | Client feature flags | `true` unless set to `false` | Set `false` to restrict DeepInfra models |
|
||||
| `NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT` | Client feature flags | `true` unless set to `false` | Set `false` to hide audiobook export UI |
|
||||
| `NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT` | Client feature flags | `true` unless set to `false` | Set `false` to disable word highlight + alignment |
|
||||
| `API_BASE` | TTS provider | none | Point to your OpenAI-compatible TTS base URL |
|
||||
|
|
@ -387,13 +386,6 @@ Controls whether the **TTS Provider** section appears in the Settings modal.
|
|||
|
||||
- Default: `kokoro`
|
||||
- Example values: `hexgrad/Kokoro-82M`, `tts-1`
|
||||
|
||||
### NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS
|
||||
|
||||
Controls whether the DeepInfra model list shows all models or just the free tier when no API key is set.
|
||||
|
||||
- Default: `true` (show all)
|
||||
- Set `false` to restrict to free tier models when no API key is provided
|
||||
|
||||
### NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ NEXT_PUBLIC_ENABLE_DESTRUCTIVE_DELETE_ACTIONS=false
|
|||
NEXT_PUBLIC_ENABLE_TTS_PROVIDERS_TAB=false
|
||||
NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=deepinfra
|
||||
NEXT_PUBLIC_DEFAULT_TTS_MODEL=hexgrad/Kokoro-82M
|
||||
NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=false
|
||||
NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true
|
||||
NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false
|
||||
# Optional (non-AWS S3-compatible providers):
|
||||
|
|
@ -51,7 +50,6 @@ We recommend setting these defaults for a production-like environment:
|
|||
- `NEXT_PUBLIC_ENABLE_TTS_PROVIDERS_TAB=false`: Hides the Settings -> TTS Provider section
|
||||
- `NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=deepinfra`: Points default TTS to a scalable provider
|
||||
- `NEXT_PUBLIC_DEFAULT_TTS_MODEL=hexgrad/Kokoro-82M`: Uses a high-quality default model
|
||||
- `NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=false`: Restricts usage to free models if no key is provided
|
||||
- `NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true`: (Optional) Controls audiobook export UI
|
||||
- `NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false`: (Optional) Controls word highlighting UI (requires timestamp backend)
|
||||
:::
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ This is the single reference page for OpenReader environment variables.
|
|||
| `NEXT_PUBLIC_ENABLE_TTS_PROVIDERS_TAB` | Client feature flags | `true` unless set to `false` | Set `false` to hide the TTS Provider settings tab |
|
||||
| `NEXT_PUBLIC_DEFAULT_TTS_PROVIDER` | Client feature flags | `custom-openai` | Override default TTS provider |
|
||||
| `NEXT_PUBLIC_DEFAULT_TTS_MODEL` | Client feature flags | `kokoro` | Override default TTS model |
|
||||
| `NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS` | Client feature flags | `true` unless set to `false` | Set `false` to restrict DeepInfra models |
|
||||
| `NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT` | Client feature flags | `true` unless set to `false` | Set `false` to hide audiobook export UI |
|
||||
| `NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT` | Client feature flags | `true` unless set to `false` | Set `false` to disable word highlight + alignment |
|
||||
| `API_BASE` | TTS provider | none | Point to your OpenAI-compatible TTS base URL |
|
||||
|
|
@ -387,13 +386,6 @@ Controls whether the **TTS Provider** section appears in the Settings modal.
|
|||
|
||||
- Default: `kokoro`
|
||||
- Example values: `hexgrad/Kokoro-82M`, `tts-1`
|
||||
|
||||
### NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS
|
||||
|
||||
Controls whether the DeepInfra model list shows all models or just the free tier when no API key is set.
|
||||
|
||||
- Default: `true` (show all)
|
||||
- Set `false` to restrict to free tier models when no API key is provided
|
||||
|
||||
### NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ NEXT_PUBLIC_ENABLE_DESTRUCTIVE_DELETE_ACTIONS=false
|
|||
NEXT_PUBLIC_ENABLE_TTS_PROVIDERS_TAB=false
|
||||
NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=deepinfra
|
||||
NEXT_PUBLIC_DEFAULT_TTS_MODEL=hexgrad/Kokoro-82M
|
||||
NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=false
|
||||
NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true
|
||||
NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false
|
||||
# Optional (non-AWS S3-compatible providers):
|
||||
|
|
@ -51,7 +50,6 @@ We recommend setting these defaults for a production-like environment:
|
|||
- `NEXT_PUBLIC_ENABLE_TTS_PROVIDERS_TAB=false`: Hides the Settings -> TTS Provider section
|
||||
- `NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=deepinfra`: Points default TTS to a scalable provider
|
||||
- `NEXT_PUBLIC_DEFAULT_TTS_MODEL=hexgrad/Kokoro-82M`: Uses a high-quality default model
|
||||
- `NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=false`: Restricts usage to free models if no key is provided
|
||||
- `NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true`: (Optional) Controls audiobook export UI
|
||||
- `NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false`: (Optional) Controls word highlighting UI (requires timestamp backend)
|
||||
:::
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ This is the single reference page for OpenReader environment variables.
|
|||
| `NEXT_PUBLIC_ENABLE_TTS_PROVIDERS_TAB` | Client feature flags | `true` unless set to `false` | Set `false` to hide the TTS Provider settings tab |
|
||||
| `NEXT_PUBLIC_DEFAULT_TTS_PROVIDER` | Client feature flags | `custom-openai` | Override default TTS provider |
|
||||
| `NEXT_PUBLIC_DEFAULT_TTS_MODEL` | Client feature flags | `kokoro` | Override default TTS model |
|
||||
| `NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS` | Client feature flags | `true` unless set to `false` | Set `false` to restrict DeepInfra models |
|
||||
| `NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT` | Client feature flags | `true` unless set to `false` | Set `false` to hide audiobook export UI |
|
||||
| `NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT` | Client feature flags | `true` unless set to `false` | Set `false` to disable word highlight + alignment |
|
||||
| `API_BASE` | TTS provider | none | Point to your OpenAI-compatible TTS base URL |
|
||||
|
|
@ -387,13 +386,6 @@ Controls whether the **TTS Provider** section appears in the Settings modal.
|
|||
|
||||
- Default: `kokoro`
|
||||
- Example values: `hexgrad/Kokoro-82M`, `tts-1`
|
||||
|
||||
### NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS
|
||||
|
||||
Controls whether the DeepInfra model list shows all models or just the free tier when no API key is set.
|
||||
|
||||
- Default: `true` (show all)
|
||||
- Set `false` to restrict to free tier models when no API key is provided
|
||||
|
||||
### NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ NEXT_PUBLIC_ENABLE_DESTRUCTIVE_DELETE_ACTIONS=false
|
|||
NEXT_PUBLIC_ENABLE_TTS_PROVIDERS_TAB=false
|
||||
NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=replicate
|
||||
NEXT_PUBLIC_DEFAULT_TTS_MODEL=alphanumericuser/kokoro-82m:89b6fa84e4fa2dd6bd3a96be3e1f12827a3516c9fda8fddbac7a0be131c9a6f5
|
||||
NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=false
|
||||
NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true
|
||||
NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false
|
||||
# Optional (non-AWS S3-compatible providers):
|
||||
|
|
@ -50,7 +49,6 @@ We recommend setting these defaults for a production-like environment:
|
|||
- `NEXT_PUBLIC_ENABLE_TTS_PROVIDERS_TAB=false`: Hides the Settings -> TTS Provider section
|
||||
- `NEXT_PUBLIC_DEFAULT_TTS_PROVIDER=replicate`: Points default TTS to a scalable provider
|
||||
- `NEXT_PUBLIC_DEFAULT_TTS_MODEL=alphanumericuser/kokoro-82m:89b6fa84e4fa2dd6bd3a96be3e1f12827a3516c9fda8fddbac7a0be131c9a6f5`: Uses a low-cost default model
|
||||
- `NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS=false`: Restricts usage to free models if no key is provided
|
||||
- `NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT=true`: (Optional) Controls audiobook export UI
|
||||
- `NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT=false`: (Optional) Controls word highlighting UI (requires timestamp backend)
|
||||
:::
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ This is the single reference page for OpenReader environment variables.
|
|||
| `NEXT_PUBLIC_ENABLE_TTS_PROVIDERS_TAB` | Client feature flags | `true` unless set to `false` | Set `false` to hide the TTS Provider settings tab |
|
||||
| `NEXT_PUBLIC_DEFAULT_TTS_PROVIDER` | Client feature flags | `custom-openai` | Override default TTS provider |
|
||||
| `NEXT_PUBLIC_DEFAULT_TTS_MODEL` | Client feature flags | `kokoro` | Override default TTS model |
|
||||
| `NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS` | Client feature flags | `true` unless set to `false` | Set `false` to restrict DeepInfra models |
|
||||
| `NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT` | Client feature flags | `true` unless set to `false` | Set `false` to hide audiobook export UI |
|
||||
| `NEXT_PUBLIC_ENABLE_WORD_HIGHLIGHT` | Client feature flags | `true` unless set to `false` | Set `false` to disable word highlight + alignment |
|
||||
| `API_BASE` | TTS provider | none | Point to your OpenAI-compatible TTS base URL |
|
||||
|
|
@ -387,13 +386,6 @@ Controls whether the **TTS Provider** section appears in the Settings modal.
|
|||
|
||||
- Default: `kokoro`
|
||||
- Example values: `hexgrad/Kokoro-82M`, `tts-1`
|
||||
|
||||
### NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS
|
||||
|
||||
Controls whether the DeepInfra model list shows all models or just the free tier when no API key is set.
|
||||
|
||||
- Default: `true` (show all)
|
||||
- Set `false` to restrict to free tier models when no API key is provided
|
||||
|
||||
### NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@ type AdminSubTab = 'providers' | 'features';
|
|||
export function SettingsModal({ className = '' }: { className?: string }) {
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const enableDestructiveDelete = runtimeConfig.enableDestructiveDeleteActions;
|
||||
const showAllDeepInfra = runtimeConfig.showAllDeepInfraModels;
|
||||
const showAllProviderModels = runtimeConfig.showAllProviderModels;
|
||||
const enableTTSProvidersTab = runtimeConfig.enableTtsProvidersTab;
|
||||
const restrictUserApiKeys = runtimeConfig.restrictUserApiKeys;
|
||||
|
|
@ -191,11 +190,10 @@ export function SettingsModal({ className = '' }: { className?: string }) {
|
|||
apiKey: localApiKey,
|
||||
modelValue,
|
||||
customModelInput,
|
||||
showAllDeepInfra,
|
||||
showAllProviderModels,
|
||||
sharedProviders,
|
||||
allowBuiltInProviders: !restrictUserApiKeys,
|
||||
}), [localProviderRef, localProviderType, localApiKey, modelValue, customModelInput, showAllDeepInfra, showAllProviderModels, sharedProviders, restrictUserApiKeys]);
|
||||
}), [localProviderRef, localProviderType, localApiKey, modelValue, customModelInput, showAllProviderModels, sharedProviders, restrictUserApiKeys]);
|
||||
const isSharedSelected = Boolean(selectedSharedProvider);
|
||||
const selectedProviderOption = ttsProviders.find((p) => p.id === localProviderRef) ?? ttsProviders[0];
|
||||
|
||||
|
|
@ -715,7 +713,7 @@ export function SettingsModal({ className = '' }: { className?: string }) {
|
|||
type="password"
|
||||
value={localApiKey}
|
||||
onChange={(e) => handleInputChange('apiKey', e.target.value)}
|
||||
placeholder={!showAllDeepInfra && providerModelPolicy.providerType === 'deepinfra' ? "Deepinfra free or use your API key" : "Using environment variable"}
|
||||
placeholder="Using environment variable"
|
||||
className={inputClass}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -264,14 +264,6 @@ export function AdminFeaturesPanel() {
|
|||
right={renderSource('enableTtsProvidersTab')}
|
||||
variant="flat"
|
||||
/>
|
||||
<ToggleRow
|
||||
label="Show all Deepinfra models"
|
||||
description="Show full Deepinfra model list."
|
||||
checked={Boolean(draft.showAllDeepInfraModels)}
|
||||
onChange={(checked) => updateDraft('showAllDeepInfraModels', checked)}
|
||||
right={renderSource('showAllDeepInfraModels')}
|
||||
variant="flat"
|
||||
/>
|
||||
<ToggleRow
|
||||
label="Show all provider models"
|
||||
description="Allow model selection beyond defaults."
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import toast from 'react-hot-toast';
|
|||
import { ChevronUpDownIcon, CheckIcon, PlusIcon } from '@/components/icons/Icons';
|
||||
import { providerSupportsCustomModel, resolveProviderModels, type TtsModelDefinition, type TtsProviderId } from '@/lib/shared/tts-provider-catalog';
|
||||
import { defaultBaseUrlForProviderType, defaultModelForProviderType, resolveTtsProviderModelPolicy } from '@/lib/shared/tts-provider-policy';
|
||||
import { useRuntimeConfig } from '@/contexts/RuntimeConfigContext';
|
||||
import {
|
||||
Badge,
|
||||
Field,
|
||||
|
|
@ -117,7 +116,6 @@ async function deleteAdminProvider(id: string): Promise<void> {
|
|||
}
|
||||
|
||||
export function AdminProvidersPanel() {
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const queryClient = useQueryClient();
|
||||
const [editingId, setEditingId] = useState<string | null>(null);
|
||||
const [form, setForm] = useState<FormState>(() => createEmptyForm());
|
||||
|
|
@ -212,9 +210,8 @@ export function AdminProvidersPanel() {
|
|||
const modelDefinitions: TtsModelDefinition[] = useMemo(
|
||||
() => resolveProviderModels(form.providerType, {
|
||||
apiKey: form.apiKey,
|
||||
showAllDeepInfra: runtimeConfig.showAllDeepInfraModels,
|
||||
}),
|
||||
[form.providerType, form.apiKey, runtimeConfig.showAllDeepInfraModels],
|
||||
[form.providerType, form.apiKey],
|
||||
);
|
||||
const supportsCustomModel = providerSupportsCustomModel(form.providerType);
|
||||
const modelIsPreset = modelDefinitions.some((model) => model.id === form.defaultModel);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ export interface RuntimeConfig {
|
|||
enableAudiobookExport: boolean;
|
||||
enableDocxConversion: boolean;
|
||||
enableDestructiveDeleteActions: boolean;
|
||||
showAllDeepInfraModels: boolean;
|
||||
showAllProviderModels: boolean;
|
||||
}
|
||||
|
||||
|
|
@ -31,7 +30,6 @@ const RUNTIME_DEFAULTS: RuntimeConfig = {
|
|||
enableAudiobookExport: true,
|
||||
enableDocxConversion: true,
|
||||
enableDestructiveDeleteActions: true,
|
||||
showAllDeepInfraModels: true,
|
||||
showAllProviderModels: true,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ export interface ResolveTtsSettingsViewModelOptions {
|
|||
apiKey?: string;
|
||||
modelValue: string;
|
||||
customModelInput: string;
|
||||
showAllDeepInfra: boolean;
|
||||
showAllProviderModels: boolean;
|
||||
sharedProviders?: SharedProviderEntry[];
|
||||
allowBuiltInProviders?: boolean;
|
||||
|
|
@ -59,7 +58,6 @@ export function resolveTtsSettingsViewModel({
|
|||
apiKey,
|
||||
modelValue,
|
||||
customModelInput,
|
||||
showAllDeepInfra,
|
||||
showAllProviderModels,
|
||||
sharedProviders = [],
|
||||
allowBuiltInProviders = true,
|
||||
|
|
@ -98,7 +96,6 @@ export function resolveTtsSettingsViewModel({
|
|||
|
||||
const catalogModels = resolveProviderModels(knownProviderType ?? 'custom-openai', {
|
||||
apiKey,
|
||||
showAllDeepInfra,
|
||||
});
|
||||
const providerDefaults = resolveProviderDefaults({
|
||||
providerRef: selectedProviderRef,
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@ export const RUNTIME_CONFIG_SCHEMA = {
|
|||
enableAudiobookExport: booleanFlag(true, 'NEXT_PUBLIC_ENABLE_AUDIOBOOK_EXPORT'),
|
||||
enableDocxConversion: booleanFlag(true, 'NEXT_PUBLIC_ENABLE_DOCX_CONVERSION'),
|
||||
enableDestructiveDeleteActions: booleanFlag(true, 'NEXT_PUBLIC_ENABLE_DESTRUCTIVE_DELETE_ACTIONS'),
|
||||
showAllDeepInfraModels: booleanFlag(true, 'NEXT_PUBLIC_SHOW_ALL_DEEPINFRA_MODELS'),
|
||||
showAllProviderModels: runtimeBoolean(true),
|
||||
} as const satisfies Record<string, RuntimeConfigKeyDef<unknown>>;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ export interface TtsProviderDefinition {
|
|||
|
||||
export interface ResolveProviderModelsContext {
|
||||
apiKey?: string;
|
||||
showAllDeepInfra?: boolean;
|
||||
}
|
||||
|
||||
export interface ResolveVoicesOptions {
|
||||
|
|
@ -59,10 +58,6 @@ const DEEPINFRA_MODELS_FULL: TtsModelDefinition[] = [
|
|||
{ id: 'custom', name: 'Other' },
|
||||
];
|
||||
|
||||
const DEEPINFRA_MODELS_LIMITED: TtsModelDefinition[] = [
|
||||
{ id: 'hexgrad/Kokoro-82M', name: 'hexgrad/Kokoro-82M' },
|
||||
];
|
||||
|
||||
export const REPLICATE_KOKORO_82M_VERSIONED_MODEL =
|
||||
'alphanumericuser/kokoro-82m:89b6fa84e4fa2dd6bd3a96be3e1f12827a3516c9fda8fddbac7a0be131c9a6f5' as const;
|
||||
|
||||
|
|
@ -148,12 +143,7 @@ export const TTS_PROVIDER_DEFINITIONS: TtsProviderDefinition[] = [
|
|||
id: 'deepinfra',
|
||||
name: 'Deepinfra',
|
||||
supportsCustomModel: true,
|
||||
models: (context) => {
|
||||
if (!context?.showAllDeepInfra && !context?.apiKey) {
|
||||
return DEEPINFRA_MODELS_LIMITED;
|
||||
}
|
||||
return DEEPINFRA_MODELS_FULL;
|
||||
},
|
||||
models: () => DEEPINFRA_MODELS_FULL,
|
||||
},
|
||||
{
|
||||
id: 'openai',
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import { applyConfigUpdate, getVoicePreferenceKey } from '../../src/lib/client/c
|
|||
import { buildSyncedPreferencePatch } from '../../src/lib/client/config/preferences';
|
||||
|
||||
test.describe('tts provider catalog', () => {
|
||||
test('resolves provider models with Deepinfra gating unchanged', () => {
|
||||
test('resolves provider models with fixed Deepinfra catalog', () => {
|
||||
expect(resolveProviderModels('openai').map((model) => model.id)).toEqual([
|
||||
'tts-1',
|
||||
'tts-1-hd',
|
||||
|
|
@ -22,15 +22,7 @@ test.describe('tts provider catalog', () => {
|
|||
]);
|
||||
|
||||
expect(resolveProviderModels('deepinfra', {
|
||||
showAllDeepInfra: false,
|
||||
apiKey: '',
|
||||
}).map((model) => model.id)).toEqual([
|
||||
'hexgrad/Kokoro-82M',
|
||||
]);
|
||||
|
||||
expect(resolveProviderModels('deepinfra', {
|
||||
showAllDeepInfra: false,
|
||||
apiKey: 'token',
|
||||
}).map((model) => model.id)).toEqual([
|
||||
'hexgrad/Kokoro-82M',
|
||||
'canopylabs/orpheus-3b-0.1-ft',
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ test.describe('resolveTtsSettingsViewModel (admin/shared modes)', () => {
|
|||
providerType: 'unknown',
|
||||
modelValue: 'kokoro',
|
||||
customModelInput: '',
|
||||
showAllDeepInfra: false,
|
||||
showAllProviderModels: true,
|
||||
sharedProviders: [
|
||||
{
|
||||
|
|
@ -53,7 +52,6 @@ test.describe('resolveTtsSettingsViewModel (admin/shared modes)', () => {
|
|||
providerType: 'unknown',
|
||||
modelValue: 'gpt-4o-mini-tts',
|
||||
customModelInput: '',
|
||||
showAllDeepInfra: false,
|
||||
showAllProviderModels: true,
|
||||
sharedProviders: SHARED,
|
||||
allowBuiltInProviders: false,
|
||||
|
|
@ -69,7 +67,6 @@ test.describe('resolveTtsSettingsViewModel (admin/shared modes)', () => {
|
|||
providerType: 'unknown',
|
||||
modelValue: 'kokoro',
|
||||
customModelInput: '',
|
||||
showAllDeepInfra: false,
|
||||
showAllProviderModels: true,
|
||||
sharedProviders: SHARED,
|
||||
allowBuiltInProviders: false,
|
||||
|
|
@ -85,7 +82,6 @@ test.describe('resolveTtsSettingsViewModel (admin/shared modes)', () => {
|
|||
providerType: 'unknown',
|
||||
modelValue: 'my-custom-model',
|
||||
customModelInput: '',
|
||||
showAllDeepInfra: false,
|
||||
showAllProviderModels: true,
|
||||
sharedProviders: SHARED,
|
||||
allowBuiltInProviders: false,
|
||||
|
|
@ -102,7 +98,6 @@ test.describe('resolveTtsSettingsViewModel (admin/shared modes)', () => {
|
|||
providerType: 'unknown',
|
||||
modelValue: 'not-in-presets',
|
||||
customModelInput: '',
|
||||
showAllDeepInfra: false,
|
||||
showAllProviderModels: true,
|
||||
sharedProviders: SHARED,
|
||||
allowBuiltInProviders: false,
|
||||
|
|
@ -119,7 +114,6 @@ test.describe('resolveTtsSettingsViewModel (admin/shared modes)', () => {
|
|||
providerType: 'unknown',
|
||||
modelValue: 'kokoro',
|
||||
customModelInput: '',
|
||||
showAllDeepInfra: false,
|
||||
showAllProviderModels: true,
|
||||
sharedProviders: SHARED,
|
||||
allowBuiltInProviders: false,
|
||||
|
|
@ -135,7 +129,6 @@ test.describe('resolveTtsSettingsViewModel (admin/shared modes)', () => {
|
|||
providerType: 'unknown',
|
||||
modelValue: 'my-custom-model',
|
||||
customModelInput: 'my-custom-model',
|
||||
showAllDeepInfra: false,
|
||||
showAllProviderModels: false,
|
||||
sharedProviders: SHARED,
|
||||
allowBuiltInProviders: false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue