langgenius/dify · error · ProviderModelCurrentlyNotSupportError
model_currently_not_support
model_currently_not_support
Error message
Dify Hosted OpenAI trial currently not support the GPT-4 model.
What it means
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.
Source
Thrown at api/controllers/console/explore/message.py:189
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",
)
class MessageSuggestedQuestionApi(InstalledAppResource):
@console_ns.response(200, "Success", console_ns.models[SuggestedQuestionsResponse.__name__])
@with_current_user
def get(self, current_user: Account, installed_app: InstalledApp, message_id: UUID):
app_model = installed_app.app_with_session(session=db.session())View on GitHub (pinned to ef8544b173)
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.
Example fix
# before: app configured for GPT-4 on hosted trial
# App Settings -> Model -> change to an allowed model
# after: verify model is allowed before generation
allowed = get_allowed_models(provider)
if app.model_name not in allowed:
app.model_name = allowed[0]; save(app)
resp = get(more_like_this_url(id, mid)) Defensive patterns
Strategy: validation
Validate before calling
// Confirm the app's model is in the provider's allowed list
const allowed = await get(`/console/workspaces/current/model-providers/${app.provider_name}/models`);
if (!allowed.includes(app.model_name)) {
throw new ConfigError('Model not supported by current provider grant');
} Type guard
function modelIsAllowed(app, allowedModels) {
return Array.isArray(allowedModels) && allowedModels.includes(app?.model_name);
} Try / catch
try {
return await get(moreLikeThisUrl(id, mid));
} catch (e) {
if (e.code === 'model_currently_not_support') {
await switchAppModel(id, allowedModels[0]);
return get(moreLikeThisUrl(id, mid));
}
throw e;
} Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- provider_not_initialize
- provider_quota_exceeded
- completion_request_error
- not_completion_app
- app_more_like_this_disabled
AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12).
Data as JSON: /api/errors/be14d2051493e2cf.
Report an issue: GitHub.