File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -250,21 +250,21 @@ function Client:models()
250250 ipairs (get_cached (self .provider_cache [provider_name ], ' models' , function ()
251251 notify .publish (notify .STATUS , ' Fetching models from ' .. provider_name )
252252
253- local ok , headers = pcall (self .authenticate , self , provider_name )
253+ local ok , headers_or_err = pcall (self .authenticate , self , provider_name )
254254 if not ok then
255- log .error (' Failed to authenticate with ' .. provider_name .. ' : ' .. headers )
256- error (headers )
255+ log .error (' Failed to authenticate with ' .. provider_name .. ' : ' .. headers_or_err )
256+ error (headers_or_err )
257257 return {}
258258 end
259259
260- local ok , models = pcall (provider .get_models , headers )
260+ local ok , models_or_err = pcall (provider .get_models , headers_or_err )
261261 if not ok then
262- log .warn (' Failed to fetch models from ' .. provider_name .. ' : ' .. models )
263- error (models )
262+ log .warn (' Failed to fetch models from ' .. provider_name .. ' : ' .. models_or_err )
263+ error (models_or_err )
264264 return {}
265265 end
266266
267- return models or {}
267+ return models_or_err or {}
268268 end ))
269269 do
270270 model .provider = provider_name
You can’t perform that action at this time.
0 commit comments