You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(server-https): citations from follow-up tool calls are silently discarded #154
Citations collected during follow-up tool calls in server-https/app.py are silently discarded and never returned to the client.
Root Cause
stream_llm_response initializes a fresh citations_collector = [] on every invocation:
asyncdefstream_llm_response(payload, _depth=0):
citations_collector= [] # brand new list on every call
When handle_tool_follow_up calls stream_llm_response recursively for multi-hop queries, the inner call creates its own isolated citations_collector. Any citations found during that inner call are collected into this new list — which is then thrown away when the inner call returns. Only the outermost call's citations are ever sent to the client.
Impact
In a multi-hop agentic query where the agent calls the search tool twice, the user receives citations only from the first tool call. Citations from all subsequent hops are silently lost, breaking source attribution — a core feature of the RAG system.
Example Failure Scenario
User asks a complex multi-hop Kubeflow question
Agent calls search_kubeflow_docs → citations collected in outer list ✅
Agent calls search_kubeflow_docs again in follow-up → citations collected in innercitations_collector ❌
Inner list discarded on return
User sees only citations from step 2 — step 3 citations are gone
Proposed Fix
Pass citations_collector as a parameter into stream_llm_response so all recursive calls share the same list, or return citations from inner calls and merge them into the outer collector.
Activity
Kunal-Somani commentedon Mar 21, 2026
/assign
fix(server-https): pass citations_collector into recursive stream_llm…
chasecadet commentedon Nov 20, 2026
Thank you for reporting this!
We are closing pre-restructure issues targeting the legacy
server/,server-https/,manifests/,kagent-feast-mcp/, or in-processSentenceTransformerprototype code. In #207, #210, #233, #240, and #249,kubeflow/docs-agentmigrated to dedicated TEI (text-embeddings-inference), FastMCP (docs-agent-mcp/mcp-server/), shared modular KFP pipelines (docs-agent-mcp/pipelines/), and Helm charts (docs-agent-mcp/charts/).If you still observe an equivalent issue on the current
mainstack, please feel free to open a new issue using the current issue templates.