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.stt` block exists (so it passed the line-154 falsy check) but after filtering out `allowedAddresses` and empty provider objects, zero providers remain. This means the schema shell is present but every provider entry is an empty object — e.g. `stt: { openai: {} }`.

Source

Thrown at api/server/services/Files/Audio/STTService.js:165

      req.config ??
      (await getAppConfig({
        role: req?.user?.role,
        userId: req?.user?.id,
        tenantId: req?.user?.tenantId,
      }));
    const sttSchema = appConfig?.speech?.stt;
    if (!sttSchema) {
      throw new Error(
        'No STT schema is set. Did you configure STT in the custom config (librechat.yaml)?',
      );
    }

    const providers = Object.entries(sttSchema).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.',
      );
    }

    const [provider, schema] = providers[0];
    return [provider, schema, sttSchema.allowedAddresses];
  }

  /**
   * Recursively removes undefined properties from an object.
   * @param {Object} obj - The object to clean.
   * @returns {void}
   */
  removeUndefined(obj) {
    Object.keys(obj).forEach((key) => {
      if (obj[key] && typeof obj[key] === 'object') {

View on GitHub (pinned to 5ff282f900)

Solutions

  1. Populate at least one provider with its required fields (e.g. openai.apiKey, or azureOpenAI.instanceName + deploymentName + apiKey).
  2. Reload the config / restart the API server.

Example fix

# before
speech:
  stt:
    openai: {}

# after
speech:
  stt:
    openai:
      apiKey: '${STT_API_KEY}'
      model: 'whisper-1'
Defensive patterns

Strategy: validation

Validate before calling

const providers = Object.entries(appConfig.speech.stt || {})
  .filter(([k, v]) => k !== 'allowedAddresses' && v && Object.keys(v).length > 0);
if (providers.length === 0) {
  throw new Error('STT schema present but no provider populated');
}

Prevention

When it happens

Trigger: speech.stt 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; provider subfields commented out leaving `{}`; YAML indentation producing an empty mapping.

Related errors


AI-assisted analysis of danny-avila/LibreChat@5ff282f900 (2026-08-12). Data as JSON: /api/errors/80f102bce842f692. Report an issue: GitHub.