plandex-ai/plandex · warning · http

Built-in local model %s can't be used on Plandex Cloud

Error message

Built-in local model %s can't be used on Plandex Cloud

What it means

For custom packs, the handler enumerates every model id via ModelPack.ToModelPackSchema().AllModelIds() and rejects the pack if any referenced built-in base model (shared.BuiltInBaseModelsById) is local-only while running on Plandex Cloud. HTTP 422 names the offending model id.

Source

Thrown at app/server/handlers/settings.go:140

			}
		}
	}

	if req.ModelPack != nil {
		if req.ModelPack.LocalProvider != "" {
			msg := fmt.Sprintf("Local model pack %s can't be used on Plandex Cloud", req.ModelPack.Name)
			log.Println(msg)
			http.Error(w, msg, http.StatusUnprocessableEntity)
			return
		}

		ids := req.ModelPack.ToModelPackSchema().AllModelIds()
		for _, id := range ids {
			bm, builtIn := shared.BuiltInBaseModelsById[id]
			if builtIn && os.Getenv("IS_CLOUD") != "" && bm.IsLocalOnly() {
				msg := fmt.Sprintf("Built-in local model %s can't be used on Plandex Cloud", id)
				log.Println(msg)
				http.Error(w, msg, http.StatusUnprocessableEntity)
				return
			}
		}
	}

	ctx, cancel := context.WithCancel(r.Context())

	var commitMsg string

	err = db.ExecRepoOperation(db.ExecRepoOperationParams{
		OrgId:    auth.OrgId,
		UserId:   auth.User.Id,
		PlanId:   planId,
		Branch:   branch,
		Reason:   "update settings",
		Scope:    db.LockScopeWrite,
		Ctx:      ctx,
		CancelFn: cancel,

View on GitHub (pinned to e2d772072e)

Solutions

  1. Remove the local-only model id from the custom pack and replace it with a cloud-available model
  2. Check each model id against shared.BuiltInBaseModelsById and IsLocalOnly before submitting
  3. Run self-hosted if local-only models are required

Example fix

// before
models: ["gpt-4o", "local-llama"]
// after
models: ["gpt-4o", "claude-3-5-sonnet"]
Defensive patterns

Strategy: validation

Validate before calling

for _, id := range pack.ToModelPackSchema().AllModelIds() {
    if bm, ok := shared.BuiltInBaseModelsById[id]; ok && os.Getenv("IS_CLOUD") != "" && bm.IsLocalOnly() {
        return fmt.Errorf("model %q is local-only and unavailable on cloud", id)
    }
}

Try / catch

resp, err := client.UpdateSettings(ctx, req)
if err != nil {
    var apiErr *APIError
    if errors.As(err, &apiErr) && apiErr.StatusCode == 422 {
        // remove/replace the local-only model id reported in the message
    }
    return err
}

Prevention

When it happens

Trigger: Custom ModelPack references at least one built-in base model id where bm.IsLocalOnly() is true, and IS_CLOUD is set on the server.

Common situations: User hand-assembles a pack and includes a local-only model (e.g. a local inference model) among otherwise cloud models; pack copied wholesale from a self-hosted instance to cloud.

Related errors


AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05). Data as JSON: /api/errors/371f2dbccd0c3e0c. Report an issue: GitHub.