{"record":{"id":"246bcaba1d38125a","repo":"langgenius/dify","slug":"app-more-like-this-disabled","errorCode":"app_more_like_this_disabled","errorMessage":"The 'More like this' feature is disabled. Please refresh your page.","messagePattern":"The 'More like this' feature is disabled\\. Please refresh your page\\.","errorType":"error_code","errorClass":"AppMoreLikeThisDisabledError","httpStatus":403,"severity":"warning","filePath":"api/controllers/console/explore/message.py","lineNumber":183,"sourceCode":"        args = MoreLikeThisQuery.model_validate(request.args.to_dict())\n\n        streaming = args.response_mode == \"streaming\"\n\n        try:\n            response = AppGenerateService.generate_more_like_this(\n                session=session,\n                app_model=app_model,\n                user=current_user,\n                message_id=message_id_str,\n                invoke_from=InvokeFrom.EXPLORE,\n                streaming=streaming,\n            )\n            # response-contract:ignore compact_generate_response\n            return helper.compact_generate_response(response)\n        except MessageNotExistsError:\n            raise NotFound(\"Message Not Exists.\")\n        except MoreLikeThisDisabledError:\n            raise AppMoreLikeThisDisabledError()\n        except ProviderTokenNotInitError as ex:\n            raise ProviderNotInitializeError(ex.description)\n        except QuotaExceededError:\n            raise ProviderQuotaExceededError()\n        except ModelCurrentlyNotSupportError:\n            raise ProviderModelCurrentlyNotSupportError()\n        except InvokeError as e:\n            raise CompletionRequestError(e.description)\n        except ValueError as e:\n            raise e\n        except Exception:\n            logger.exception(\"internal server error.\")\n            raise InternalServerError()\n\n\n@console_ns.route(\n    \"/installed-apps/<uuid:installed_app_id>/messages/<uuid:message_id>/suggested-questions\",\n    endpoint=\"installed_app_suggested_question\",","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/explore/message.py#L165-L201","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Have the app owner re-enable 'More like this' in the app's model/prompt settings.","On the client, hide the action when the feature flag is off — read it from app config if exposed.","On 403 with this code, show 'feature disabled, refresh your page' and reload the app config.","Confirm you are calling more-like-this only on completion apps that advertise the feature."],"exampleFix":"# before: feature disabled in app config\n# owner: App Settings -> Model Settings -> enable 'More like this'\n\n# after: client respects the disabled flag\nif (app.more_like_this_enabled):\n    resp = get(more_like_this_url(id, mid))\nelse:\n    notify('More like this is disabled for this app')","handlingStrategy":"try-catch","validationCode":"// If the app exposes a more-like-this enabled flag, check it first\nif (app.more_like_this_enabled === false) {\n  hideMoreLikeThis(app.id);\n  return;\n}","typeGuard":"function moreLikeThisEnabled(app) {\n  return app?.more_like_this_enabled === true;\n}","tryCatchPattern":"try {\n  return await get(moreLikeThisUrl(id, mid));\n} catch (e) {\n  if (e.code === 'app_more_like_this_disabled') {\n    notify('More like this is disabled. Refresh your page.');\n    reloadAppConfig(id);\n    return null;\n  }\n  throw e;\n}","preventionTips":["Have the owner enable 'More like this' in app settings.","Hide the action when the app's feature flag is off.","Refresh the page on 403 to pick up config changes."],"tags":["rest-api","explore","feature-disabled","more-like-this","forbidden","dify"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}