plandex-ai/plandex · warning · http

No model pack name or model pack provided

Error message

No model pack name or model pack provided

What it means

UpdateSettingsHandler requires at least one of ModelPackName (string) or ModelPack (object) in the request. When both are absent/empty it returns HTTP 400 'No model pack name or model pack provided'. It's a validation guard against empty settings updates.

Source

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

	plan := authorizePlan(w, planId, auth)

	if plan == nil {
		return
	}

	var req shared.UpdateSettingsRequest
	err := json.NewDecoder(r.Body).Decode(&req)

	if err != nil {
		log.Println("Error decoding request body: ", err)
		http.Error(w, "Error decoding request body", http.StatusInternalServerError)
		return
	}

	if req.ModelPackName == "" && req.ModelPack == nil {
		log.Println("No model pack name or model pack provided")
		http.Error(w, "No model pack name or model pack provided", http.StatusBadRequest)
		return
	}

	if req.ModelPackName != "" {
		if mp, builtIn := shared.BuiltInModelPacksByName[req.ModelPackName]; builtIn {
			if os.Getenv("IS_CLOUD") != "" && mp.LocalProvider != "" {
				msg := fmt.Sprintf("Built-in local model pack %s can't be used on Plandex Cloud", req.ModelPackName)
				log.Println(msg)
				http.Error(w, msg, http.StatusUnprocessableEntity)
				return
			}
		}
	}

	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)

View on GitHub (pinned to e2d772072e)

Solutions

  1. Include either modelPackName (a built-in pack name) or modelPack (a full pack object) in the request body
  2. Check the client is actually setting the field (watch for field-name casing/renames)
  3. If updating other settings, ensure the endpoint supports partial updates or send the current pack unchanged

Example fix

// before
{"autoContinue": true}
// after
{"autoContinue": true, "modelPackName": "default"}
Defensive patterns

Strategy: validation

Validate before calling

func validateUpdateSettings(req shared.UpdateSettingsRequest) error {
    if req.ModelPackName == "" && req.ModelPack == nil {
        return errors.New("modelPackName or modelPack is required")
    }
    return nil
}

Try / catch

if err := validateUpdateSettings(req); err != nil {
    return err
}
resp, err := client.UpdateSettings(ctx, req)

Prevention

When it happens

Trigger: POST to the update-settings endpoint with a decoded body where ModelPackName == "" and ModelPack == nil, e.g. body {} or {"modelPackName":""}.

Common situations: Client code builds UpdateSettingsRequest but never assigns the model pack fields; a UI 'save' sends the settings object without the selected pack; API change renamed the field so the server no longer sees it.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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