paperclipai/paperclip · error
Source content is bytes, which exceeds the configured LLM…
Error message
Source content is ${sourceBytes} bytes, which exceeds the configured LLM Wiki source limit of ${maxSourceBytes} bytes. What it means
Error "Source content is ${sourceBytes} bytes, which exceeds the configured LLM Wiki source limit of ${maxSourceBytes} bytes." thrown in paperclipai/paperclip.
Solutions
- Trim the source content below the configured byte limit, or raise maxSourceBytes within the hard cap.
When it happens
Trigger: Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:694 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@5716fe907e (2026-08-18).
Data as JSON: /api/errors/e786fca05a13d295.
Report an issue: GitHub.
Appendix: source
Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:693
]);
return {
...base,
maxCharacters: Math.min(base.maxCharacters, profile.cursor.maxWindowCharacters),
maxCharactersPerSource: Math.min(base.maxCharactersPerSource, profile.cursor.maxCharactersPerSource),
};
}
function estimateSourceCostCents(characters: number, costCentsPerThousandSourceCharacters: number): number {
if (characters <= 0 || costCentsPerThousandSourceCharacters <= 0) return 0;
return Math.ceil((characters / 1000) * costCentsPerThousandSourceCharacters);
}
async function assertSourceWithinConfiguredLimit(ctx: PluginContext, companyId: string, contents: string) {
const config = await ctx.config.get(companyId);
const maxSourceBytes = normalizeMaxSourceBytes(config.maxSourceBytes);
const sourceBytes = byteLength(contents);
if (sourceBytes > maxSourceBytes) {
throw new Error(`Source content is ${sourceBytes} bytes, which exceeds the configured LLM Wiki source limit of ${maxSourceBytes} bytes.`);
}
}
function normalizeEventIngestionSettings(value: unknown): WikiEventIngestionSettings {
if (!value || typeof value !== "object" || Array.isArray(value)) {
return { ...DEFAULT_EVENT_INGESTION_SETTINGS, sources: { ...DEFAULT_EVENT_INGESTION_SETTINGS.sources } };
}
const record = value as Record<string, unknown>;
const sources = record.sources && typeof record.sources === "object" && !Array.isArray(record.sources)
? record.sources as Record<string, unknown>
: {};
const maxCharacters = typeof record.maxCharacters === "number" && Number.isFinite(record.maxCharacters)
? Math.max(1000, Math.min(MAX_EVENT_SOURCE_CHARS, Math.floor(record.maxCharacters)))
: DEFAULT_EVENT_INGESTION_SETTINGS.maxCharacters;
return {
enabled: normalizeBoolean(record.enabled, DEFAULT_EVENT_INGESTION_SETTINGS.enabled),
sources: {
issues: normalizeBoolean(sources.issues, DEFAULT_EVENT_INGESTION_SETTINGS.sources.issues),View on GitHub (pinned to 5716fe907e)