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

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.

Source

Thrown at api/controllers/console/explore/completion.py:138

                invoke_from=InvokeFrom.EXPLORE,
                streaming=streaming,
            )

            # response-contract:ignore compact_generate_response
            return helper.compact_generate_response(response)
        except services.errors.conversation.ConversationNotExistsError:
            raise NotFound("Conversation Not Exists.")
        except services.errors.conversation.ConversationCompletedError:
            raise ConversationCompletedError()
        except services.errors.app_model_config.AppModelConfigBrokenError:
            logger.exception("App model config broken.")
            raise AppUnavailableError()
        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>/completion-messages/<string:task_id>/stop",
    endpoint="installed_app_stop_completion",
)
class CompletionStopApi(InstalledAppResource):
    @console_ns.response(200, "Success", console_ns.models[SimpleResultResponse.__name__])
    @with_current_user_id
    @with_session(write=False)
    def post(self, session: Session, current_user_id: str, installed_app: InstalledApp, task_id: str):

View on GitHub (pinned to ef8544b173)

Solutions

  1. Switch the app's model to one supported by your plan (e.g., gpt-4o-mini or gpt-3.5-turbo for trials).
  2. Configure your own OpenAI credentials in Settings -> Model Provider to unlock GPT-4.
  3. Re-publish the app in Studio after changing the model.
  4. Check the provider's model availability list for the current entitlement.

Example fix

# before: trial app pinned to gpt-4 -> model_currently_not_support

# after: Studio -> App -> Model -> change to gpt-4o-mini -> Save & Publish
# then retry the completion request
Defensive patterns

Strategy: validation

Validate before calling

// Verify the app's model is allowed under the active entitlement before posting.
const supported = await fetch(`/console/workspaces/current/model-providers/${provider}/models`).then(r => r.json());
const allowed = supported.data.some(m => m.model === appModel && m.status === 'active');
if (!allowed) { promptSwitchModel(appModel); }

Type guard

function isModelSupported(modelEntry) {
  return modelEntry?.status === 'active';
}

Try / catch

try {
  await postCompletion(id, payload);
} catch (err) {
  if (err.code === 'model_currently_not_support') {
    // prompt to switch model in Studio; do not retry the same model
    promptSwitchModel();
  } else { throw err; }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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