Repository navigation
feat(relay): add escalation and stage router support - #2
Merged
bbednarski9 merged 8 commits intoAug 9, 2026
Conversation
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
|
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
bbednarski9
marked this pull request as ready for review
August 8, 2026 21:05
bbednarski9
merged commit Aug 9, 2026
95e2560
into
feat/nemo-relay-plugin-owned-http-client
19 checks passed
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
Adds escalation-mode
llm_classifierand signal-drivenstage_routersupport to the externalnvidia.switchyardNeMo Relay plugin.The version-2 plugin configuration remains backward compatible: an omitted classifier
modestill selects capability routing. Escalation exposes the trajectory-judge settings, while stage routing exposes picker policy, signal windows, tier prompts, handoff notes, and an optional capability-classifier fallback. Both routers use the Relay-owned provider HTTP clients introduced by the base branch.This is a stacked follow-up to NVIDIA-NeMo#270 and intentionally targets
feat/nemo-relay-plugin-owned-http-clientin this fork. It does not modify PR NVIDIA-NeMo#270.The plugin README includes an algorithm compatibility matrix and a separate inventory of partial or not-yet-built integration components. The inventory documents validation and platform gaps without widening this PR's implementation scope.
Why
PR NVIDIA-NeMo#270 establishes the native plugin runtime and initially wires random and capability-classifier routing. Switchyard already implements escalation and stage routing in
switchyard-libsy; exposing those algorithms through the plugin completes the planned in-process router integration without adding a Switchyard service or a new Relay API.The follow-up patches also close issues found in an exact Relay 0.7.1 smoke: same-protocol prompt rewrites now reach providers, raw gateway placeholder sessions cannot share escalation latch state, stage default decisions retain tier/source metadata, hard overrides retain full confidence, and judge targets can set non-secret provider defaults such as
think = false.Relates to NVIDIA-NeMo#270.
How tested
cargo test -p switchyard-nemo-relay-plugin— 45 testscargo test --workspace --all-targetscargo clippy --workspace --all-targets -- -D warningscargo fmt --all -- --checkcd docs && env UV_CACHE_DIR=/private/tmp/switchyard-docs-uv-cache make publishwith strict MkDocs validationgit diff --checkCI Successgate, passed on the compatibility-matrix commitrouting_tier = strong,decision_source = override, and confidence1.000routing_tier = stronganddecision_source = fall_openthink = falseprovider defaultuv run ruff check .clean (N/A: no Python changes)uv run mypy switchyardclean (N/A: no Python changes)uv run pytest tests/green (N/A: no Python changes)Checklist
snake_caseof the primary class. (N/A: no Python classes added.)switchyard/__init__.py.__all__if intended for downstream use. (N/A: no Python public symbols added.)--helpupdated if customer-facing surface changed.Signed-off-by: Your Name <email>) per the DCO.Notes for reviewers
crates/switchyard-nemo-relay-plugin/src/config.rsfor schema-to-router construction, thencrates/libsy/src/algorithms/stage.rsfor cascade assembly and decision attribution.crates/switchyard-nemo-relay-plugin/README.mddistinguishes supported runtime behavior from partial validation and components that are not built yet.confirmations > 1requires stable session identity. Raw Relay gateway placeholder identity is treated as absent; callers should sendx-switchyard-session-idto retain a streak and latch.decision_source; non-stage fall-through decisions emit it asnull.