INNER CODE UNIT · TypeScript
MAX_REQUEST_BODY_BYTES
harvard-edge/cs249r_book · interviews/staffml/worker/src/index.ts:284
const MAX_REQUEST_BODY_BYTES = 16 * 1024; // 16 KB hard ceiling on POST body (ask endpoint)
const MAX_INTERVIEW_BODY_BYTES = 64 * 1024; // 64 KB for interview endpoint (transcript + question context)
const MAX_QUESTION_CHARS = 1000;
const MAX_CONTEXT_CHARS = 4000;
const MAX_ANSWER_CHARS = 4000;
const MAX_HISTORY_TURNS = 8;
const MAX_HISTORY_TURN_CHARS = 1000;
// Per-mode output ceilings. Tutor answers need room to walk through math
// and compare attempts; Socratic answers are capped tight on purpose.
const MAX_TOKENS_INTERVIEW = 200;
const MAX_TOKENS_STUDY = 600;
const MAX_TOKENS_CONDUCTOR = 800;
/**
* Strip the reserved data-block delimiters from user-controlled text
* before we interpolate it into a <scenario>/<canonical_answer>/
* <student_attempt> wrapper. Without this a student who types