Skip to content

Add sticky_threshold and sticky_override to router decision API#4359

Merged
lramos15 merged 1 commit intomicrosoft:mainfrom
aashna:aashnagarg/sticky-routing-threshold
Mar 12, 2026
Merged

Add sticky_threshold and sticky_override to router decision API#4359
lramos15 merged 1 commit intomicrosoft:mainfrom
aashna:aashnagarg/sticky-routing-threshold

Conversation

@aashna
Copy link
Copy Markdown
Contributor

@aashna aashna commented 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
Copilot AI review requested due to automatic review settings March 11, 2026 18:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 RouterDecisionResponse to include sticky_override and update response validation accordingly.
  • Add optional stickyThreshold to getRouterDecision() and include sticky_threshold in the request body when provided.
  • Log sticky_override in 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.
@aashna aashna force-pushed the aashnagarg/sticky-routing-threshold branch 3 times, most recently from cb7196b to c2f2af0 Compare March 11, 2026 19:34
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
@aashna aashna force-pushed the aashnagarg/sticky-routing-threshold branch from c2f2af0 to de14e15 Compare March 11, 2026 22:31
@lramos15 lramos15 enabled auto-merge March 11, 2026 22:43
@vs-code-engineering vs-code-engineering bot added this to the 1.112.0 milestone Mar 11, 2026
@lramos15 lramos15 added this pull request to the merge queue Mar 12, 2026
Merged via the queue into microsoft:main with commit a0a9af3 Mar 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants