Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
mlx: prevent remote creation mismatch (#14651)
Daniel Hiltgen69286306015c
diff --git a/cmd/cmd.go b/cmd/cmd.goindex 746e22ee4..53caa986d 100644--- a/cmd/cmd.go+++ b/cmd/cmd.go@@ -145,6 +145,12 @@ func CreateHandler(cmd *cobra.Command, args []string) error {// Check for --experimental flag for safetensors model creationexperimental, _ := cmd.Flags().GetBool("experimental")if experimental {+ host := envconfig.Host()+ h, _, _ := net.SplitHostPort(host.Host)+ ip := net.ParseIP(h)+ if ip == nil || (!ip.IsLoopback() && !ip.IsUnspecified()) {+ return errors.New("remote safetensor model creation not yet supported")+ }// Get Modelfile content - either from -f flag or default to "FROM ."var reader io.Readerfilename, err := getModelfileName(cmd)@@ -214,6 +220,12 @@ func CreateHandler(cmd *cobra.Command, args []string) error {if filename == "" {// No Modelfile found - check if current directory is an image gen modelif create.IsTensorModelDir(".") {+ host := envconfig.Host()+ h, _, _ := net.SplitHostPort(host.Host)+ ip := net.ParseIP(h)+ if ip == nil || (!ip.IsLoopback() && !ip.IsUnspecified()) {+ return errors.New("remote safetensor model creation not yet supported")+ }quantize, _ := cmd.Flags().GetString("quantize")return xcreateclient.CreateModel(xcreateclient.CreateOptions{ModelName: modelName,