Add sticky_threshold and sticky_override to router decision API#4359
Merged
lramos15 merged 1 commit intomicrosoft:mainfrom Mar 12, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the auto-mode router decision client contract to support “sticky routing” by (a) optionally sending a sticky_threshold to the router API and (b) consuming/logging a sticky_override flag in the router response for improved traceability and observability.
Changes:
- Extend
RouterDecisionResponseto includesticky_overrideand update response validation accordingly. - Add optional
stickyThresholdtogetRouterDecision()and includesticky_thresholdin the request body when provided. - Log
sticky_overridein router trace output / request logger markdown, and emit an AutomodeService trace when sticky override occurs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/platform/endpoint/node/routerDecisionFetcher.ts | Adds sticky_override to the response contract/validator, adds optional stickyThreshold request parameter, and logs sticky routing data in trace + request logger output. |
| src/platform/endpoint/node/automodeService.ts | Logs sticky override events when the router indicates a sticky routing override occurred. |
cb7196b to
c2f2af0
Compare
lramos15
reviewed
Mar 11, 2026
Support threshold-based sticky routing to prevent mid-conversation model switching on low-confidence predictions. Changes: - Add sticky_override bool to RouterDecisionResponse interface and validator - Add optional sticky_threshold parameter to getRouterDecision() - Send sticky_threshold in request body when provided - Log sticky_override in trace output and request logger markdown - AutomodeService logs sticky override events for observability
c2f2af0 to
de14e15
Compare
lramos15
approved these changes
Mar 11, 2026
TylerLeonhardt
approved these changes
Mar 12, 2026
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.
Support threshold-based sticky routing to prevent mid-conversation model switching on low-confidence predictions.
Changes: