feat: Add per-request use_agentic toggle and slim retrieval response - #57
Merged
Merged
Conversation
- Add use_agentic (bool|null) request parameter: true=force agentic, false=force legacy, null=server default (RETRIEVAL_AGENTIC_ENABLED). - Remove deprecated enable_decomposition parameter (was ignored). - Strip debug-only response fields (plan, steps, wallet_snapshot, planner_snapshot, final_strategy_used, evidence_text). - Keep core response: namespace, query, router_used, answer_text, referenced_chunks, results.
This was referenced May 13, 2026
Closed
EricNGOntos
added a commit
that referenced
this pull request
May 13, 2026
* feat: implement decomposed retrieval workflow system with query planning, synthesis, and execution budget management. * fix(agentic): resolve asset reconciliation and navigation orchestrator bugs * test: update retrieval contract test to assert new agentic response fields * feat: enable agentic retrieval by default and sync env configs (#54) * chore: remove stale SDK scaffolds from monorepo (#56) The real SDKs live in standalone repos: - Python: Ontos-AI/knowhere-python-sdk - Node: Ontos-AI/knowhere-node-sdk Deleted: - packages/sdk-python/ (only contained build artifacts) - packages/sdk-typescript/ (only contained dist/node_modules) - packages/openapi-specs/ (empty, only node_modules) Updated AGENTS.md project structure accordingly. * feat: add per-request use_agentic toggle and slim retrieval API contract (#57) - Add use_agentic (bool|null) request parameter: true=force agentic, false=force legacy, null=server default (RETRIEVAL_AGENTIC_ENABLED). - Remove deprecated enable_decomposition parameter (was ignored). - Strip debug-only response fields (plan, steps, wallet_snapshot, planner_snapshot, final_strategy_used, evidence_text). - Keep core response: namespace, query, router_used, answer_text, referenced_chunks, results. * docs: concisely update AGENTS.md for WorkflowOrchestrator and use_agentic (#58) * fix: remove agentic internal fields from empty query contract test (#59)
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.
What
New request parameter:
use_agenticAdds a per-request boolean toggle to
POST /v1/retrieval/query:truefalsenull/ omittedRETRIEVAL_AGENTIC_ENABLEDenv var, currentlytrue)This allows SDK users to explicitly control retrieval mode per request without requiring server reconfiguration.
Removed deprecated parameter
enable_decomposition— was accepted but silently ignored since the workflow planner migration. Removed from both the request schema and internal function signature.Slimmed response schema
Removed debug/internal fields from
RetrievalQueryResponsethat are not useful to SDK consumers:plansteps(+WorkflowStepResponseclass)final_strategy_usedwallet_snapshotplanner_snapshotevidence_textRetained core response fields:
namespace,query,router_used,answer_text,referenced_chunks,resultsInternal pipeline impact
None. All changes are at the API boundary layer only:
workflow/orchestrator.py— untouchedagentic/orchestrator.py— untouchedworkflow/types.py— untouched (to_api_response()still generates full dict internally)response_modelsimply filters out extra fields during serializationVerification
make lint— ✅ passedmake typecheck— ✅ 0 errors