appsmithorg/appsmith · error · AppsmithPluginException
PE-DSE-5003
PE-DSE-5003
Error message
messages are not provided in the configuration
What it means
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.
Source
Thrown at app/server/appsmith-plugins/anthropicPlugin/src/main/java/com/external/plugins/commands/VisionCommand.java:102
AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
String.format(STRING_APPENDER, EXECUTION_FAILURE, MODEL_NOT_SELECTED));
}
Float temperature = getTemperatureFromFormData(formData);
anthropicRequestDTO.setTemperature(temperature);
anthropicRequestDTO.setModel(model);
anthropicRequestDTO.setMaxTokens(getMaxTokenFromFormData(formData));
anthropicRequestDTO.setMessages(createMessages(formData));
if (formData.containsKey(SYSTEM_PROMPT) && formData.get(SYSTEM_PROMPT) != null) {
anthropicRequestDTO.setSystem(RequestUtils.extractDataFromFormData(formData, SYSTEM_PROMPT));
}
return anthropicRequestDTO;
}
private List<Message> createMessages(Map<String, Object> formData) {
if (!formData.containsKey(MESSAGES)) {
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_DATASOURCE_ARGUMENT_ERROR,
"messages are not provided in the configuration");
}
List<Map<String, String>> messageMaps = getMessages((Map<String, Object>) formData.get(MESSAGES));
if (messageMaps == null) {
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_DATASOURCE_ARGUMENT_ERROR,
"messages are not provided in the configuration correctly");
}
List<Message> messages = new ArrayList<>();
for (Map<String, String> messageMap : messageMaps) {
if (messageMap != null && messageMap.containsKey(ROLE) && messageMap.containsKey(CONTENT)) {
Message message = new Message();
String type = messageMap.get(TYPE);
message.setRole(CommandUtils.getActualRoleValue(messageMap.get(ROLE)));
if (TEXT.equals(type)) {
Message.TextContent textContent = new Message.TextContent();
textContent.setText(messageMap.get(CONTENT));View on GitHub (pinned to 8cd9021c24)
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.
Example fix
// before
formData.put("model", "claude-3-5-sonnet");
// after
formData.put("messages", Map.of("messagesList", List.of(Map.of("role","user","type","image","content","data:image/png;base64,iVBOR...")))); Defensive patterns
Strategy: validation
Validate before calling
if (!formData.containsKey(MESSAGES)) {
return errorResult("Add at least one text or image message.");
} Type guard
boolean hasMessagesKey(Map<String, Object> formData) {
return formData.containsKey(MESSAGES) && formData.get(MESSAGES) != null;
} Try / catch
try {
visionCommand.makeRequestBody(actionConfiguration);
} catch (AppsmithPluginException e) {
if (e.getMessage().contains("messages are not provided")) {
// prompt to add messages
}
} Prevention
- 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.
When it happens
Trigger: Vision query formData with no MESSAGES entry (e.g. only model set, no image/text message added).
Common situations: Messages section removed during editing; formData supplied without the messages key via API/import.
Related errors
AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12).
Data as JSON: /api/errors/bf7e50e12f566f7c.
Report an issue: GitHub.