@@ -122,7 +122,7 @@ export class PromptProvider implements vscode.InlineCompletionItemProvider {
122122 try {
123123
124124 // Check model exists
125- let modelExists = await ollamaCheckModel ( inferenceConfig . endpoint , inferenceConfig . modelName ) ;
125+ let modelExists = await ollamaCheckModel ( inferenceConfig . endpoint , inferenceConfig . modelName , inferenceConfig . bearerToken ) ;
126126 if ( token . isCancellationRequested ) {
127127 info ( `Canceled after AI completion.` ) ;
128128 return ;
@@ -147,7 +147,7 @@ export class PromptProvider implements vscode.InlineCompletionItemProvider {
147147
148148 // Perform download
149149 this . update ( 'sync~spin' , 'Downloading' ) ;
150- await ollamaDownloadModel ( inferenceConfig . endpoint , inferenceConfig . modelName ) ;
150+ await ollamaDownloadModel ( inferenceConfig . endpoint , inferenceConfig . modelName , inferenceConfig . bearerToken ) ;
151151 this . update ( 'sync~spin' , 'Llama Coder' )
152152 }
153153 if ( token . isCancellationRequested ) {
@@ -161,6 +161,7 @@ export class PromptProvider implements vscode.InlineCompletionItemProvider {
161161 prefix : prepared . prefix ,
162162 suffix : prepared . suffix ,
163163 endpoint : inferenceConfig . endpoint ,
164+ bearerToken : inferenceConfig . bearerToken ,
164165 model : inferenceConfig . modelName ,
165166 format : inferenceConfig . modelFormat ,
166167 maxLines : inferenceConfig . maxLines ,
0 commit comments