{"record":{"id":"ca9b904a3e65660f","repo":"moeru-ai/airi","slug":"failed-to-fetch-voices-response-statustext-ca9b90","errorCode":null,"errorMessage":"Failed to fetch voices: ${response.statusText}","messagePattern":"Failed to fetch voices: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/provider-inference/src/providers/local/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/f679616c34f1cf6d282c8d64264242af944b3fed/packages/provider-inference/src/providers/local/index-tts-vllm/index.ts#L63-L93","documentation":"The index-tts-vllm provider's listVoices fetches the voice list from the local vLLM server. If the server responds with a non-ok HTTP status, this error is thrown with the statusText. It indicates the configured IndexTTS vLLM endpoint rejected or failed the request.","triggerScenarios":"The vLLM server returns 404 (wrong path/port), 500 (model not loaded), 503 (server starting), or the request hits a wrong service/proxy returning an error status.","commonSituations":"IndexTTS vLLM service not fully started yet; incorrect baseUrl/port in config; server crashed or model still loading; a reverse proxy in front returning 404/502; firewall or wrong host in a container setup.","solutions":["Check the vLLM server is running and healthy (curl the voices endpoint directly).","Verify the configured baseUrl/points to the correct host and port.","Wait for model loading to finish and retry; add retry/backoff for 503 during startup.","Inspect vLLM server logs for the corresponding 5xx cause.","Check proxy/firewall rules if the service runs in another container/host."],"exampleFix":"// before\nbaseUrl: 'http://localhost:8001' // wrong port\n// after\nbaseUrl: 'http://localhost:8000' // actual vLLM server port","handlingStrategy":"retry","validationCode":"const health = await fetch(voicesUrl).then(r => r.ok)\nif (!health) throw new Error('IndexTTS vLLM endpoint unreachable before listing voices')","typeGuard":null,"tryCatchPattern":"try { voices = await provider.listVoices(config) } catch (e) {\n  if (/Failed to fetch voices/.test(e.message)) await retryWithBackoff(() => provider.listVoices(config))\n  else throw e\n}","preventionTips":["Health-check the vLLM endpoint before calling","Retry during model loading (503)","Confirm baseUrl/port configuration","Check server logs and proxy rules on persistent failures"],"tags":["network","http","tts","local-server"],"backgroundTag":"http-error-response","analyzedSha":"f679616c34f1cf6d282c8d64264242af944b3fed","analyzedAt":"2026-09-08T13:18:15.005Z","contentChangedAt":"2026-09-08T13:18:15.005Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}