{"record":{"id":"c8dae209887c9c71","repo":"moeru-ai/airi","slug":"failed-to-fetch-voices-response-statustext","errorCode":null,"errorMessage":"Failed to fetch voices: ${response.statusText}","messagePattern":"Failed to fetch voices: (.+?)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/stage-ui/src/libs/providers/providers/index-tts-vllm/index.ts","lineNumber":81,"sourceCode":"\n          return { errors: [], reason: '', reasonKey: '', valid: true }\n        },\n      }),\n    ],\n  },\n  extraMethods: {\n    listModels: async () => [{\n      id: 'IndexTTS-1.5',\n      name: 'IndexTTS-1.5',\n      provider: 'index-tts-vllm',\n      description: 'Default model for Index-TTS vLLM deployment',\n      contextLength: 0,\n      deprecated: false,\n    }],\n    listVoices: async (config) => {\n      const response = await fetch(voicesUrl(config))\n      if (!response.ok)\n        throw new Error(`Failed to fetch voices: ${response.statusText}`)\n\n      const voices = await response.json() as Record<string, unknown>\n      return Object.keys(voices).map(voice => ({\n        id: voice,\n        name: voice,\n        provider: 'index-tts-vllm',\n        languages: [{ code: 'cn', title: 'Chinese' }, { code: 'en', title: 'English' }],\n      }))\n    },\n  },\n})\n","sourceCodeStart":63,"sourceCodeEnd":93,"githubUrl":"https://github.com/moeru-ai/airi/blob/27111382b4a79a7e983289d6e983a06af185ed0f/packages/stage-ui/src/libs/providers/providers/index-tts-vllm/index.ts#L63-L93","documentation":"Thrown by listVoices() in the IndexTTS vLLM provider when the GET to the voices endpoint returns non-2xx. The voices endpoint is `${baseUrl}audio/voices`; a non-ok response means the IndexTTS vLLM server is unreachable or the base URL is wrong. Only the HTTP statusText is included (no body parsing).","triggerScenarios":"fetch(voicesUrl(config)) returns non-ok. The IndexTTS vLLM server is not running, the baseUrl points at the wrong host/port/path, the /audio/voices route is absent in the deployed version, or the server returned an error status.","commonSituations":"IndexTTS vLLM container not started. baseUrl left at default http://localhost:11996/tts/ but the server runs elsewhere. Server version without the /audio/voices route. Port mismatch / firewall blocking localhost. CORS in browser.","solutions":["Confirm the IndexTTS vLLM server is running and healthy at the configured baseUrl.","Verify baseUrl is correct (default http://localhost:11996/tts/); adjust port/host to match the deployment.","curl ${baseUrl}audio/voices directly to confirm the route exists and returns 200 before configuring the provider.","If the deployed server lacks /audio/voices, upgrade the IndexTTS vLLM image or pick a version that exposes it."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"async function isIndexTtsVoicesReachable(baseUrl: string, signal?: AbortSignal): Promise<boolean> {\n  try {\n    const res = await fetch(`${baseUrl}audio/voices`, { signal })\n    return res.ok\n  }\n  catch {\n    return false\n  }\n}\n// before configuring the provider / calling listVoices:\nif (!await isIndexTtsVoicesReachable(config.baseUrl)) {\n  // IndexTTS vLLM not reachable; do not call listVoices\n}","typeGuard":"null","tryCatchPattern":"try {\n  const voices = await providerIndexTtsVllm.extraMethods!.listVoices!(config)\n}\ncatch (err) {\n  if (err instanceof Error && err.message.startsWith('Failed to fetch voices')) {\n    // check IndexTTS server health and baseUrl; the validator runs the same check at config time\n  }\n  else throw err\n}","preventionTips":["Confirm the IndexTTS vLLM server is running at baseUrl before configuring the provider.","Use the config validator (validateConfig) which already probes /audio/voices with a 5s timeout.","Match the baseUrl port/host to the actual deployment (default http://localhost:11996/tts/)."],"tags":["network","indextts","tts","vllm","configuration","api-error"],"backgroundTag":null,"analyzedSha":"27111382b4a79a7e983289d6e983a06af185ed0f","analyzedAt":"2026-08-12T18:33:34.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}