plandex-ai/plandex · error
Custom models are not supported on Plandex Cloud in Integrat
Error message
Custom models are not supported on Plandex Cloud in Integrated Models mode
What it means
On Plandex Cloud, custom models are blocked for organizations that have IntegratedModelsMode enabled. In that mode the org uses Plandex-provided integrated models and cannot define its own custom models. The handler returns HTTP 400 with this message after confirming the org is in integrated mode.
Source
Thrown at app/server/handlers/models.go:55
if len(modelsInput.CustomProviders) > 0 {
if os.Getenv("IS_CLOUD") != "" {
http.Error(w, "Custom model providers are not supported on Plandex Cloud", http.StatusBadRequest)
return
}
}
if len(modelsInput.CustomModels) > 0 {
if os.Getenv("IS_CLOUD") != "" {
apiOrg, err := getApiOrg(auth.OrgId)
if err != nil {
log.Printf("Error fetching org: %v\n", err)
http.Error(w, "Failed to create custom model: "+err.Error(), http.StatusInternalServerError)
return
}
if apiOrg.IntegratedModelsMode {
http.Error(w, "Custom models are not supported on Plandex Cloud in Integrated Models mode", http.StatusBadRequest)
return
}
}
}
hasDuplicates, errMsg := modelsInput.CheckNoDuplicates()
if !hasDuplicates {
http.Error(w, "Has duplicates: "+errMsg, http.StatusBadRequest)
return
}
for _, provider := range modelsInput.CustomProviders {
if provider.Name == "" {
msg := "Provider name is required"
log.Println(msg)
http.Error(w, msg, http.StatusBadRequest)
return
}View on GitHub (pinned to e2d772072e)
Solutions
- Have the org admin disable IntegratedModelsMode for the org on Plandex Cloud
- Switch to a self-hosted Plandex server, where custom models are always allowed
- Remove the customModels section from the payload and use the org's integrated models instead
- Check the org's plan/settings to confirm which model mode it is in before syncing configs
Example fix
// before: sending custom models to an integrated-mode org on cloud
POST /custom_models {"customModels": [...]}
// after: only send custom models to non-integrated orgs or self-hosted
if !org.IntegratedModelsMode || selfHosted {
POST /custom_models {"customModels": [...]}
} Defensive patterns
Strategy: validation
Validate before calling
if org.IntegratedModelsMode && !selfHosted && len(input.CustomModels) > 0 {
return errors.New("custom models are blocked for integrated-models orgs on Plandex Cloud")
} Prevention
- Fetch the org's IntegratedModelsMode flag before sending custom models
- Skip custom-model sync automatically for integrated-mode orgs
- Prefer self-hosted deployments when custom models are core to your workflow
When it happens
Trigger: POSTing a ModelsInput with non-empty CustomModels to the upsert endpoint on a cloud-mode server when the authenticated org's IntegratedModelsMode flag is true.
Common situations: An org switched to integrated (credit-based) model plans and an admin then tries to import an old custom models.json; scripting model config sync across orgs where one is integrated-mode; a user unaware their org admin enabled integrated models.
Related errors
- Custom model providers are not supported on Plandex Cloud
- Error decoding request: %v
- Has duplicates:
- Provider name is required
- Model id is required
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/29c4cfa0a2460f1b.
Report an issue: GitHub.