[Router][E2E][Docs] Bound external RAG API payloads - #2507
Conversation
Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
✅ Deploy Preview for vllm-semantic-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned when their GitHub accounts are assignable in this repository: 📁
|
✅ Supply Chain Security Report — All Clear
Findings in this PR's diff1 finding(s) — click to expand
Scanned at |
Xunzhuo
left a comment
There was a problem hiding this comment.
The normal response-size boundary and typed custom-template substitution are well designed, and the new real E2E covers hostile text plus exact/one-byte-over limits. Two edge contracts still need to fail at config load rather than degrading into runtime failure or an effectively unbounded read. make agent-report, make build-e2e, config tests, git diff --check, and project CI passed; the branch is behind main.
…r-2507-correction2 Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
Mirror the Go-side validateHybridRAGChildBackend so that hybrid RAG configs with an external_api primary or fallback are validated through the same request_format contract as a top-level external_api backend. Previously the Python CLI only checked top-level backend == "external_api", so a hybrid config with an external_api fallback and request_format: openai would pass CLI validation and only fail later in the router. Now both primary and fallback children typed as external_api are validated at config load. Addresses FAUST-BENCHOU feedback on PR vllm-project#2507. Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
|
Good catch — thank you for spotting the asymmetry between the CLI and runtime contracts. Addressed in c3726af. The Python This means a hybrid config with an New test coverage (
All 37 existing CLI tests still pass. |
The new test from commit c3726af introduced cli/pydantic imports out of lexicographic order. Pre-commit ruff I001 fails on it. Apply ruff --fix so the 'Run pre-commit hooks check file lint' job on PR vllm-project#2507 turns green. No behavior change. Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
|
CI note: the single failing check |
Merges upstream main, resolving one config/README.md conflict by keeping the external-API-RAG fragment documentation while adopting the upstream repository-enforcement paragraph. Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
6cb1da7 to
c854419
Compare
|
Rebased onto current main (78 commits). Resolved one config/README.md merge conflict by keeping the external-API-RAG fragment docs paragraph and adopting upstream's rewritten repository-enforcement paragraph. Verified the two edge-contract asks against the rebased tree:
Please let me know if you'd like any adjustments. |
Resolves five conflicts from upstream's config/ -> config/fragments/ move and the new local split runtime docs: - external-api.yaml fragment kept (new file, already at the fragments path) - e2e-profile-map.yaml: rag-external-api entry moved under upstream's existing manual_profile_rules header instead of a duplicate header - three docs files: upstream structure and paths kept, external-API RAG content preserved, paths updated to config/fragments/ Go packages build; config and extproc RAG tests pass. Signed-off-by: iroiro147 <sarthak.singh@mastersunion.org>
|
@Xunzhuo this is now conflict-free again — refreshed onto current main ( Both review asks remain addressed and covered by tests:
Ready for re-review whenever suits you. |
|
✅ @Xunzhuo — addressed both edge-contract asks in f989efc. The two contracts now fail at config load:
Plus the hybrid-recursion guard: |
…ty-2478 # Conflicts: # config/README.md # e2e/README.md # src/vllm-sr/tests/test_plugin_parsing.py # website/docs/installation/configuration.md # website/docs/proposals/unified-config-contract-v0-3.md # website/docs/tutorials/plugin/rag.md
51fef95 to
f0537d5
Compare
Closes #2478
Purpose
top_kandthresholdremain typed values.${...}and{{...}}placeholder forms.max_response_body_bytesfor successful external-RAG responses, defaulting to 16 MiB. The complete body is read with a boundedlimit + 1strategy so an exact-limit response succeeds and a one-byte-over response fails without accepting a truncated JSON prefix.Affected modules:
Router/E2E/DocsTest Plan
cd src/semantic-router && go test -race ./pkg/config ./pkg/extproccd e2e && go test ./profiles/rag-external-api ./testcasesmake agent-lint AGENT_BASE_REF=origin/main AGENT_SKIP_PRECOMMIT_BASELINE=1 CHANGED_FILES="$(git diff --name-only origin/main...HEAD)"python3 tools/security/ast_security_scanner.py diff origin/main --fail-on HIGHBUILDKIT_PROGRESS=plain make e2e-test E2E_PROFILE=rag-external-api E2E_TESTS=rag-external-apiThe focused unit/race tests cover malformed templates, typed and embedded placeholders, configured-number preservation, exact and one-byte-over limits, chunked reads, cancellation, and nested validation. The Kubernetes profile verifies the same contract through the rendered configuration, Semantic Router, Envoy Gateway, AI Gateway, and an external-RAG mock.
Test Result
rag-external-apipassed and reportedtyped_request_verified,exact_limit_success_verified, andone_byte_over_rejectedas true.No known blocker remains in the changed surface.
Semantic Router PR Checklist
[Router],[CLI],[Dashboard],[Operator],[Fleet-Sim],[Bindings],[Training],[E2E],[Docs], or[CI/Build]git commit -s