Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
not found error before pulling model (#718)
Bruce MacDonaldaf4cf55884ac
diff --git a/server/routes.go b/server/routes.goindex c68011df1..3e5fa5e8a 100644--- a/server/routes.go+++ b/server/routes.go@@ -3,8 +3,10 @@ package serverimport ("context""encoding/json"+ "errors""fmt""io"+ "io/fs""log""net""net/http"@@ -170,6 +172,11 @@ func GenerateHandler(c *gin.Context) {model, err := GetModel(req.Model)if err != nil {+ var pErr *fs.PathError+ if errors.As(err, &pErr) {+ c.JSON(http.StatusNotFound, gin.H{"error": fmt.Sprintf("model '%s' not found, try pulling it first", req.Model)})+ return+ }c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})return}