{"record":{"id":"e786fca05a13d295","repo":"paperclipai/paperclip","slug":"source-content-is-sourcebytes-bytes-which-exce","errorCode":null,"errorMessage":"Source content is ${sourceBytes} bytes, which exceeds the configured LLM Wiki source limit of ${maxSourceBytes} bytes.","messagePattern":"Source content is (.+?) bytes, which exceeds the configured LLM Wiki source limit of (.+?) bytes\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/plugin-llm-wiki/src/wiki/core.ts","lineNumber":693,"sourceCode":"  ]);\n  return {\n    ...base,\n    maxCharacters: Math.min(base.maxCharacters, profile.cursor.maxWindowCharacters),\n    maxCharactersPerSource: Math.min(base.maxCharactersPerSource, profile.cursor.maxCharactersPerSource),\n  };\n}\n\nfunction estimateSourceCostCents(characters: number, costCentsPerThousandSourceCharacters: number): number {\n  if (characters <= 0 || costCentsPerThousandSourceCharacters <= 0) return 0;\n  return Math.ceil((characters / 1000) * costCentsPerThousandSourceCharacters);\n}\n\nasync function assertSourceWithinConfiguredLimit(ctx: PluginContext, companyId: string, contents: string) {\n  const config = await ctx.config.get(companyId);\n  const maxSourceBytes = normalizeMaxSourceBytes(config.maxSourceBytes);\n  const sourceBytes = byteLength(contents);\n  if (sourceBytes > maxSourceBytes) {\n    throw new Error(`Source content is ${sourceBytes} bytes, which exceeds the configured LLM Wiki source limit of ${maxSourceBytes} bytes.`);\n  }\n}\n\nfunction normalizeEventIngestionSettings(value: unknown): WikiEventIngestionSettings {\n  if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n    return { ...DEFAULT_EVENT_INGESTION_SETTINGS, sources: { ...DEFAULT_EVENT_INGESTION_SETTINGS.sources } };\n  }\n  const record = value as Record<string, unknown>;\n  const sources = record.sources && typeof record.sources === \"object\" && !Array.isArray(record.sources)\n    ? record.sources as Record<string, unknown>\n    : {};\n  const maxCharacters = typeof record.maxCharacters === \"number\" && Number.isFinite(record.maxCharacters)\n    ? Math.max(1000, Math.min(MAX_EVENT_SOURCE_CHARS, Math.floor(record.maxCharacters)))\n    : DEFAULT_EVENT_INGESTION_SETTINGS.maxCharacters;\n  return {\n    enabled: normalizeBoolean(record.enabled, DEFAULT_EVENT_INGESTION_SETTINGS.enabled),\n    sources: {\n      issues: normalizeBoolean(sources.issues, DEFAULT_EVENT_INGESTION_SETTINGS.sources.issues),","sourceCodeStart":675,"sourceCodeEnd":711,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/packages/plugins/plugin-llm-wiki/src/wiki/core.ts#L675-L711","documentation":"Error \"Source content is ${sourceBytes} bytes, which exceeds the configured LLM Wiki source limit of ${maxSourceBytes} bytes.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:694 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Trim the source content below the configured byte limit, or raise maxSourceBytes within the hard cap."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5716fe907e596ce73501408fc6efdb19fb61edf2","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}