mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 07:30:05 +08:00
Stop the Ollama a vector KB embeds against, ask a question, and the model is told "An unknown error occurred while executing rag." The adapter had already written the answer — `Cannot connect to Ollama at http://localhost:11434. Make sure Ollama is running. Start it with: ollama serve` — and the dispatcher was holding it (#1356). `unknown_error_message_factory` took the tool name and nothing else, so no caller could have done better. Four capabilities each wrote their own message from that one argument and three of them called the result unknown; the fourth, pageindex, restated the dispatcher's own default minus the cause. The name was the bug: it presumed a cause the runtime always had. It is now `ToolErrorMessageFactory`, `(tool, cause) -> str`, and the key plus the English wording live once in `tool_error_message_factory`, which each capability wraps around its own `_t`. Capabilities keep their translations and can no longer keep the cause out of them. pageindex passes nothing and takes the default. A bundle predating the new `notices.tool_error` key falls back to English rather than to silence about what went wrong, which is the reason the fallback carries the cause too. This is the same shape as read_skill answering "skill not found" when the skill resolved and only the file was missing (#1347): a failure the caller cannot see has no way out, and the model spends its rounds inventing one. The regression test is the reporter's turn — a `rag` call raising the real adapter error — and asserts the endpoint and the remediation reach the role=tool message.