Make chat routing mandatory and document retrieval opt-in#34
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
KostasCherv
marked this pull request as ready for review
July 14, 2026 09:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
answer_from_ragdecisionrouter_errorfailures instead of silently retrieving all documentsRoot cause
When the router was disabled or unavailable,
should_use_workspace_resources(None)defaulted to retrieving every ready workspace document. Citation selection then treated retrieved context as supporting evidence even for direct messages such ashi, so the backend emitted an unrelated citation that the UI rendered.User impact
Greetings and other direct/tool/clarification turns no longer query or cite workspace or agent document collections. Document retrieval remains available for explicit RAG routes, and router failures terminate without retrieval.
Validation
uv run pytest -q tests/test_api.py tests/test_rag_chat_helpers.py tests/test_citations.py tests/test_llm_factory.py tests/test_ai_regression_gate.py— 166 passeduv run ruff check src tests— passedgraphify update .— completed