Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

server: abort download on empty digest

Kyle Steere9239a254e054
diff --git a/server/download.go b/server/download.go
index 6f79fd2d3..784ba2d5e 100644
--- a/server/download.go
+++ b/server/download.go
@@ -464,6 +464,10 @@ type downloadOpts struct {
// downloadBlob downloads a blob from the registry and stores it in the blobs directory
func downloadBlob(ctx context.Context, opts downloadOpts) (cacheHit bool, _ error) {
+ if opts.digest == "" {
+ return false, fmt.Errorf(("%s: %s"), opts.mp.GetNamespaceRepository(), "digest is is empty")
+ }
+
fp, err := GetBlobsPath(opts.digest)
if err != nil {
return false, err