Add auto model policy support#356
Open
jdneo wants to merge 4 commits into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 39119849-5c11-476e-941b-4c3574c369cf
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for “Auto” model GA by switching client logic to rely on the stable Auto model ID (auto) and by wiring a new policy-driven refresh path so the model inventory updates when the Auto model is enabled/disabled by org policy.
Changes:
- Update Auto-model detection to use the stable model ID (
id == "auto") instead of the display name. - Introduce
autoModel.enabledpolicy plumbing (policy params → feature flag → event) and refresh model inventory on policy changes. - Improve model selection fallback behavior and add/expand tests covering Auto model policy behavior and event publishing.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/utils/ModelUtils.java | Switch Auto model detection to stable ID-based logic. |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/ModelService.java | Refresh models on Auto-model policy event; adjust default/fallback handling and selection persistence. |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/utils/ModelUtilsTests.java | Update/add tests to validate Auto handling is ID-based (not display-name based). |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/services/ModelServiceTests.java | Add UI-level tests for policy-driven model inventory refresh and deterministic fallback selection. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/policy/DidChangePolicyParams.java | Add autoModel.enabled policy field + equality/hash/toString updates. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/CopilotLanguageClient.java | Publish Auto model policy change event when the policy value changes. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/FeatureFlags.java | Add autoModelPolicyEnabled feature flag storage. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/events/CopilotEventConstants.java | Add new event topic constant for Auto model policy changes. |
| com.microsoft.copilot.eclipse.core.test/src/com/microsoft/copilot/eclipse/core/lsp/CopilotLanguageClientTests.java | Add test to ensure Auto-model policy event is published only on value changes. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 39119849-5c11-476e-941b-4c3574c369cf
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 39119849-5c11-476e-941b-4c3574c369cf
ethanyhou
reviewed
Jul 17, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9c1d41fc-996c-4e22-aa02-8ba170779b75
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.
fix #305