Fix bugs related to setting the right Chat model. (Fixes Issue #323765)#323767
Open
danielrobbins wants to merge 1 commit into
Open
Fix bugs related to setting the right Chat model. (Fixes Issue #323765)#323767danielrobbins wants to merge 1 commit into
danielrobbins wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree company="BreezyOps, Inc." |
9604293 to
fcfd103
Compare
This patch was originally created to address a bug where a Try Again in the Chat window would not allow a different model to be selected. Multiple inconsistencies were found related to feeding the model selection widget's current state in various places. This patch centralizes this in getSelectedModelRequestOptions() to avoid needing to keep multiple call sites in sync going forward. More specifically, several resend and confirmation paths passed only the selected model ID. That can drop editor-scoped model configuration, such as custom per-model settings, and cause follow-up requests to use configuration that does not match the visible model picker state. The new helper keeps the selected model ID and its scoped configuration together whenever the widget builds Chat request options. Fixes microsoft#323765
fcfd103 to
d2f679c
Compare
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.
This patch was originally created to address a bug where encountering an error and a "Try Again" button in the Chat window does not allow a different model to be selected, preventing the user from switching to a working model.
Upon investigation, multiple inconsistencies were found related to feeding the model selection widget's current state in various places. This patch centralizes this in getSelectedModelRequestOptions() to avoid needing to keep multiple call sites in sync going forward.
More specifically, several resend and confirmation paths passed only the selected model ID. That can drop editor-scoped model configuration, such as custom per-model settings, and cause follow-up requests to use configuration that does not match the visible model picker state. The new helper keeps the selected model ID and its scoped configuration together whenever the widget builds Chat request options.
To test: Select a third-party endpoint for a new chat, then successfully use it. Now, simulate an error on the endpoint, so that it will return an error to Chat on the next request. Now, attempt to continue with a new turn in Chat, resulting in an error from the endpoint. Chat will display a "Try Again" button. Now, pretend you are a user needing to select a working Model since your current model experienced an error. Before pressing "Try Again", select a new model, then hit "Try Again". With the patch, the new model will be utilized. Without the patch, the original failing model will continue to be selected, the original prompt will be re-submitted, and is likely to re-trigger the same error if the error was related to prompt content, size, quota, etc.