Skip to main content

MAX_FILE_BYTES

Constant MAX_FILE_BYTES 

Source
pub const MAX_FILE_BYTES: u64 = _ /* 1_048_576u64 */;
Expand description

Maximum file size allowed by ReadFileTool (1 MiB).

Why: LLM context windows are finite; a 1 GiB file would freeze the loop. Rejecting early gives the agent a clear error rather than an OOM or timeout. What: Constant used both for the runtime guard and exposed via the schema description. Test: read_returns_error_on_oversized_file.