Repository navigation
feat(kv-router): inject host hooks into SelectionService - #8
Closed
ishandhanani wants to merge 1 commit into
Closed
ishandhanani wants to merge 1 commit into
ishandhanani wants to merge 1 commit into
Conversation
ishandhanani
had a problem deploying
to
external_collaborator
September 3, 2026 06:05 — with
GitHub Actions
Failure
Expose the three LocalScheduler provider hooks that SelectionCore::ensure_entry hardcoded to None (prefill-load estimator, overloaded-worker exclusion set, hard-availability inclusion set) through a new SelectionHostHooks struct and SelectionServiceBuilder::host_hooks(). Every partition scheduler the core creates receives the same hooks. The standalone HTTP service leaves them unset, so its behavior is unchanged. An embedding host (the frontend KvRouter in a later change) can now feed the same overload and availability state it passes to KvScheduler today. Tests: availability and overload providers steer selection through the core. Signed-off-by: Ishan Dhanani <[email protected]>
ishandhanani
force-pushed
the
idhanani/p0-selection-scheduler-hooks
branch
from
September 3, 2026 06:08
65e525b to
1fac9b7
Compare
ishandhanani
had a problem deploying
to
external_collaborator
September 3, 2026 06:08 — with
GitHub Actions
Failure
This was referenced Sep 3, 2026
Closed
Owner
Author
This branch had an error being deployed
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.
Phase 0 (selection-core parity) of the runtime-optional frontend roadmap, item 1.
Summary
SelectionHostHooks { prefill_load_estimator, overloaded_worker_provider, available_worker_provider }andSelectionServiceBuilder::host_hooks().SelectionCore::ensure_entrypasses the hooks to everyLocalSchedulerit creates instead of the hardcodedNones (core/mod.rsformerly lines 498-502).LocalScheduler::new_with_policy_profilealready accepted them.KvRouter(which today builds these three closures from itsClientinlib/llm/src/kv_router.rs:770-786) on an embeddedSelectionService.Validation
cargo test -p dynamo-kv-router --features standalone-selection --lib services::selection: 64 passed, including two new tests proving an injected availability set and an injected overload set steerselect()through the core.cargo clippy -p dynamo-kv-router --features standalone-selection --all-targets: only the pre-existingnew_with_indexer_metrics_and_cancel_tokendead-code warning inservices/indexer/registry.rs.cargo fmtclean. Python bindings (lib/bindings/python/rust/llm/kv.rs:664) use the builder vianew()+ chained methods, so the new defaulted field is non-breaking.