fix(chat): handle direct RAG kwargs and isolate tool settings test

This commit is contained in:
Bingxi Zhao (Frank)
2026-09-27 11:17:47 +08:00
parent 176257b1f8
commit ffe74e2fbc
2 changed files with 4 additions and 1 deletions

View File

@@ -1330,7 +1330,9 @@ class AgenticLoopPipeline:
kwargs.setdefault("mode", "hybrid")
from deeptutor.services.llm.capabilities import supports_vision
kwargs["_vision_supported"] = supports_vision(self.binding, self.model)
kwargs["_vision_supported"] = supports_vision(
getattr(self, "binding", ""), getattr(self, "model", None)
)
elif tool_name == "kb_files":
# The report is read by the user as much as by the model, so it is
# written in the turn's language. Injected server-side; the tool

View File

@@ -23,6 +23,7 @@ async def test_list_builtin_tools_marks_toggleable_set(
can render the right control per row."""
settings_file = tmp_path / "interface.json"
monkeypatch.setattr(settings_router, "_settings_file", lambda: settings_file)
monkeypatch.setattr(interface_settings, "_interface_settings_file", lambda: settings_file)
response = await tools_router.list_builtin_tools()
by_name = {tool.name: tool for tool in response.tools}