fix(read_file): stop promising anydoc conversion in the tool schema

The read_file description added in #79781 states that PDF, legacy
Office, OpenDocument, RTF, and EPUB convert via the optional anydoc
converter, unconditionally. Conversion actually depends on the lazy
install succeeding, security.allow_lazy_installs, and the file being
readable from the Hermes host, so the schema overpromises and the model
learns to expect conversion in environments that can never provide it.

The description now says these formats convert when the optional anydoc
converter is available, and that the auto-install applies where
installs are permitted.
This commit is contained in:
Adolanium 2026-08-06 07:44:07 +03:00 committed by Teknium
parent ffdbc883ee
commit ff3793fdff
1 changed files with 1 additions and 1 deletions

View File

@ -2158,7 +2158,7 @@ def _check_file_reqs():
READ_FILE_SCHEMA = {
"name": "read_file",
"description": "Read a text file with line numbers and pagination. Use this instead of cat/head/tail in terminal. Output format: 'LINE_NUM|CONTENT'. Suggests similar filenames if not found. Use offset and limit for large files. Reads exceeding ~100K characters are truncated on a line boundary and return a next_offset; continue with offset to read the rest. Jupyter notebooks (.ipynb), Word documents (.docx), and Excel workbooks (.xlsx) are auto-extracted to readable text; PDF, legacy Office (.doc/.ppt/.xls), OpenDocument, RTF, and EPUB convert too via the optional anydoc converter (auto-installed on first use). NOTE: Cannot read images or other binary files — use vision_analyze for images.",
"description": "Read a text file with line numbers and pagination. Use this instead of cat/head/tail in terminal. Output format: 'LINE_NUM|CONTENT'. Suggests similar filenames if not found. Use offset and limit for large files. Reads exceeding ~100K characters are truncated on a line boundary and return a next_offset; continue with offset to read the rest. Jupyter notebooks (.ipynb), Word documents (.docx), and Excel workbooks (.xlsx) are auto-extracted to readable text; PDF, legacy Office (.doc/.ppt/.xls), OpenDocument, RTF, and EPUB convert too when the optional anydoc converter is available (auto-installed on first use where installs are permitted). NOTE: Cannot read images or other binary files — use vision_analyze for images.",
"parameters": {
"type": "object",
"properties": {