@@ -122,7 +122,7 @@ export class PromptProvider implements vscode.InlineCompletionItemProvider {
122
122
try {
123
123
124
124
// Check model exists
125
- let modelExists = await ollamaCheckModel ( inferenceConfig . endpoint , inferenceConfig . modelName ) ;
125
+ let modelExists = await ollamaCheckModel ( inferenceConfig . endpoint , inferenceConfig . modelName , inferenceConfig . bearerToken ) ;
126
126
if ( token . isCancellationRequested ) {
127
127
info ( `Canceled after AI completion.` ) ;
128
128
return ;
@@ -147,7 +147,7 @@ export class PromptProvider implements vscode.InlineCompletionItemProvider {
147
147
148
148
// Perform download
149
149
this . update ( 'sync~spin' , 'Downloading' ) ;
150
- await ollamaDownloadModel ( inferenceConfig . endpoint , inferenceConfig . modelName ) ;
150
+ await ollamaDownloadModel ( inferenceConfig . endpoint , inferenceConfig . modelName , inferenceConfig . bearerToken ) ;
151
151
this . update ( 'sync~spin' , 'Llama Coder' )
152
152
}
153
153
if ( token . isCancellationRequested ) {
@@ -161,6 +161,7 @@ export class PromptProvider implements vscode.InlineCompletionItemProvider {
161
161
prefix : prepared . prefix ,
162
162
suffix : prepared . suffix ,
163
163
endpoint : inferenceConfig . endpoint ,
164
+ bearerToken : inferenceConfig . bearerToken ,
164
165
model : inferenceConfig . modelName ,
165
166
format : inferenceConfig . modelFormat ,
166
167
maxLines : inferenceConfig . maxLines ,
0 commit comments