plandex-ai/plandex · error
Custom model providers are not supported on Plandex Cloud
Error message
Custom model providers are not supported on Plandex Cloud
What it means
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.
Source
Thrown at app/server/handlers/models.go:40
auth := Authenticate(w, r, true)
if auth == nil {
return
}
if !requireMinClientVersion(w, r, CustomModelsMinClientVersion) {
return
}
var modelsInput shared.ModelsInput
if err := json.NewDecoder(r.Body).Decode(&modelsInput); err != nil {
log.Printf("Error decoding request body: %v\n", err)
http.Error(w, "Invalid request body: "+err.Error(), http.StatusBadRequest)
return
}
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
}
}View on GitHub (pinned to e2d772072e)
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
Example fix
// before
input := shared.ModelsInput{
CustomProviders: []*shared.CustomProvider{{Name: "my-proxy", BaseUrl: ...}},
CustomModels: models,
}
// after
input := shared.ModelsInput{
// no CustomProviders on Plandex Cloud
CustomModels: models,
} Defensive patterns
Strategy: validation
Validate before calling
if len(input.CustomProviders) > 0 && targetServerIsPlandexCloud {
return errors.New("custom providers cannot be applied to Plandex Cloud")
} Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- Custom models are not supported on Plandex Cloud in Integrat
- token exchange failed - status: %d, body: %s
- failed to update context: %v
- Error decoding request: %v
- Has duplicates:
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/e5e89527c5a6efaa.
Report an issue: GitHub.