Skip to content

Add resolved model#1517

Merged
lramos15 merged 1 commit intomainfrom
lramos15/careful-locust
Oct 22, 2025
Merged

Add resolved model#1517
lramos15 merged 1 commit intomainfrom
lramos15/careful-locust

Conversation

@lramos15
Copy link
Copy Markdown
Member

Initial pass of adding the server side resolved model to our logging

Also add exp for auto mode hint

Copilot AI review requested due to automatic review settings October 22, 2025 19:14
@lramos15 lramos15 enabled auto-merge October 22, 2025 19:14
@lramos15 lramos15 self-assigned this Oct 22, 2025
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 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 resolvedModel field 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

@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 22, 2025
@lramos15 lramos15 added this pull request to the merge queue Oct 22, 2025
Merged via the queue into main with commit 7da425d Oct 22, 2025
16 checks passed
@lramos15 lramos15 deleted the lramos15/careful-locust branch October 22, 2025 19:34
headers['Copilot-Session-Token'] = sessionToken;
}

const autoModeHint = this._expService.getTreatmentVariable<string>('copilotchat.autoModelHint') || 'auto';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

small typo. Variable should be called autoModelHint not autoModeHint
@lramos15

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We call it mode in some places too. idk why 😅 . but good point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants