plandex-ai/plandex · error
Error loading context: %s does not support images in context
Error message
Error loading context: %s does not support images in context
What it means
When an image is included in the context, the resolved model pack's Planner model must declare HasImageSupport. If the configured planner model can't accept images, the server rejects the load with HTTP 400 naming the model that lacks support.
Source
Thrown at app/server/handlers/context_helper.go:137
authVars: context.AuthVars,
plan: plan,
settings: settings,
},
)
clients = res.clients
authVars = res.authVars
break
}
}
// ensure image compatibility if we're loading an image
for _, context := range *loadReq {
if context.ContextType == shared.ContextImageType {
if !settings.GetModelPack().Planner.GetSharedBaseConfig(settings).HasImageSupport {
log.Printf("Error loading context: %s does not support images in context\n", settings.GetModelPack().Planner.ModelId)
http.Error(w, fmt.Sprintf("Error loading context: %s does not support images in context", settings.GetModelPack().Planner.ModelId), http.StatusBadRequest)
return nil, nil
}
}
}
// get name for piped data or notes if present
num := 0
errCh := make(chan error, len(*loadReq))
for _, context := range *loadReq {
if context.ContextType == shared.ContextPipedDataType {
num++
go func(context *shared.LoadContextParams) {
defer func() {
if r := recover(); r != nil {
log.Printf("panic in GenPipedDataName: %v\n%s", r, debug.Stack())
errCh <- fmt.Errorf("panic in GenPipedDataName: %v\n%s", r, debug.Stack())
runtime.Goexit() // don't allow outer function to continue and double-send to channelView on GitHub (pinned to e2d772072e)
Solutions
- Switch the plan (or org default) planner to a vision-capable model (e.g. gpt-4o)
- Remove the image from the load request, or describe the image in text instead
- If using a custom model pack, set HasImageSupport: true only if the model truly supports vision
Example fix
// before (custom model pack)
Planner: shared.ModelConfig{ModelId: "text-only-model"} // HasImageSupport defaults false
// after
Planner: shared.ModelConfig{ModelId: "gpt-4o", HasImageSupport: true} Defensive patterns
Strategy: validation
Validate before calling
pack := settings.GetModelPack()
hasVision := pack.Planner.GetSharedBaseConfig(settings).HasImageSupport
for _, c := range loadReq {
if c.ContextType == shared.ContextImageType && !hasVision {
return fmt.Errorf("planner %s does not support images", pack.Planner.ModelId)
}
} Prevention
- Set planner to a vision-capable model before adding image context
- Set HasImageSupport accurately in custom model packs
- Strip image contexts automatically when the active model lacks vision
When it happens
Trigger: Loading a ContextImageType context while settings.GetModelPack().Planner's shared base config has HasImageSupport=false — e.g. a text-only planner model is set for the plan/org.
Common situations: Org switched to a vision-less model (older GPT-3.5-class, some local/OSS models); custom model pack misconfigured without HasImageSupport; stale settings after a model deprecation.
Related errors
- Too many map files to load (found %d, limit is %d)
- Map file %s exceeds size limit (size %d, limit %d)
- Too many contexts to load (found %d, limit is %d)
- Context %s exceeds size limit (size %.2f MB, limit %d MB)
- error committing plan build: %v
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/bbbe8ade9ef8e247.
Report an issue: GitHub.