@@ -11,7 +11,6 @@ import { CopilotToken } from '../../../platform/authentication/common/copilotTok
1111import { IBlockedExtensionService } from '../../../platform/chat/common/blockedExtensionService' ;
1212import { ChatFetchResponseType , ChatLocation , getErrorDetailsFromChatFetchError } from '../../../platform/chat/common/commonTypes' ;
1313import { getTextPart } from '../../../platform/chat/common/globalStringUtils' ;
14- import { ConfigKey , IConfigurationService } from '../../../platform/configuration/common/configurationService' ;
1514import { EmbeddingType , getWellKnownEmbeddingTypeInfo , IEmbeddingsComputer } from '../../../platform/embeddings/common/embeddingsComputer' ;
1615import { IEndpointProvider } from '../../../platform/endpoint/common/endpointProvider' ;
1716import { CustomDataPartMimeTypes } from '../../../platform/endpoint/common/endpointTypes' ;
@@ -61,7 +60,6 @@ export class LanguageModelAccess extends Disposable implements IExtensionContrib
6160 @IVSCodeExtensionContext private readonly _vsCodeExtensionContext : IVSCodeExtensionContext ,
6261 @IAutomodeService private readonly _automodeService : IAutomodeService ,
6362 @IExperimentationService private readonly _expService : IExperimentationService ,
64- @IConfigurationService private readonly _configurationService : IConfigurationService ,
6563 ) {
6664 super ( ) ;
6765
@@ -131,19 +129,13 @@ export class LanguageModelAccess extends Disposable implements IExtensionContrib
131129 }
132130 const seenFamilies = new Set < string > ( ) ;
133131
134- // Get model name overrides from settings (team internal setting)
135- const modelNameOverrides = this . _configurationService . getConfig ( ConfigKey . TeamInternal . ModelNameOverrides ) ;
136-
137132 for ( const endpoint of chatEndpoints ) {
138133 if ( seenFamilies . has ( endpoint . family ) && ! endpoint . showInModelPicker ) {
139134 continue ;
140135 }
141136 seenFamilies . add ( endpoint . family ) ;
142137
143- // Apply model name override if configured, otherwise use the endpoint name
144- const modelId = endpoint instanceof AutoChatEndpoint ? AutoChatEndpoint . pseudoModelId : endpoint . model ;
145- const displayName = modelNameOverrides [ modelId ] ?? endpoint . name ;
146- const sanitizedModelName = displayName . replace ( / \( P r e v i e w \) / g, '' ) . trim ( ) ;
138+ const sanitizedModelName = endpoint . name . replace ( / \( P r e v i e w \) / g, '' ) . trim ( ) ;
147139 let modelDescription : string | undefined ;
148140 if ( endpoint . degradationReason ) {
149141 modelDescription = endpoint . degradationReason ;
@@ -189,15 +181,15 @@ export class LanguageModelAccess extends Disposable implements IExtensionContrib
189181 if ( endpoint . customModel ) {
190182 const customModel = endpoint . customModel ;
191183 modelDetail = customModel . owner_name ;
192- modelDescription = `${ displayName } is contributed by ${ customModel . owner_name } using ${ customModel . key_name } ` ;
184+ modelDescription = `${ endpoint . name } is contributed by ${ customModel . owner_name } using ${ customModel . key_name } ` ;
193185 modelCategory = { label : vscode . l10n . t ( "Custom Models" ) , order : 2 } ;
194186 }
195187
196188 const session = this . _authenticationService . anyGitHubSession ;
197189
198190 const model : vscode . LanguageModelChatInformation = {
199- id : modelId ,
200- name : endpoint instanceof AutoChatEndpoint ? ( modelNameOverrides [ modelId ] ?? 'Auto' ) : displayName ,
191+ id : endpoint instanceof AutoChatEndpoint ? AutoChatEndpoint . pseudoModelId : endpoint . model ,
192+ name : endpoint instanceof AutoChatEndpoint ? 'Auto' : endpoint . name ,
201193 family : endpoint . family ,
202194 tooltip : modelDescription ,
203195 detail : modelDetail ,
0 commit comments