We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 926a536 commit f5a62bdCopy full SHA for f5a62bd
scripts/constants.ts
@@ -120,11 +120,11 @@ export function getModelContextLimit(modelName: string): number {
120
return 128000;
121
}
122
123
-/** Estimated max chars per chunk (context limit / 3.5 chars per token, with 20% buffer) */
+/** Estimated max chars per chunk (context limit / 3.5 chars per token, with 50% buffer) */
124
export function getMaxChunkChars(modelName: string): number {
125
const contextLimit = getModelContextLimit(modelName);
126
- // Reserve ~20% for prompt overhead and response
127
- return Math.floor((contextLimit * 3.5) / 1.2);
+ // Reserve ~50% for prompt overhead, title, and response to be safe
+ return Math.floor((contextLimit * 3.5) / 1.5);
128
129
130
/**
0 commit comments