- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.3k
make copilot-fast callable from api #1697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 ModelAliasRegistrysingleton class for managing model aliases bidirectionally
- Refactored ModelMetadataFetcher.getChatModelFromFamily()to resolve aliases before family lookup, removing the hardcodedcopilot-fastcondition
- Updated LanguageModelAccessto 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-fastmapping, 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, | 
    
      
    
      Copilot
AI
    
    
    
      Oct 29, 2025 
    
  
There was a problem hiding this comment.
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.
| family: alias, | |
| family: model.family, | 
There was a problem hiding this comment.
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.
No description provided.