{"record":{"id":"c42c9b8f8fa603fd","repo":"SillyTavern/SillyTavern","slug":"webllm-not-updated","errorCode":"webllm-not-updated","errorMessage":"WebLLM is not updated","messagePattern":"WebLLM is not updated","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"public/scripts/extensions/vectors/webllm.js","lineNumber":19,"sourceCode":"export class WebLlmVectorProvider {\n    /** @type {object?} WebLLM engine */\n    #engine = null;\n\n    constructor() {\n        this.#engine = null;\n    }\n\n    /**\n     * Check if WebLLM is available and up-to-date\n     * @throws {Error} If WebLLM is not available or not up-to-date\n     */\n    #checkWebLlm() {\n        if (!Object.hasOwn(SillyTavern, 'llm')) {\n            throw new Error('WebLLM is not available', { cause: 'webllm-not-available' });\n        }\n\n        if (typeof SillyTavern.llm.generateEmbedding !== 'function') {\n            throw new Error('WebLLM is not updated', { cause: 'webllm-not-updated' });\n        }\n    }\n\n    /**\n     * Initialize the engine with a model.\n     * @param {string} modelId Model ID to initialize the engine with\n     * @returns {Promise<void>} Promise that resolves when the engine is initialized\n     */\n    #initEngine(modelId) {\n        this.#checkWebLlm();\n        if (!this.#engine) {\n            this.#engine = SillyTavern.llm.getEngine();\n        }\n\n        return this.#engine.loadModel(modelId);\n    }\n\n    /**","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/SillyTavern/SillyTavern/blob/8172dcd0ee672d3cd9a5e5f7af134f91a45cd2b8/public/scripts/extensions/vectors/webllm.js#L1-L37","documentation":"Thrown by #checkWebLlm when SillyTavern.llm exists but lacks a generateEmbedding function. WebLLM is present (older version) but predates the embedding API, so the embedding workflow cannot run even though text generation might work.","triggerScenarios":"A partially-updated install: the WebLLM runtime registered SillyTavern.llm, but the version does not yet expose generateEmbedding.","commonSituations":"Updated the host but not the WebLLM extension, or vice versa; cached old WebLLM script served by the browser; mismatched extension/runtime versions.","solutions":["Update both SillyTavern and its WebLLM integration to matching, current versions.","Hard-reload (bypass cache) so a stale cached WebLLM script is replaced.","Check the browser console for the loaded WebLLM version.","Switch to a different vector source until the versions are aligned."],"exampleFix":"null","handlingStrategy":"type-guard","validationCode":"if (settings.source === 'webllm'\n  && !(Object.hasOwn(SillyTavern, 'llm') && typeof SillyTavern.llm.generateEmbedding === 'function')) {\n  // block: WebLLM present but too old for embeddings\n}","typeGuard":"const webLlmEmbedsReady = () =>\n  Object.hasOwn(SillyTavern, 'llm') && typeof SillyTavern.llm?.generateEmbedding === 'function';","tryCatchPattern":"null","preventionTips":["Keep SillyTavern and the WebLLM extension at matching versions.","Hard-reload to drop a stale cached WebLLM script.","Verify generateEmbedding exists before offering WebLLM embeddings."],"tags":["webllm","version-mismatch","embeddings","browser"],"backgroundTag":null,"analyzedSha":"8172dcd0ee672d3cd9a5e5f7af134f91a45cd2b8","analyzedAt":"2026-08-13T07:48:40.832Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}