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

ProviderModelCurrentlyNotSupportError (HTTP 400, code model_currently_not_support) raised in DatasetDocumentListApi.post when save_document_with_dataset_id raises ModelCurrentlyNotSupportError — the selected model is not allowed in the current provider context. The default description specifically calls out that the Dify-hosted OpenAI trial does not support GPT-4.

Source

Thrown at api/controllers/console/datasets/datasets_document.py:573

        if not dataset.indexing_technique and not knowledge_config.indexing_technique:
            raise ValueError("indexing_technique is required.")

        # validate args
        DocumentService.document_create_args_validate(knowledge_config)

        try:
            documents, batch = DocumentService.save_document_with_dataset_id(
                dataset, knowledge_config, current_user, session=session
            )
            dataset = DatasetService.get_dataset(dataset_id_str, session)

        except ProviderTokenNotInitError as ex:
            raise ProviderNotInitializeError(ex.description)
        except QuotaExceededError:
            raise ProviderQuotaExceededError()
        except ModelCurrentlyNotSupportError:
            raise ProviderModelCurrentlyNotSupportError()

        return dump_response(
            DatasetAndDocumentResponse,
            {"dataset": dataset, "documents": document_responses(documents, session=session), "batch": batch},
        )

    @setup_required
    @login_required
    @account_initialization_required
    @console_ns.response(204, "Documents deleted successfully")
    @with_current_user
    @with_current_tenant_id
    @rbac_permission_required(RBACResourceScope.DATASET, RBACPermission.DATASET_EDIT)
    @with_session
    def delete(
        self,
        session: Session,
        current_tenant_id: str,

View on GitHub (pinned to ef8544b173)

Solutions

  1. Switch the dataset/app model to a supported one (e.g. gpt-3.5-turbo on the hosted trial) in Settings -> Model Provider / dataset config.
  2. Configure your own provider credentials to unlock the restricted model (e.g. your own OpenAI key supports GPT-4).
  3. Change the document form away from QA mode if an LLM model you cannot access is required.

Example fix

// before — trial tenant, QA mode selects gpt-4
POST /console/api/datasets/<id>/documents { doc_form: 'qa_model', ..., model: 'gpt-4' }
  →  400 model_currently_not_support

// after — use a supported model or own credentials
POST /console/api/datasets/<id>/documents { doc_form: 'qa_model', ..., model: 'gpt-3.5-turbo' }  // 200
Defensive patterns

Strategy: validation

Validate before calling

from core.model_manager import ModelManager
from graphon.model_runtime.entities.model_entities import ModelType
from core.errors.error import ModelCurrentlyNotSupportError

HOSTED_TRIAL_BLOCKED = {"gpt-4", "gpt-4-32k", "gpt-4-turbo"}  # extend per provider

def model_supported(tenant_id: str, provider: str, model: str, is_trial: bool) -> bool:
    if is_trial and model.lower() in HOSTED_TRIAL_BLOCKED:
        return False
    try:
        mm = ModelManager.for_tenant(tenant_id=tenant_id)
        mm.get_model_instance(
            tenant_id=tenant_id, provider=provider, model_type=ModelType.LLM, model=model,
        )
        return True
    except ModelCurrentlyNotSupportError:
        return False
    except Exception:
        return False

Type guard

def is_allowed_model(model: str, is_hosted_trial: bool) -> bool:
    """True only when the model is permitted for the provider context."""
    if is_hosted_trial and model.lower() in HOSTED_TRIAL_BLOCKED:
        return False
    return True

Try / catch

from core.errors.error import ModelCurrentlyNotSupportError
from controllers.console.app.error import ProviderModelCurrentlyNotSupportError

try:
    documents, batch = DocumentService.save_document_with_dataset_id(...)
except ModelCurrentlyNotSupportError:
    raise ProviderModelCurrentlyNotSupportError()

Prevention

When it happens

Trigger: POST /console/api/datasets/<dataset_id>/documents where the indexing/processing pipeline (e.g. QA mode summarisation, parent-child chunking) selects a model the provider refuses to serve — most commonly GPT-4 on the Dify-hosted trial, which only allows certain models. Any model gated by the provider's allow-list can trigger it.

Common situations: Trial tenant selects GPT-4 (or another restricted model) for QA-form document processing or summarisation; a model was deprecated by the provider after the dataset was configured; the dataset references a model tier the current plan does not include.

Related errors


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