-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Skip auto model router API call for cached inline chat #3005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Copilot
AI
changed the title
[WIP] Remove auto model router for inline chat usage
Skip auto model router for inline chat
Jan 20, 2026
Copilot
AI
changed the title
Skip auto model router for inline chat
Skip auto model router API call for cached inline chat
Jan 20, 2026
Co-authored-by: TylerLeonhardt <[email protected]>
- Inline chat still uses automodel routing but skips router API call when cache exists - Addresses feedback to include logic in shouldRoute instead of blocking router path entirely - Inline chat will route on first call, then reuse cached model on subsequent calls Co-authored-by: TylerLeonhardt <[email protected]>
1b34074 to
045a204
Compare
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Optimizes Auto mode routing decisions to reduce latency for inline chat by avoiding router-classification calls under certain conditions.
Changes:
- Restricts router-based model selection to panel chat requests (other locations fall back to non-router behavior).
- Adds a new Vitest suite covering router usage (panel vs. inline/terminal/no-config).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/platform/endpoint/node/automodeService.ts | Gates router-based resolution behind a “panel chat only” check. |
| src/platform/endpoint/node/test/automodeService.spec.ts | Adds tests asserting router fetch usage/non-usage across chat locations and config states. |
dmitrivMS
approved these changes
Jan 26, 2026
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.
The auto model router adds ~200ms latency to inline chat due to the classification API call. This change optimizes inline chat by skipping the router API call when a cached model selection already exists, while still participating in automodel routing.
Changes
Modified
AutomodeService._resolveWithRouterModel()to skip router API fetch for inline chat when cache exists:Behavior:
This approach allows inline chat to benefit from smart model routing while avoiding latency penalties on repeated requests.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.