langgenius/dify · warning · AppMoreLikeThisDisabledError

app_more_like_this_disabled

app_more_like_this_disabled

Error message

The 'More like this' feature is disabled. Please refresh your page.

What it means

HTTP 403 with error_code app_more_like_this_disabled, raised when AppGenerateService raises MoreLikeThisDisabledError. The owning app has the 'more like this' feature turned off in its model configuration, so generation is refused.

Solutions

  1. Have the app owner re-enable 'More like this' in the app's model/prompt settings.
  2. On the client, hide the action when the feature flag is off — read it from app config if exposed.
  3. On 403 with this code, show 'feature disabled, refresh your page' and reload the app config.
  4. Confirm you are calling more-like-this only on completion apps that advertise the feature.

Example fix

# before: feature disabled in app config
# owner: App Settings -> Model Settings -> enable 'More like this'

# after: client respects the disabled flag
if (app.more_like_this_enabled):
    resp = get(more_like_this_url(id, mid))
else:
    notify('More like this is disabled for this app')
Defensive patterns

Strategy: try-catch

Validate before calling

// If the app exposes a more-like-this enabled flag, check it first
if (app.more_like_this_enabled === false) {
  hideMoreLikeThis(app.id);
  return;
}

Type guard

function moreLikeThisEnabled(app) {
  return app?.more_like_this_enabled === true;
}

Try / catch

try {
  return await get(moreLikeThisUrl(id, mid));
} catch (e) {
  if (e.code === 'app_more_like_this_disabled') {
    notify('More like this is disabled. Refresh your page.');
    reloadAppConfig(id);
    return null;
  }
  throw e;
}

Prevention

When it happens

Trigger: GET more-like-this on a completion app whose owner disabled more_like_this in the app's model config (e.g. suggested_questions_after_answer / more_like_this flag off). The service-level disabled error is mapped to this 403.

Common situations: App owner turned the feature off in app settings; app was duplicated from a template that ships with the feature disabled; the user is on a stale page that still shows the button after the config changed.

Related errors


AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12). Data as JSON: /api/errors/246bcaba1d38125a. Report an issue: GitHub.

Appendix: source

Thrown at api/controllers/console/explore/message.py:183

        args = MoreLikeThisQuery.model_validate(request.args.to_dict())

        streaming = args.response_mode == "streaming"

        try:
            response = AppGenerateService.generate_more_like_this(
                session=session,
                app_model=app_model,
                user=current_user,
                message_id=message_id_str,
                invoke_from=InvokeFrom.EXPLORE,
                streaming=streaming,
            )
            # response-contract:ignore compact_generate_response
            return helper.compact_generate_response(response)
        except MessageNotExistsError:
            raise NotFound("Message Not Exists.")
        except MoreLikeThisDisabledError:
            raise AppMoreLikeThisDisabledError()
        except ProviderTokenNotInitError as ex:
            raise ProviderNotInitializeError(ex.description)
        except QuotaExceededError:
            raise ProviderQuotaExceededError()
        except ModelCurrentlyNotSupportError:
            raise ProviderModelCurrentlyNotSupportError()
        except InvokeError as e:
            raise CompletionRequestError(e.description)
        except ValueError as e:
            raise e
        except Exception:
            logger.exception("internal server error.")
            raise InternalServerError()


@console_ns.route(
    "/installed-apps/<uuid:installed_app_id>/messages/<uuid:message_id>/suggested-questions",
    endpoint="installed_app_suggested_question",

View on GitHub (pinned to ef8544b173)