File tree Expand file tree Collapse file tree
extensions/copilot/src/platform/endpoint/node Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,14 +63,18 @@ class AutoModeTokenBank extends Disposable {
6363 this . _fetchedValue = this . _register ( createCapiClientFetchedValue < AutoModeAPIResponse > ( capiClientService , envService , {
6464 request : async ( ) => {
6565 const authToken = ( await authService . getCopilotToken ( ) ) . token ;
66- const autoModeHint = expService . getTreatmentVariable < string > ( expName ) || 'auto' ;
66+ const extValue = expService . getTreatmentVariable < string > ( expName ) ;
67+ const model_hints = [ extValue || 'auto' ] ;
68+ if ( location === ChatLocation . Editor && model_hints [ 0 ] !== 'auto' ) {
69+ model_hints . push ( 'auto' ) ;
70+ }
6771 return {
6872 headers : {
6973 'Content-Type' : 'application/json' ,
7074 'Authorization' : `Bearer ${ authToken } ` ,
7175 } ,
7276 method : 'POST' as const ,
73- json : { auto_mode : { model_hints : [ autoModeHint ] } } ,
77+ json : { auto_mode : { model_hints } } ,
7478 } ;
7579 } ,
7680 requestMetadata : { type : RequestType . AutoModels } ,
You can’t perform that action at this time.
0 commit comments