{"record":{"id":"df18707e97cb5c39","repo":"mastra-ai/mastra","slug":"the-threads-generatetitle-option-has-been-moved-u","errorCode":null,"errorMessage":"The threads.generateTitle option has been moved. Use the top-level generateTitle option instead.","messagePattern":"The threads\\.generateTitle option has been moved\\. Use the top-level generateTitle option instead\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/memory/memory.ts","lineNumber":388,"sourceCode":"      if (indexConfig.ivf) createParams.indexConfig.ivf = indexConfig.ivf;\n      if (indexConfig.hnsw) createParams.indexConfig.hnsw = indexConfig.hnsw;\n    }\n\n    // Request btree indexes on metadata fields used for filtering\n    // This avoids sequential scans on large tables when querying by thread_id or resource_id\n    createParams.metadataIndexes = ['thread_id', 'resource_id'];\n\n    await this.vector.createIndex(createParams);\n    return { indexName };\n  }\n\n  public getMergedThreadConfig(config?: MemoryConfigInternal): MemoryConfigInternal {\n    if (config?.workingMemory && typeof config.workingMemory === 'object' && 'use' in config.workingMemory) {\n      throw new Error('The workingMemory.use option has been removed. Working memory always uses tool-call mode.');\n    }\n\n    if (config?.threads?.generateTitle !== undefined) {\n      throw new Error(\n        'The threads.generateTitle option has been moved. Use the top-level generateTitle option instead.',\n      );\n    }\n\n    const mergedConfig = deepMerge(this.threadConfig, config || {});\n\n    if (\n      typeof config?.workingMemory === 'object' &&\n      config.workingMemory?.schema &&\n      typeof mergedConfig.workingMemory === 'object'\n    ) {\n      mergedConfig.workingMemory.schema = config.workingMemory.schema;\n    }\n\n    return mergedConfig;\n  }\n\n  estimateTokens(text: string): number {","sourceCodeStart":370,"sourceCodeEnd":406,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/memory/memory.ts#L370-L406","documentation":"The threads.generateTitle option was relocated to a top-level generateTitle option in Memory config. getMergedThreadConfig throws this Error when a config still nests generateTitle under threads, preventing silent misconfiguration after the API move.","triggerScenarios":"Passing { threads: { generateTitle: true } } in Memory options or any config passed to getMergedThreadConfig.","commonSituations":"Upgrading across a Mastra version where generateTitle moved; following older documentation or tutorials; code generators emitting the old nested shape.","solutions":["Move generateTitle from threads to the top level of your memory options.","Search configs for 'threads' blocks containing generateTitle after upgrading.","Consult current Mastra memory docs for the new generateTitle placement."],"exampleFix":"// before\noptions: { threads: { generateTitle: true } }\n\n// after\noptions: { generateTitle: true }","handlingStrategy":"validation","validationCode":"function assertNoNestedGenerateTitle(options) {\n  if (options?.threads && 'generateTitle' in options.threads) {\n    throw new Error('Move threads.generateTitle to top-level generateTitle');\n  }\n}","typeGuard":"function usesMovedGenerateTitle(cfg) {\n  return !!cfg?.threads && 'generateTitle' in cfg.threads;\n}","tryCatchPattern":null,"preventionTips":["After upgrades, grep for threads: { generateTitle.","Rely on TypeScript exhaustively typed Memory options to flag unknown nested fields.","Follow current Mastra memory migration notes when bumping major versions."],"tags":["memory","threads","deprecation","breaking-change"],"backgroundTag":"moved-option","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}