Skip to content

Conversation

@sbatten
Copy link
Member

@sbatten sbatten commented Oct 29, 2025

No description provided.

@sbatten sbatten requested review from Copilot and lramos15 October 29, 2025 20:40
@sbatten sbatten self-assigned this Oct 29, 2025
@sbatten sbatten enabled auto-merge October 29, 2025 20:40
Copy link
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 introduces a centralized ModelAliasRegistry to manage model aliases and refactors the hardcoded copilot-fast to gpt-4o-mini mapping. The registry provides a reusable mechanism for defining model aliases and resolving them across the codebase.

Key Changes

  • Created a new ModelAliasRegistry singleton class for managing model aliases bidirectionally
  • Refactored ModelMetadataFetcher.getChatModelFromFamily() to resolve aliases before family lookup, removing the hardcoded copilot-fast condition
  • Updated LanguageModelAccess to register alias model entries and resolve aliases when finding endpoints

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/platform/endpoint/common/modelAliasRegistry.ts New singleton registry for bidirectional model alias management with registration and resolution methods
src/platform/endpoint/node/modelMetadataFetcher.ts Removed hardcoded copilot-fast mapping, now uses registry to resolve aliases before family lookup
src/extension/conversation/vscode-node/languageModelAccess.ts Registers alias model entries in language model info list and resolves aliases when finding endpoints

models.push({
...model,
id: alias,
family: alias,
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

Setting family: alias on line 212 may introduce confusion since the alias (e.g., 'copilot-fast') would be used as the family instead of the resolved model's actual family (e.g., 'gpt-4o-mini'). Consider whether the family should remain consistent with the original model's family to maintain proper categorization.

Suggested change
family: alias,
family: model.family,

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

@lramos15 If our internal getChatEndpoint took id instead of family, which it effectively does, I'd follow this suggestion as you also brought it up.

@sbatten sbatten added this pull request to the merge queue Oct 30, 2025
Merged via the queue into main with commit 6a79d61 Oct 30, 2025
16 checks passed
@sbatten sbatten deleted the sbatten/attractive-perch branch October 30, 2025 19:44
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.

3 participants