danny-avila/LibreChat · error
No provider is set. Please set a provider.
Error message
No provider is set. Please set a provider.
What it means
The `speech.tts` block is present (passed the falsy check at line 51) but after filtering out `allowedAddresses` and empty objects, zero providers remain. Every provider entry is an empty object — e.g. `tts: { openai: {} }`.
Source
Thrown at api/server/services/Files/Audio/TTSService.js:60
/**
* Retrieves the configured TTS provider.
* @param {AppConfig | null | undefined} [appConfig] - The app configuration object.
* @returns {string} The name of the configured provider.
* @throws {Error} If no provider is set or multiple providers are set.
*/
getProvider(appConfig) {
const ttsSchema = appConfig?.speech?.tts;
if (!ttsSchema) {
throw new Error(
'No TTS schema is set. Did you configure TTS in the custom config (librechat.yaml)?',
);
}
const providers = Object.entries(ttsSchema).filter(
([key, value]) => key !== 'allowedAddresses' && Object.keys(value).length > 0,
);
if (providers.length !== 1) {
throw new Error(
providers.length > 1
? 'Multiple providers are set. Please set only one provider.'
: 'No provider is set. Please set a provider.',
);
}
return providers[0][0];
}
/**
* Selects a voice for TTS based on provider schema and request.
* @async
* @param {Object} providerSchema - The schema for the selected provider.
* @param {string} requestVoice - The requested voice.
* @returns {Promise<string>} The selected voice.
*/
async getVoice(providerSchema, requestVoice) {
const voices = providerSchema.voices.filter((voice) => voice && voice.toUpperCase() !== 'ALL');
let voice = requestVoice;View on GitHub (pinned to 5ff282f900)
Solutions
- Populate at least one provider with required fields (e.g. openai.apiKey + model, or elevenlabs.apiKey + voices).
- Reload the config / restart the API server.
Example fix
# before
speech:
tts:
elevenlabs: {}
# after
speech:
tts:
elevenlabs:
apiKey: '${TTS_API_KEY}'
model: 'eleven_multilingual_v2'
voices: ['...'] Defensive patterns
Strategy: validation
Validate before calling
const providers = Object.entries(appConfig.speech.tts || {})
.filter(([k, v]) => k !== 'allowedAddresses' && v && Object.keys(v).length > 0);
if (providers.length === 0) {
throw new Error('TTS schema present but no provider populated');
} Prevention
- Reject empty placeholder provider objects in a config validator.
- Smoke-test TTS after config edits.
When it happens
Trigger: speech.tts is a non-falsy object whose only entries are `allowedAddresses` and/or provider keys mapped to empty objects.
Common situations: Placeholder config committed without values; subfields commented out leaving `{}`; YAML indentation producing an empty mapping.
Related errors
- No provider is set. Please set a provider.
- Multiple providers are set. Please set only one provider.
- Invalid provider
- Invalid provider
- Multiple providers are set. Please set only one provider.
AI-assisted analysis of danny-avila/LibreChat@5ff282f900 (2026-08-12).
Data as JSON: /api/errors/af6f9720e53d6fb7.
Report an issue: GitHub.