Repository navigation
📊 fix: Read Run Code Spreadsheets Natively at Upload Instead of Through RAG - #103
Conversation
…gh RAG Under automatic reading, a spreadsheet attachment that Run Code will read is parsed with the built-in readers at upload and stored as `none` with its text, skipping the RAG /text call. A file the readers cannot parse keeps the RAG path. After a RAG failure, natively readable text (CSV/TSV/JSON) is read natively.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Summary
Under
llmDeliveryPolicy: automatic, a spreadsheet (xlsx, csv, …) attached to a chat that can run code still had its text extracted at upload through the RAG API/textendpoint, even though Run Code reads the original file. On Sjúkra a large pivot workbook made/textrun past its 5-minute timeout, the upload waited the full 5 minutes, and the jammed RAG API blocked every other upload and File Search request (2026-11-03 08:34–09:56).When automatic reading would send the spreadsheet to Run Code and the chat can run code (saved agent with
execute_codeafter capability and role checks, or for an ephemeral agent the capability plus the Run Code grant), the upload now reads the text with the built-in readers (SheetJS for workbooks, native text for CSV/TSV/JSON) and stores the file asllmDeliveryPath: 'none'with that text. RAG is not called. A later turn without Run Code re-resolves the record to'text'and delivers the stored text, so the file never reaches nothing. If the built-in reader cannot read the file (over 15 MB, unreadable, text over the storage cap), the upload takes today's path unchanged.Also: when RAG
/textfails on a CSV/TSV/JSON upload, the fallback now reads native text instead of handing it to the document parser, which rejected CSV (Unsupported file type in document parser: text/csv).Unchanged: classic endpoints,
legacyFileUploadUX, chosen destinations, agent resource uploads, an active file policy, per-typedefaultLLMDeliveryPathoverrides.Type of change
Testing
api/Files services and routes, BaseClient, agents client: 1085 passed.packages/apifiles, agents/files, initialize, attachments, client, storage: 1810 passed (emf.helper.tshas no tests;libreoffice.spec.tsneeds LibreOffice on PATH).packages/data-providerresolver and file-config specs: 385 passed.tsc --noEmitand eslint clean.sheet_to_csvon 1 CPU: 10 MB / 9.9M-char workbook 1.55 s, 15 MB 2.66 s (the live Sjúkra workbook extracts about 9.45M characters).Risk / compatibility
'text'records, so these spreadsheets no longer show it.