{"record":{"id":"5b66ae02b740499a","repo":"Mintplex-Labs/anything-llm","slug":"the-native-whisper-model-failed-to-download-from-t","errorCode":null,"errorMessage":"The native whisper model failed to download from the huggingface.co CDN. Your internet connection may be unstable or blocked by Huggingface.co - you will need to download the model manually and place it in the storage/models folder to use local Whisper transcription.","messagePattern":"The native whisper model failed to download from the huggingface\\.co CDN\\. Your internet connection may be unstable or blocked by Huggingface\\.co - you will need to download the model manually and place it in the storage/models folder to use local Whisper transcription\\.","errorType":"exception","errorClass":"Error","httpStatus":200,"severity":"error","filePath":"collector/utils/WhisperProviders/localWhisper.js","lineNumber":158,"sourceCode":"                    data.file\n                  } ${~~data?.progress}%`\n                );\n              },\n            }\n          : {}),\n      });\n    } catch (error) {\n      let errMsg = error.message;\n      if (errMsg.includes(\"Could not locate file\")) {\n        errMsg =\n          \"The native whisper model failed to download from the huggingface.co CDN. Your internet connection may be unstable or blocked by Huggingface.co - you will need to download the model manually and place it in the storage/models folder to use local Whisper transcription.\";\n      }\n\n      this.#log(\n        `Failed to load the native whisper model: ${errMsg}`,\n        error.stack\n      );\n      throw new Error(errMsg);\n    }\n  }\n\n  async processFile(fullFilePath, filename) {\n    try {\n      const audioDataPromise = new Promise((resolve) =>\n        this.#convertToWavAudioData(fullFilePath).then((audioData) =>\n          resolve(audioData)\n        )\n      );\n      const [audioData, transcriber] = await Promise.all([\n        audioDataPromise,\n        this.client(),\n      ]);\n\n      if (!audioData) {\n        this.#log(`Failed to parse content from ${filename}.`);\n        return {","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/collector/utils/WhisperProviders/localWhisper.js#L140-L176","documentation":"QDrant.namespace(client, namespace) is the internal helper that fetches collection stats; it throws when the namespace argument is falsy because there is no meaningful stat for an unnamed collection. In practice this fires when an internal caller (e.g., 'namespace-stats' in server/utils/vectorDbProviders/qdrant/index.js) or custom code passes null/undefined/'' instead of a workspace slug.","triggerScenarios":"Calling vectorDB.namespace(client, null) directly; 'namespace-stats' invoked without a namespace already fails earlier with 'namespace required', so reaching this throw means a direct/internal call site skipped validation; passing an empty string after destructuring a default of null.","commonSituations":"Plugin or script code calling provider internals rather than the public API; refactor that dropped the namespace guard at one call site; default parameter null leaking through when reqBody is empty.","solutions":["Pass a non-empty namespace string (the workspace slug) whenever calling namespace().","Prefer the public surface ('namespace-stats', hasNamespace) which validates input, over the internal two-argument helper.","Audit custom call sites for destructuring { namespace = null } followed by an unguarded this.namespace(client, namespace).","Add a tiny wrapper that validates and gives a clearer error before delegating."],"exampleFix":"// before\nconst stats = await qdrant.namespace(client, undefined);\n\n// after\nif (typeof namespace !== 'string' || namespace.length === 0) {\n  throw new Error('namespace must be a non-empty workspace slug');\n}\nconst stats = await qdrant.namespace(client, namespace);","handlingStrategy":"validation","validationCode":"function requireNamespace(namespace) {\n  if (typeof namespace !== 'string' || namespace.trim().length === 0) {\n    throw new Error('namespace must be a non-empty workspace slug');\n  }\n  return namespace;\n}\n\nconst stats = await qdrant.namespace(client, requireNamespace(namespace));","typeGuard":"function isNonEmptyNamespace(ns) {\n  return typeof ns === 'string' && ns.trim().length > 0;\n}","tryCatchPattern":"try {\n  const stats = await qdrant.namespace(client, namespace);\n} catch (e) {\n  if (/No namespace value provided/.test(e.message)) {\n    // caller passed null/'' — a programming bug: fix at the call site, don't retry\n    throw new TypeError(`namespace() called with: ${String(namespace)}`);\n  }\n  throw e;\n}","preventionTips":["Call the public API ('namespace-stats') instead of provider internals; it validates for you.","Centralize a requireNamespace() helper and use it at every call site.","Default to failing requests with 400s at the route layer before internals are reached.","Unit-test internal helpers with null/undefined/'' inputs to keep guards honest."],"tags":["qdrant","namespace","internal-api","request-validation"],"backgroundTag":"missing-required-argument","analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}