{"record":{"id":"41da593709c4d385","repo":"langgenius/dify","slug":"model-currently-not-support-41da59","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":"console","errorClass":"ProviderModelCurrentlyNotSupportError","httpStatus":400,"severity":"error","filePath":"api/controllers/console/explore/completion.py","lineNumber":138,"sourceCode":"                invoke_from=InvokeFrom.EXPLORE,\n                streaming=streaming,\n            )\n\n            # response-contract:ignore compact_generate_response\n            return helper.compact_generate_response(response)\n        except services.errors.conversation.ConversationNotExistsError:\n            raise NotFound(\"Conversation Not Exists.\")\n        except services.errors.conversation.ConversationCompletedError:\n            raise ConversationCompletedError()\n        except services.errors.app_model_config.AppModelConfigBrokenError:\n            logger.exception(\"App model config broken.\")\n            raise AppUnavailableError()\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>/completion-messages/<string:task_id>/stop\",\n    endpoint=\"installed_app_stop_completion\",\n)\nclass CompletionStopApi(InstalledAppResource):\n    @console_ns.response(200, \"Success\", console_ns.models[SimpleResultResponse.__name__])\n    @with_current_user_id\n    @with_session(write=False)\n    def post(self, session: Session, current_user_id: str, installed_app: InstalledApp, task_id: str):","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/explore/completion.py#L120-L156","documentation":"Raised by CompletionApi.post (HTTP 400, error_code 'model_currently_not_support') when core.errors.error.ModelCurrentlyNotSupportError is thrown. The specific model the app uses is not permitted in the current context — classically, the Dify-hosted OpenAI trial does not allow GPT-4. The controller surfaces the canned message about the trial limitation.","triggerScenarios":"POST /console/installed-apps/<id>/completion-messages where the app is configured to use a model disallowed by the active provider plan — most commonly GPT-4 (or another restricted model) on the Dify-hosted trial, or a model the provider entitlement excludes.","commonSituations":"Trial app selected a GPT-4 model but the trial only allows GPT-3.5/gpt-4o-mini; provider entitlement changed and dropped support for the configured model; model was deprecated by the provider and is no longer selectable.","solutions":["Switch the app's model to one supported by your plan (e.g., gpt-4o-mini or gpt-3.5-turbo for trials).","Configure your own OpenAI credentials in Settings -> Model Provider to unlock GPT-4.","Re-publish the app in Studio after changing the model.","Check the provider's model availability list for the current entitlement."],"exampleFix":"# before: trial app pinned to gpt-4 -> model_currently_not_support\n\n# after: Studio -> App -> Model -> change to gpt-4o-mini -> Save & Publish\n# then retry the completion request","handlingStrategy":"validation","validationCode":"// Verify the app's model is allowed under the active entitlement before posting.\nconst supported = await fetch(`/console/workspaces/current/model-providers/${provider}/models`).then(r => r.json());\nconst allowed = supported.data.some(m => m.model === appModel && m.status === 'active');\nif (!allowed) { promptSwitchModel(appModel); }","typeGuard":"function isModelSupported(modelEntry) {\n  return modelEntry?.status === 'active';\n}","tryCatchPattern":"try {\n  await postCompletion(id, payload);\n} catch (err) {\n  if (err.code === 'model_currently_not_support') {\n    // prompt to switch model in Studio; do not retry the same model\n    promptSwitchModel();\n  } else { throw err; }\n}","preventionTips":["On trial plans, default apps to supported models (e.g., gpt-4o-mini).","After entitlement changes, audit apps for now-unsupported models.","Read the provider's supported-model list before selecting a model in Studio."],"tags":["explore","completion","model-provider","model-selection","entitlement"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}