plandex-ai/plandex · error
Provider name is required
Error message
Provider name is required
What it means
Every custom provider in the ModelsInput must have a non-empty Name, which identifies the provider in model configs. If any entry in CustomProviders has an empty Name, the handler rejects the request with HTTP 400 and this message.
Solutions
- Set a unique, non-empty name on every object in the customProviders array
- Validate all provider names client-side before sending the request
- If providers were generated by a script, log the raw JSON and check which entry has name: ""
- Keep names distinct from each other and from built-in provider names to avoid later conflicts
Example fix
// before
{"customProviders": [{"baseUrl": "https://proxy.example.com"}]}
// after
{"customProviders": [{"name": "my-proxy", "baseUrl": "https://proxy.example.com"}]} Defensive patterns
Strategy: validation
Validate before calling
for i, p := range input.CustomProviders {
if p.Name == "" {
return fmt.Errorf("customProviders[%d].name is required", i)
}
} Type guard
func providerNamed(p *shared.CustomProvider) bool { return p != nil && p.Name != "" } Prevention
- Validate all provider names are non-empty before each upsert
- Require name in any script or template that generates custom providers
- Keep provider names unique and descriptive
When it happens
Trigger: POSTing to the custom models upsert endpoint with a CustomProviders element lacking a name field (omitted or empty string in JSON).
Common situations: Hand-editing models.json and deleting the name line; programmatically constructing providers where a template field was never filled; a migration script mapping an unnamed source field to provider name.
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
- Model id is required
- Model pack name is required
- Has duplicates:
- name field is required
- planId field is required
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/94d4d4dfb99185f1.
Report an issue: GitHub.
Appendix: source
Thrown at app/server/handlers/models.go:71
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
}
}
for _, model := range modelsInput.CustomModels {
if model.ModelId == "" {
msg := "Model id is required"
log.Println(msg)
http.Error(w, msg, http.StatusBadRequest)
return
}
if shared.BuiltInBaseModelsById[model.ModelId] != nil {
msg := fmt.Sprintf("%s is a built-in base model id, so it can't be used for a custom model", model.ModelId)
log.Println(msg)
http.Error(w, msg, http.StatusUnprocessableEntity)
return
}View on GitHub (pinned to e2d772072e)