{"record":{"id":"bf7e50e12f566f7c","repo":"appsmithorg/appsmith","slug":"pe-dse-5003-bf7e50","errorCode":"PE-DSE-5003","errorMessage":"messages are not provided in the configuration","messagePattern":"messages are not provided in the configuration","errorType":"exception","errorClass":"AppsmithPluginException","httpStatus":500,"severity":"error","filePath":"app/server/appsmith-plugins/anthropicPlugin/src/main/java/com/external/plugins/commands/VisionCommand.java","lineNumber":102,"sourceCode":"                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n                    String.format(STRING_APPENDER, EXECUTION_FAILURE, MODEL_NOT_SELECTED));\n        }\n        Float temperature = getTemperatureFromFormData(formData);\n        anthropicRequestDTO.setTemperature(temperature);\n        anthropicRequestDTO.setModel(model);\n\n        anthropicRequestDTO.setMaxTokens(getMaxTokenFromFormData(formData));\n        anthropicRequestDTO.setMessages(createMessages(formData));\n        if (formData.containsKey(SYSTEM_PROMPT) && formData.get(SYSTEM_PROMPT) != null) {\n            anthropicRequestDTO.setSystem(RequestUtils.extractDataFromFormData(formData, SYSTEM_PROMPT));\n        }\n\n        return anthropicRequestDTO;\n    }\n\n    private List<Message> createMessages(Map<String, Object> formData) {\n        if (!formData.containsKey(MESSAGES)) {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_DATASOURCE_ARGUMENT_ERROR,\n                    \"messages are not provided in the configuration\");\n        }\n        List<Map<String, String>> messageMaps = getMessages((Map<String, Object>) formData.get(MESSAGES));\n        if (messageMaps == null) {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_DATASOURCE_ARGUMENT_ERROR,\n                    \"messages are not provided in the configuration correctly\");\n        }\n        List<Message> messages = new ArrayList<>();\n        for (Map<String, String> messageMap : messageMaps) {\n            if (messageMap != null && messageMap.containsKey(ROLE) && messageMap.containsKey(CONTENT)) {\n                Message message = new Message();\n                String type = messageMap.get(TYPE);\n                message.setRole(CommandUtils.getActualRoleValue(messageMap.get(ROLE)));\n                if (TEXT.equals(type)) {\n                    Message.TextContent textContent = new Message.TextContent();\n                    textContent.setText(messageMap.get(CONTENT));","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-plugins/anthropicPlugin/src/main/java/com/external/plugins/commands/VisionCommand.java#L84-L120","documentation":"VisionCommand.createMessages throws this when formData lacks the MESSAGES key — the vision analogue of ChatCommand:142. Uses PLUGIN_DATASOURCE_ARGUMENT_ERROR (PE-DSE-5003) because the configuration shape is invalid, not just an argument value.","triggerScenarios":"Vision query formData with no MESSAGES entry (e.g. only model set, no image/text message added).","commonSituations":"Messages section removed during editing; formData supplied without the messages key via API/import.","solutions":["Add at least one message (text or image) to the Vision query.","Ensure formData contains the MESSAGES key before executing.","Re-save the action so the messages array persists."],"exampleFix":"// before\nformData.put(\"model\", \"claude-3-5-sonnet\");\n// after\nformData.put(\"messages\", Map.of(\"messagesList\", List.of(Map.of(\"role\",\"user\",\"type\",\"image\",\"content\",\"data:image/png;base64,iVBOR...\"))));","handlingStrategy":"validation","validationCode":"if (!formData.containsKey(MESSAGES)) {\n    return errorResult(\"Add at least one text or image message.\");\n}","typeGuard":"boolean hasMessagesKey(Map<String, Object> formData) {\n    return formData.containsKey(MESSAGES) && formData.get(MESSAGES) != null;\n}","tryCatchPattern":"try {\n    visionCommand.makeRequestBody(actionConfiguration);\n} catch (AppsmithPluginException e) {\n    if (e.getMessage().contains(\"messages are not provided\")) {\n        // prompt to add messages\n    }\n}","preventionTips":["Make MESSAGES a required field for vision queries.","Include the MESSAGES key whenever building formData manually.","Validate the action payload shape before save via API."],"tags":["anthropic","appsmith","validation","messages","vision"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}