{"record":{"id":"be14d2051493e2cf","repo":"langgenius/dify","slug":"model-currently-not-support-be14d2","errorCode":"model_currently_not_support","errorMessage":"Dify Hosted OpenAI trial currently not support the GPT-4 model.","messagePattern":"Dify Hosted OpenAI trial currently not support the GPT-4 model\\.","errorType":"error_code","errorClass":"ProviderModelCurrentlyNotSupportError","httpStatus":400,"severity":"error","filePath":"api/controllers/console/explore/message.py","lineNumber":189,"sourceCode":"                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\",\n)\nclass MessageSuggestedQuestionApi(InstalledAppResource):\n    @console_ns.response(200, \"Success\", console_ns.models[SuggestedQuestionsResponse.__name__])\n    @with_current_user\n    def get(self, current_user: Account, installed_app: InstalledApp, message_id: UUID):\n        app_model = installed_app.app_with_session(session=db.session())","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/explore/message.py#L171-L207","documentation":"HTTP 400 with error_code model_currently_not_support, raised when generate_more_like_this raises ModelCurrentlyNotSupportError. The specific model the app uses is not permitted under the current provider grant — classically GPT-4 on the Dify hosted OpenAI trial.","triggerScenarios":"GET more-like-this on an app configured to use a model the active provider grant disallows (e.g. GPT-4 on the hosted trial). The service raises ModelCurrentlyNotSupportError and the controller maps it to ProviderModelCurrentlyNotSupportError(400).","commonSituations":"Trial plan that only allows certain models; app was built against a model the current subscription tier does not include; provider changed its allowed-model list.","solutions":["Switch the app's model to one allowed by the current provider grant (e.g. GPT-3.5 on trial).","Configure your own provider credentials that include the restricted model.","Upgrade the plan/tier so the model becomes available.","Confirm the model name in the app config matches a supported identifier."],"exampleFix":"# before: app configured for GPT-4 on hosted trial\n# App Settings -> Model -> change to an allowed model\n\n# after: verify model is allowed before generation\nallowed = get_allowed_models(provider)\nif app.model_name not in allowed:\n    app.model_name = allowed[0]; save(app)\nresp = get(more_like_this_url(id, mid))","handlingStrategy":"validation","validationCode":"// Confirm the app's model is in the provider's allowed list\nconst allowed = await get(`/console/workspaces/current/model-providers/${app.provider_name}/models`);\nif (!allowed.includes(app.model_name)) {\n  throw new ConfigError('Model not supported by current provider grant');\n}","typeGuard":"function modelIsAllowed(app, allowedModels) {\n  return Array.isArray(allowedModels) && allowedModels.includes(app?.model_name);\n}","tryCatchPattern":"try {\n  return await get(moreLikeThisUrl(id, mid));\n} catch (e) {\n  if (e.code === 'model_currently_not_support') {\n    await switchAppModel(id, allowedModels[0]);\n    return get(moreLikeThisUrl(id, mid));\n  }\n  throw e;\n}","preventionTips":["Pick a model allowed by the active provider grant (e.g. GPT-3.5 on trial, not GPT-4).","Configure own credentials for restricted models.","Upgrade the plan to unlock the model."],"tags":["rest-api","explore","provider","model-not-supported","more-like-this","configuration","dify"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}