{"record":{"id":"e5e89527c5a6efaa","repo":"plandex-ai/plandex","slug":"custom-model-providers-are-not-supported-on-plande","errorCode":null,"errorMessage":"Custom model providers are not supported on Plandex Cloud","messagePattern":"Custom model providers are not supported on Plandex Cloud","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"app/server/handlers/models.go","lineNumber":40,"sourceCode":"\tauth := Authenticate(w, r, true)\n\tif auth == nil {\n\t\treturn\n\t}\n\n\tif !requireMinClientVersion(w, r, CustomModelsMinClientVersion) {\n\t\treturn\n\t}\n\n\tvar modelsInput shared.ModelsInput\n\tif err := json.NewDecoder(r.Body).Decode(&modelsInput); err != nil {\n\t\tlog.Printf(\"Error decoding request body: %v\\n\", err)\n\t\thttp.Error(w, \"Invalid request body: \"+err.Error(), http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tif len(modelsInput.CustomProviders) > 0 {\n\t\tif os.Getenv(\"IS_CLOUD\") != \"\" {\n\t\t\thttp.Error(w, \"Custom model providers are not supported on Plandex Cloud\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t}\n\n\tif len(modelsInput.CustomModels) > 0 {\n\t\tif os.Getenv(\"IS_CLOUD\") != \"\" {\n\t\t\tapiOrg, err := getApiOrg(auth.OrgId)\n\t\t\tif err != nil {\n\t\t\t\tlog.Printf(\"Error fetching org: %v\\n\", err)\n\t\t\t\thttp.Error(w, \"Failed to create custom model: \"+err.Error(), http.StatusInternalServerError)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif apiOrg.IntegratedModelsMode {\n\t\t\t\thttp.Error(w, \"Custom models are not supported on Plandex Cloud in Integrated Models mode\", http.StatusBadRequest)\n\t\t\t\treturn\n\t\t\t}\n\t\t}","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/server/handlers/models.go#L22-L58","documentation":"The custom models upsert endpoint rejects requests that include custom providers when the server is running Plandex Cloud (IS_CLOUD env var is set to any non-empty value). Custom model providers (bring-your-own OpenAI-compatible endpoints) are a self-hosted-only feature; the cloud deployment does not persist them. The server returns HTTP 400 with this plain-text message.","triggerScenarios":"POSTing to the custom models upsert endpoint with a ModelsInput whose CustomProviders array is non-empty while the target server has IS_CLOUD set (Plandex Cloud deployment).","commonSituations":"A developer builds a models.json with custom providers locally, then applies it against app.plandex.cloud; teams that manage custom providers via config files pointing their client at cloud instead of a self-hosted server; tutorials written for self-hosted deployments followed on cloud.","solutions":["Remove all customProviders entries from the ModelsInput payload before sending to Plandex Cloud","Run a self-hosted Plandex server (IS_CLOUD unset) where custom providers are supported","If the provider is actually a hosted API, express the model as a custom model that references a built-in provider instead of a custom provider","Verify which server you are targeting; this is intentional cloud policy, not a bug"],"exampleFix":"// before\ninput := shared.ModelsInput{\n  CustomProviders: []*shared.CustomProvider{{Name: \"my-proxy\", BaseUrl: ...}},\n  CustomModels: models,\n}\n// after\ninput := shared.ModelsInput{\n  // no CustomProviders on Plandex Cloud\n  CustomModels: models,\n}","handlingStrategy":"validation","validationCode":"if len(input.CustomProviders) > 0 && targetServerIsPlandexCloud {\n    return errors.New(\"custom providers cannot be applied to Plandex Cloud\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Strip customProviders from payloads before syncing config to Plandex Cloud","Maintain separate config files for cloud and self-hosted targets","Check the deployment mode (IS_CLOUD) of your target server before applying model configs"],"tags":["http","go","cloud-restriction","bad-request","api"],"backgroundTag":"feature-not-supported-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"}