xtekky/gpt4free · error · ProviderException

All Yupp accounts failed after rotation attempts

Error message

All Yupp accounts failed after rotation attempts

What it means

Terminal ProviderException raised after Yupp's account-rotation loop completes without success. Each iteration either hit a retryable 500 (incrementing error_count and continuing) or exhausted max_attempts == len(YUPP_ACCOUNTS), so every configured account was tried and none produced a response.

Source

Thrown at g4f/Provider/Yupp.py:793

                    token_type = (
                        "new_conversation"
                        if is_new_conversation
                        else "existing_conversation"
                    )
                    await token_extractor.mark_token_failed(token_type, next_action)
                    log_debug(
                        f"Token failure detected in exception handler: {token_type}"
                    )

                if "500" in error_str or "internal server error" in error_str:
                    async with account_rotation_lock:
                        account["error_count"] += 1
                    continue
                async with account_rotation_lock:
                    account["error_count"] += 1
                raise ProviderException(f"Yupp request failed: {str(e)}") from e

        raise ProviderException("All Yupp accounts failed after rotation attempts")

    @classmethod
    async def _process_stream_response(
        cls,
        response,
        account: Dict[str, Any],
        scraper: CloudScraper,
        prompt: str,
        model_id: str,
    ) -> AsyncResult:
        line_pattern = re.compile(b"^([0-9a-fA-F]+):(.*)")
        target_stream_id = None
        reward_info = None
        is_thinking = False
        thinking_content = ""
        normal_content = ""
        quick_content = ""
        variant_text = ""

View on GitHub (pinned to 973504e177)

Solutions

  1. Check Yupp service status / retry later if 500s indicate an upstream outage
  2. Supply multiple fresh tokens so rotation has real alternatives (YUPP_API_KEY with several tokens)
  3. Update g4f and cloudscraper — a provider change may misclassify responses as failures
  4. Switch to a different provider as fallback while Yupp is unhealthy

Example fix

# before
client = Client(provider='Yupp')

# after
from g4f.Provider import IterListProvider
client = Client(provider=IterListProvider([Yupp, Cloudflare, DeepInfra], shuffle=False))
Defensive patterns

Strategy: fallback

Try / catch

try:
    resp = await create(..., provider='Yupp')
except ProviderException as e:
    if 'All Yupp accounts failed' in str(e):
        resp = await create(..., provider='Cloudflare')  # rotate provider

Prevention

When it happens

Trigger: All accounts returning HTTP 500s (each 'continue' consumes one attempt), or every account failing sequentially with errors until the for-loop over len(YUPP_ACCOUNTS) iterations ends.

Common situations: Yupp upstream outage returning 500 to everyone; all tokens simultaneously invalidated by a site-side change; a single account (max_attempts=1) failing once on a server error.

Related errors


AI-assisted analysis of xtekky/gpt4free@973504e177 (2026-08-14). Data as JSON: /api/errors/976954eb131ce996. Report an issue: GitHub.