Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
check retry for authorization error
Jeffrey Morgan02524a56ff16
diff --git a/server/images.go b/server/images.goindex 976ba8ffe..8d2af15ba 100644--- a/server/images.go+++ b/server/images.go@@ -1131,6 +1131,7 @@ func makeRequestWithRetry(ctx context.Context, method string, requestURL *url.URif !errors.Is(err, context.Canceled) {log.Printf("request failed: %v", err)}+return nil, err}@@ -1150,7 +1151,13 @@ func makeRequestWithRetry(ctx context.Context, method string, requestURL *url.URreturn nil, err}}- return makeRequest(ctx, method, requestURL, headers, body, regOpts)++ resp, err := makeRequest(ctx, method, requestURL, headers, body, regOpts)+ if resp.StatusCode == http.StatusUnauthorized {+ return nil, errUnauthorized+ }++ return resp, errcase resp.StatusCode == http.StatusNotFound:return nil, os.ErrNotExistcase resp.StatusCode >= http.StatusBadRequest: