appsmithorg/appsmith · error · AppsmithPluginException

PE-ARG-5000

PE-ARG-5000

Error message

No generate content model is selected in the configuration

What it means

GenerateContentCommand.selectModel (GenerateContentCommand.java:62-72) throws this when the action configuration's formData does not contain the GENERATE_CONTENT_MODEL key. This method is called during createExecutionUri (line 58-59) to build the API URL with the model name in the path. Without a model, the URI cannot be constructed. Categorized as PLUGIN_EXECUTE_ARGUMENT_ERROR (PE-ARG-5000).

Source

Thrown at app/server/appsmith-plugins/googleAiPlugin/src/main/java/com/external/plugins/commands/GenerateContentCommand.java:69

     */
    @Override
    public URI createTriggerUri() {
        return URI.create("");
    }

    @Override
    public URI createExecutionUri(ActionConfiguration actionConfiguration) {
        return RequestUtils.createUriFromCommand(GoogleAIConstants.GENERATE_CONTENT, selectModel(actionConfiguration));
    }

    private String selectModel(ActionConfiguration actionConfiguration) {
        if (actionConfiguration != null
                && actionConfiguration.getFormData() != null
                && actionConfiguration.getFormData().containsKey(GENERATE_CONTENT_MODEL)) {
            return ((Map<String, String>) actionConfiguration.getFormData().get(GENERATE_CONTENT_MODEL)).get(DATA);
        }
        // throw error if no model selected
        throw new AppsmithPluginException(
                AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
                "No generate content model is selected in the configuration");
    }

    @Override
    public GoogleAIRequestDTO makeRequestBody(ActionConfiguration actionConfiguration) {
        Map<String, Object> formData = actionConfiguration.getFormData();
        GoogleAIRequestDTO googleAIRequestDTO = new GoogleAIRequestDTO();
        List<Map<String, String>> messages = getMessages((Map<String, Object>) formData.get(MESSAGES));
        if (messages == null || messages.isEmpty()) {
            throw new AppsmithPluginException(
                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
                    String.format(STRING_APPENDER, EXECUTION_FAILURE, INCORRECT_MESSAGE_FORMAT));
        }
        // as of today, we are going to support only text input to text output, so we will condense user messages in
        // a single content parts of request body
        List<GoogleAIRequestDTO.Part> userQueryParts = new ArrayList<>();
        for (Map<String, String> message : messages) {

View on GitHub (pinned to 8cd9021c24)

Solutions

  1. Select a model from the model dropdown in the Google AI query editor (e.g., gemini-2.5-pro).
  2. If using JS mode, ensure the bound expression returns a valid model identifier string in the generateContentModel form field's data key.
  3. Verify the form data includes the 'generateContentModel' key with a nested 'data' field containing the model name.
  4. Re-save the query after selecting the model to persist the form data.
Defensive patterns

Strategy: validation

Validate before calling

// Ensure a model is selected before executing
if (!form.generateContentModel || !form.generateContentModel.data) {
  showAlert('Please select a Google AI model before running the query', 'error');
} else {
  await googleAiQuery.run();
}

Prevention

When it happens

Trigger: The Google AI query's form data is missing the 'generateContentModel' key entirely, or actionConfiguration/formData is null. The three-way null check (actionConfiguration != null, formData != null, containsKey(GENERATE_CONTENT_MODEL)) at lines 63-65 fails on the third condition. This fires during URI construction, before the request body is even built.

Common situations: 1) User creates a new Google AI query but forgets to select a model from the dropdown. 2) The model field was cleared or never populated after switching from another command type. 3) JS mode is enabled and the bound expression returns undefined/null for the model field. 4) Form data structure changed due to a UI/plugin update.

Related errors


AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12). Data as JSON: /api/errors/88abb8e728ad0b7a. Report an issue: GitHub.