{"record":{"id":"1cb1a7e1cebcfc65","repo":"Mintplex-Labs/anything-llm","slug":"no-openai-compatible-endpoint-was-set-please-set","errorCode":null,"errorMessage":"No OpenAI compatible endpoint was set. Please set this to use your OpenAI compatible STT service.","messagePattern":"No OpenAI compatible endpoint was set\\. Please set this to use your OpenAI compatible STT service\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/SpeechToText/openAiGeneric/index.js","lineNumber":7,"sourceCode":"const { convertAudioBufferToWav } = require(\"../helpers\");\nconst path = require(\"path\");\n\nclass GenericOpenAiSTT {\n  constructor() {\n    if (!process.env.STT_OPEN_AI_COMPATIBLE_ENDPOINT)\n      throw new Error(\n        \"No OpenAI compatible endpoint was set. Please set this to use your OpenAI compatible STT service.\"\n      );\n    if (!process.env.STT_OPEN_AI_COMPATIBLE_KEY)\n      this.#log(\n        \"No OpenAI compatible API key was set. You might need to set this to use your OpenAI compatible STT service.\"\n      );\n    if (!process.env.STT_OPEN_AI_COMPATIBLE_MODEL)\n      this.#log(\n        \"No OpenAI compatible STT model was set. We will use the default model 'whisper-1'. This may not exist or be valid for your selected endpoint.\"\n      );\n\n    const { OpenAI: OpenAIApi } = require(\"openai\");\n    this.openai = new OpenAIApi({\n      apiKey: process.env.STT_OPEN_AI_COMPATIBLE_KEY || null,\n      baseURL: process.env.STT_OPEN_AI_COMPATIBLE_ENDPOINT,\n    });\n    this.model = process.env.STT_OPEN_AI_COMPATIBLE_MODEL ?? \"whisper-1\";\n    this.#log(","sourceCodeStart":1,"sourceCodeEnd":25,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/526360e320da9d1b36074be5ed64fe76e5bbfbbd/server/utils/SpeechToText/openAiGeneric/index.js#L1-L25","documentation":"Thrown by the GenericOpenAiSTT constructor when process.env.STT_OPEN_AI_COMPATIBLE_ENDPOINT is falsy. This provider targets any OpenAI-compatible STT endpoint and only the endpoint is mandatory; the key and model are optional (logged as warnings) and default to null / whisper-1. Without a base URL the OpenAI client cannot be constructed.","triggerScenarios":"STT_PROVIDER=generic-openai is set but STT_OPEN_AI_COMPATIBLE_ENDPOINT is missing/empty; only the key/model were set; the var was renamed.","commonSituations":"Self-hosted OpenAI-compatible server (vLLM, LocalAI, etc.) without the endpoint configured; typos in the env name; switching to generic-openai without completing its env block.","solutions":["Add STT_OPEN_AI_COMPATIBLE_ENDPOINT=<base-url> to .env and restart.","Also set STT_OPEN_AI_COMPATIBLE_KEY if your endpoint requires auth, and STT_OPEN_AI_COMPATIBLE_MODEL to match the server's transcription model.","Verify the endpoint exposes an OpenAI-compatible /audio/transcriptions route.","In Docker, pass the variable to the container."],"exampleFix":"# before\nSTT_PROVIDER=generic-openai\n# STT_OPEN_AI_COMPATIBLE_ENDPOINT missing\n\n# after\nSTT_PROVIDER=generic-openai\nSTT_OPEN_AI_COMPATIBLE_ENDPOINT=http://localhost:8080/v1\nSTT_OPEN_AI_COMPATIBLE_KEY=optional\nSTT_OPEN_AI_COMPATIBLE_MODEL=whisper-1","handlingStrategy":"validation","validationCode":"if (\n  process.env.STT_PROVIDER === \"generic-openai\" &&\n  !process.env.STT_OPEN_AI_COMPATIBLE_ENDPOINT\n) {\n  throw new Error(\n    \"STT_PROVIDER is 'generic-openai' but STT_OPEN_AI_COMPATIBLE_ENDPOINT is not set.\"\n  );\n}","typeGuard":null,"tryCatchPattern":"try {\n  return new GenericOpenAiSTT();\n} catch (e) {\n  if (/No OpenAI compatible endpoint/i.test(e.message)) {\n    logger.error(\"Set STT_OPEN_AI_COMPATIBLE_ENDPOINT to your compatible STT base URL, then restart.\");\n  }\n  throw e;\n}","preventionTips":["Only the endpoint is mandatory; set key/model too when your server needs them.","Confirm the endpoint serves an OpenAI-compatible /audio/transcriptions route.","Restart after editing .env."],"tags":["stt","openai-compatible","configuration","environment","provider-selection"],"backgroundTag":null,"analyzedSha":"526360e320da9d1b36074be5ed64fe76e5bbfbbd","analyzedAt":"2026-08-13T01:45:47.170Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}