Expand description
Typed file outputs from agentic runs.
Structs§
- File
- A file produced by an agentic run.
- File
Source - Where a file was produced.
- File
Store - Requested
File - A file the runtime asks the model to produce. Surfaces as
File(orFileContent::Errorif missing).
Enums§
- File
Content - File body. Serialized untagged so the wire shape is flat.
Constants§
- DEFAULT_
FILE_ TTL - Per-entry TTL. Matches the agentic session default.
- MODEL_
INLINE_ BYTES - Max text bytes shown to the model inline. Above this it gets a preview + id and calls
read_file. - READ_
FILE_ MAX_ SLICE_ CHARS - Per-call cap for
read_file. Larger requests get truncated. - WIRE_
EMBED_ LIMIT_ BYTES - Max body size embedded in responses. Above this the file ships reference-only; clients fetch via
GET /v1/files/{id}.
Functions§
- compose_
tool_ response_ with_ files - Append a metadata-only
Files:summary. Bodies are never inlined; the model fetches viaread_file(id). - format_
from_ name - Lowercase extension without the leading dot, or
Noneif there’s no extension. - is_
text_ mime - True for mime types we can ship as utf-8 text.
- merge_
required_ outputs_ into_ args - Merge required files into the tool call’s
outputsarg so the executor reads them even if the model omitted them. - mime_
for_ format - Mime type for a format string. Falls back to
application/octet-stream. - required_
files_ tool_ addendum - Text appended to the code-execution tool’s
descriptionso the model sees the required-files contract.Noneif no required files. - tool_
file_ to_ file - Convert a
ToolFileto aFilewith full body. Elision happens later viaFile::elide_for_wire.