langgenius/dify · error · ProviderQuotaExceededError

provider_quota_exceeded

provider_quota_exceeded

Error message

Your quota for Dify Hosted Model Provider has been exhausted. Please go to Settings -> Model Provider to complete your own provider credentials.

What it means

HTTP 400 (code=provider_quota_exceeded) raised in _get_message_suggested_questions (message.py:525) when the LLM call for suggestions throws QuotaExceededError. The Dify hosted trial quota is exhausted, blocking the suggestions generation. Catch maps to ProviderQuotaExceededError.

Source

Thrown at api/controllers/console/app/message.py:525

def _get_message_suggested_questions(*, session: Session, current_user: Account, app_model: App, message_id: UUID):
    message_id_str = str(message_id)

    try:
        questions = MessageService.get_suggested_questions_after_answer(
            app_model=app_model,
            message_id=message_id_str,
            user=current_user,
            invoke_from=InvokeFrom.DEBUGGER,
            session=session,
        )
    except MessageNotExistsError:
        raise NotFound("Message not found")
    except ConversationNotExistsError:
        raise NotFound("Conversation not found")
    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 SuggestedQuestionsAfterAnswerDisabledError:
        raise AppSuggestedQuestionsAfterAnswerDisabledError()
    except Exception:
        logger.exception("internal server error.")
        raise InternalServerError()

    return dump_response(SuggestedQuestionsResponse, {"data": questions})


def _get_message_detail(*, session: Session, app_model: App, message_id: UUID):
    message_id_str = str(message_id)

    message = session.scalar(
        select(Message).where(Message.id == message_id_str, Message.app_id == app_model.id).limit(1)

View on GitHub (pinned to ef8544b173)

Solutions

  1. Configure your own provider credentials in Settings -> Model Provider.
  2. Switch the tenant default model to a provider with remaining quota.
  3. Disable suggested-questions-after-answer in the app config to avoid the call until quota/credentials are fixed.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await getSuggestedQuestions(appId, msgId);
} catch (e) {
  if (e.code === 'provider_quota_exceeded') {
    // prompt to add own credentials; disable feature temporarily
  } else throw e;
}

Prevention

When it happens

Trigger: GET /console/api/apps/<app_id>/message/<message_id>/suggested-questions after the tenant's Dify Hosted Model Provider trial quota has been consumed.

Common situations: Frequent suggestion generation during trial; shared workspace; heavy eval runs against the hosted endpoint.

Related errors


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