Repository navigation
Making generated files consumable by the Code Interpreter tool without round-tripping through model context #16773
Aluriak
started this conversation in
Feature Requests & Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This follows up on #14366, which proposes generating files (e.g. from an MCP server's output) and attaching them to the conversation via a LibreChat
file_id, so they show up in the chat UI like any uploaded/generated file. That proposal is already on a good track and solves the "produce the file" half of the problem.This discussion is about the other half: making that file usable as an input to the Code Interpreter tool for further analysis, without its content ever passing through the model's context window. (that is : file being available to the code executor to run commands on it)
Context: as far as I can tell, today any data the Code Interpreter sandbox works with has to be loaded into context first (the model reads/writes the content as text/tokens). That's fine for small snippets, but it breaks down for real data analysis (large CSVs, generated datasets, intermediate artifacts from a multi-step agent pipeline, …). The cost and the context-window ceiling make it impractical past a certain size, even though the sandbox itself could perfectly well read the file directly from disk/storage.
What I'd like to figure out, concretely:
file_idas an input reference it resolves itself (e.g. by fetching from the configured file storage (S3, local, …)), or does every file necessarily get inlined into the request first?file_idcould be passed through and fetched directly by the sandbox runner, bypassing context entirely?Happy to help test/implement on our end ; we run our own Code Interpreter deployment (codeapi/sandbox-runner) and have a direct interest in this working end-to-end for agent-driven data analysis rather than just chat-attached files.
All reactions