Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds server-side resolved model information to the logging infrastructure and introduces an experiment for configuring auto mode hints. The resolved model represents the actual AI model used by the server, which may differ from the requested model.
Key changes:
- Added
resolvedModelfield to chat completion responses and related types to track the actual model used - Enhanced request logging to display resolved model when it differs from the requested model
- Added experiment service integration to make auto mode model hints configurable
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/platform/chat/common/commonTypes.ts | Added resolvedModel field to FetchSuccess type definition |
| src/platform/networking/common/openai.ts | Added resolvedModel field to ChatCompletion interface |
| src/platform/networking/node/stream.ts | Updated APIJsonDataStreaming to accept and store model information |
| src/platform/networking/node/chatStream.ts | Passed model from solution to completion response |
| src/platform/endpoint/node/chatEndpoint.ts | Added model field from JSON response to completion |
| src/platform/endpoint/node/responsesApi.ts | Included model from chunk response in completion |
| src/platform/endpoint/vscode-node/extChatEndpoint.ts | Set resolved model to language model ID |
| src/extension/prompt/node/chatMLFetcher.ts | Added resolved model from first successful completion |
| src/extension/prompt/vscode-node/requestLoggerImpl.ts | Enhanced logging to show resolved model when different from requested |
| src/platform/endpoint/common/automodeService.ts | Added experimentation service and configurable auto mode hint |
| src/extension/byok/vscode-node/geminiNativeProvider.ts | Set resolved model to Gemini model ID |
| src/extension/byok/vscode-node/anthropicProvider.ts | Set resolved model to Anthropic model ID |
| src/extension/externalAgents/node/oaiLanguageModelServer.ts | Added model field to streaming completions |
| test/base/simulationContext.ts | Updated mock to include empty resolved model |
| src/platform/chat/test/common/staticChatMLFetcher.ts | Updated mock to include empty resolved model |
| src/platform/chat/test/common/mockChatMLFetcher.ts | Updated mocks to include empty resolved model |
dmitrivMS
approved these changes
Oct 22, 2025
justschen
approved these changes
Oct 22, 2025
isidorn
reviewed
Oct 29, 2025
| headers['Copilot-Session-Token'] = sessionToken; | ||
| } | ||
|
|
||
| const autoModeHint = this._expService.getTreatmentVariable<string>('copilotchat.autoModelHint') || 'auto'; |
Contributor
There was a problem hiding this comment.
small typo. Variable should be called autoModelHint not autoModeHint
@lramos15
Member
Author
There was a problem hiding this comment.
We call it mode in some places too. idk why 😅 . but good point
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.
Initial pass of adding the server side resolved model to our logging
Also add exp for auto mode hint