SillyTavern/SillyTavern · error · Error

HTTP ${response.status}: ${await response.text()}

Error message

HTTP ${response.status}: ${await response.text()}

What it means

Thrown by fetchCharacterList() in GSVITtsProvider when GET {provider_endpoint}/character_list returns non-OK. It reads the body as text() and embeds it in the message. The provider uses the GSVI Inference server (default http://127.0.0.1:5000).

Source

Thrown at public/scripts/extensions/tts/gsvi.js:57

        cha_name: '',
        character_emotion: 'default',

        speed: 1,

        top_k: 6,
        top_p: 0.85,
        temperature: 0.75,
        batch_size: 10,

        stream: false,
        stream_chunk_size: 100,
    };

    // Added new methods to obtain characters and emotions
    async fetchCharacterList() {
        const response = await fetch(this.settings.provider_endpoint + '/character_list');
        if (!response.ok) {
            throw new Error(`HTTP ${response.status}: ${await response.text()}`);
        }
        const characterList = await response.json();
        this.characterList = characterList;
        this.voices = Object.keys(characterList);
    }


    get settingsHtml() {
        let html = `
        <label for="gsvi_api_language">Text Language</label>
        <select id="gsvi_api_language">`;

        for (let language in this.languageLabels) {
            if (this.languageLabels[language] == this.settings?.language) {
                html += `<option value="${this.languageLabels[language]}" selected="selected">${language}</option>`;
                continue;
            }

View on GitHub (pinned to 8172dcd0ee)

Solutions

  1. Start the GSVI Inference server (default port 5000) and verify GET {endpoint}/character_list returns JSON in a browser.
  2. Confirm provider_endpoint in the extension settings matches the running server.
  3. Wait for the GSVI server to finish model loading before refreshing voices.
  4. Update or rebuild GSVI from https://github.com/X-T-E-R/GPT-SoVITS-Inference if /character_list is missing.

Example fix

// before
if (!response.ok) {
    throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}

// after
if (!response.ok) {
    const detail = await response.text().catch(() => '<no body>');
    throw new Error(`GSVI /character_list HTTP ${response.status}: ${detail}`);
}
Defensive patterns

Strategy: validation

Validate before calling

const url = new URL(this.settings.provider_endpoint + '/character_list');
if (url.hostname === 'localhost' || url.hostname === '127.0.0.1') {
  console.warn('GSVI endpoint is loopback; ensure the server is running');
}

Type guard

function isLocalhost(url) {
  try { return ['localhost','127.0.0.1'].includes(new URL(url).hostname); }
  catch { return false; }
}

Try / catch

try {
  await provider.fetchCharacterList();
} catch (err) {
  console.error('GSVI character list failed:', err.message);
  toastr.error('GSVI server unreachable on ' + provider.settings.provider_endpoint);
}

Prevention

When it happens

Trigger: Calling fetchCharacterList() (during voice loading/refresh) while the GSVI server is not running on the configured port, the /character_list route is absent, or the server returns an error. Because no toastr is shown here, the failure surfaces only as a thrown error to the caller.

Common situations: GSVI Inference server not started, wrong provider_endpoint, the server still booting, or a GSVI version without /character_list.

Related errors


AI-assisted analysis of SillyTavern/SillyTavern@8172dcd0ee (2026-08-13). Data as JSON: /api/errors/c82651ed9176e7a9. Report an issue: GitHub.