File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -253,19 +253,14 @@ function Client:models()
253253 local ok , headers = pcall (self .authenticate , self , provider_name )
254254 if not ok then
255255 log .error (' Failed to authenticate with ' .. provider_name .. ' : ' .. headers )
256- local user_err_msg = ' Failed to authenticate with ' .. provider_name
257- -- append error details, if available
258- local headers_json = utils .json_decode (headers )
259- if headers_json .error_details and headers_json .error_details .message then
260- user_err_msg = user_err_msg .. ' the server replied : ' .. headers_json .error_details .message
261- end
262- error (user_err_msg )
256+ error (headers )
263257 return {}
264258 end
265259
266260 local ok , models = pcall (provider .get_models , headers )
267261 if not ok then
268262 log .warn (' Failed to fetch models from ' .. provider_name .. ' : ' .. models )
263+ error (models )
269264 return {}
270265 end
271266
You can’t perform that action at this time.
0 commit comments