mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 12:33:16 -05:00
A research profile asks the model in its system prompt to cite its sources, but a model can answer from a search result without naming a single link, and the client never sees the server-side tool results that held them. evidence_check.sources appends one line with the distinct http(s) URLs returned by the request's successful MCP tool calls (at most five, in order of appearance) when the final answer names no URL itself. An answer that already links something is left unchanged, and nothing is added when no tool result holds a URL, so a link is never made up. The label is configurable through evidence_check.sources_label (default "Sources") for profiles that answer in another language. It runs in the existing evidence gate, on the same streaming and non-streaming paths as the number note. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de>