{"record":{"id":"bbbe8ade9ef8e247","repo":"plandex-ai/plandex","slug":"error-loading-context-s-does-not-support-images","errorCode":null,"errorMessage":"Error loading context: %s does not support images in context","messagePattern":"Error loading context: (.+?) does not support images in context","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"app/server/handlers/context_helper.go","lineNumber":137,"sourceCode":"\t\t\t\t\tauthVars:    context.AuthVars,\n\t\t\t\t\tplan:        plan,\n\t\t\t\t\tsettings:    settings,\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tclients = res.clients\n\t\t\tauthVars = res.authVars\n\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// ensure image compatibility if we're loading an image\n\tfor _, context := range *loadReq {\n\t\tif context.ContextType == shared.ContextImageType {\n\t\t\tif !settings.GetModelPack().Planner.GetSharedBaseConfig(settings).HasImageSupport {\n\t\t\t\tlog.Printf(\"Error loading context: %s does not support images in context\\n\", settings.GetModelPack().Planner.ModelId)\n\t\t\t\thttp.Error(w, fmt.Sprintf(\"Error loading context: %s does not support images in context\", settings.GetModelPack().Planner.ModelId), http.StatusBadRequest)\n\t\t\t\treturn nil, nil\n\t\t\t}\n\t\t}\n\t}\n\n\t// get name for piped data or notes if present\n\tnum := 0\n\terrCh := make(chan error, len(*loadReq))\n\tfor _, context := range *loadReq {\n\t\tif context.ContextType == shared.ContextPipedDataType {\n\t\t\tnum++\n\n\t\t\tgo func(context *shared.LoadContextParams) {\n\t\t\t\tdefer func() {\n\t\t\t\t\tif r := recover(); r != nil {\n\t\t\t\t\t\tlog.Printf(\"panic in GenPipedDataName: %v\\n%s\", r, debug.Stack())\n\t\t\t\t\t\terrCh <- fmt.Errorf(\"panic in GenPipedDataName: %v\\n%s\", r, debug.Stack())\n\t\t\t\t\t\truntime.Goexit() // don't allow outer function to continue and double-send to channel","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/server/handlers/context_helper.go#L119-L155","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before (custom model pack)\nPlanner: shared.ModelConfig{ModelId: \"text-only-model\"} // HasImageSupport defaults false\n// after\nPlanner: shared.ModelConfig{ModelId: \"gpt-4o\", HasImageSupport: true}","handlingStrategy":"validation","validationCode":"pack := settings.GetModelPack()\nhasVision := pack.Planner.GetSharedBaseConfig(settings).HasImageSupport\nfor _, c := range loadReq {\n    if c.ContextType == shared.ContextImageType && !hasVision {\n        return fmt.Errorf(\"planner %s does not support images\", pack.Planner.ModelId)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["http-400","image-support","model-capability","plandex"],"backgroundTag":"model-capability-mismatch","analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}