{"record":{"id":"66734b9aac6c08c0","repo":"plandex-ai/plandex","slug":"built-in-local-model-pack-s-can-t-be-used-on-plan","errorCode":null,"errorMessage":"Built-in local model pack %s can't be used on Plandex Cloud","messagePattern":"Built-in local model pack (.+?) can't be used on Plandex Cloud","errorType":"http","errorClass":"http","httpStatus":422,"severity":"warning","filePath":"app/server/handlers/settings.go","lineNumber":120,"sourceCode":"\n\tif err != nil {\n\t\tlog.Println(\"Error decoding request body: \", err)\n\t\thttp.Error(w, \"Error decoding request body\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tif req.ModelPackName == \"\" && req.ModelPack == nil {\n\t\tlog.Println(\"No model pack name or model pack provided\")\n\t\thttp.Error(w, \"No model pack name or model pack provided\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tif req.ModelPackName != \"\" {\n\t\tif mp, builtIn := shared.BuiltInModelPacksByName[req.ModelPackName]; builtIn {\n\t\t\tif os.Getenv(\"IS_CLOUD\") != \"\" && mp.LocalProvider != \"\" {\n\t\t\t\tmsg := fmt.Sprintf(\"Built-in local model pack %s can't be used on Plandex Cloud\", req.ModelPackName)\n\t\t\t\tlog.Println(msg)\n\t\t\t\thttp.Error(w, msg, http.StatusUnprocessableEntity)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\n\tif req.ModelPack != nil {\n\t\tif req.ModelPack.LocalProvider != \"\" {\n\t\t\tmsg := fmt.Sprintf(\"Local model pack %s can't be used on Plandex Cloud\", req.ModelPack.Name)\n\t\t\tlog.Println(msg)\n\t\t\thttp.Error(w, msg, http.StatusUnprocessableEntity)\n\t\t\treturn\n\t\t}\n\n\t\tids := req.ModelPack.ToModelPackSchema().AllModelIds()\n\t\tfor _, id := range ids {\n\t\t\tbm, builtIn := shared.BuiltInBaseModelsById[id]\n\t\t\tif builtIn && os.Getenv(\"IS_CLOUD\") != \"\" && bm.IsLocalOnly() {\n\t\t\t\tmsg := fmt.Sprintf(\"Built-in local model %s can't be used on Plandex Cloud\", id)","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/server/handlers/settings.go#L102-L138","documentation":"On Plandex Cloud (IS_CLOUD env var set), built-in model packs that rely on a local provider are rejected with HTTP 422, because local providers (e.g. Ollama) cannot be reached from the cloud service. The pack name is interpolated into the message.","triggerScenarios":"UpdateSettingsHandler called with ModelPackName set to a built-in pack from shared.BuiltInModelPacksByName whose LocalProvider != \"\" while os.Getenv(\"IS_CLOUD\") != \"\".","commonSituations":"Developer points a cloud-hosted Plandex deployment at a locally-configured pack (e.g. an Ollama pack) copied from a local setup; CLI sends a local pack name that worked against a self-hosted server.","solutions":["Choose a cloud-compatible built-in model pack (no local provider)","Run a self-hosted Plandex server if you need local-provider packs","Remove/override the LocalProvider setting in a custom pack instead of using the built-in local pack"],"exampleFix":"// before\n{\"modelPackName\": \"ollama-local\"}\n// after\n{\"modelPackName\": \"plandex-strong\"}","handlingStrategy":"validation","validationCode":"if os.Getenv(\"IS_CLOUD\") != \"\" {\n    if mp, ok := shared.BuiltInModelPacksByName[packName]; ok && mp.LocalProvider != \"\" {\n        return fmt.Errorf(\"pack %q uses a local provider and is unavailable on cloud\", packName)\n    }\n}","typeGuard":null,"tryCatchPattern":"resp, err := client.UpdateSettings(ctx, req)\nif err != nil {\n    var apiErr *APIError\n    if errors.As(err, &apiErr) && apiErr.StatusCode == 422 {\n        // pick a cloud-compatible pack\n    }\n    return err\n}","preventionTips":["Filter pack choices by cloud compatibility when IS_CLOUD is set","Never copy local-provider pack names from a self-hosted config to cloud","Check LocalProvider before persisting pack preferences"],"tags":["http","configuration","cloud"],"backgroundTag":"local-model-on-cloud","analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}