Files
iGavroche-rocm-ninodes/docs
iGavroche f4e79cf663 v2.3.31: ROCmLLMChat executes file and shell tools
A system prompt cannot give the model filesystem access: it can only make it
hallucinate file contents. The node now sends the tools in OpenAI `tools`
form, runs whatever the model calls, feeds each result back as a `tool`
message and loops until the model answers or max_tool_steps is reached.

Toolsets: read (read_file/list_dir/search_files), read_command, read_write
(+ write_file) and full. File tools are confined to path_root (default the
ComfyUI directory) with realpath containment, so `..` and symlinks cannot
escape. run_command is a persistent bash session where cd and export carry
across calls of one execution; it runs as the ComfyUI user with no sandbox,
so it is opt-in. Tool errors come back as text so the model can retry.

With a toolset and an empty system_prompt the node injects an agent prompt
naming the real host, root and enabled tools and forbidding invented file
contents or command output. thinking now accumulates reasoning_content
across steps. Stdlib only, no new dependency.
2026-10-25 15:38:22 -04:00
..