{"record":{"id":"976954eb131ce996","repo":"xtekky/gpt4free","slug":"all-yupp-accounts-failed-after-rotation-attempts","errorCode":null,"errorMessage":"All Yupp accounts failed after rotation attempts","messagePattern":"All Yupp accounts failed after rotation attempts","errorType":"exception","errorClass":"ProviderException","httpStatus":null,"severity":"error","filePath":"g4f/Provider/Yupp.py","lineNumber":793,"sourceCode":"                    token_type = (\n                        \"new_conversation\"\n                        if is_new_conversation\n                        else \"existing_conversation\"\n                    )\n                    await token_extractor.mark_token_failed(token_type, next_action)\n                    log_debug(\n                        f\"Token failure detected in exception handler: {token_type}\"\n                    )\n\n                if \"500\" in error_str or \"internal server error\" in error_str:\n                    async with account_rotation_lock:\n                        account[\"error_count\"] += 1\n                    continue\n                async with account_rotation_lock:\n                    account[\"error_count\"] += 1\n                raise ProviderException(f\"Yupp request failed: {str(e)}\") from e\n\n        raise ProviderException(\"All Yupp accounts failed after rotation attempts\")\n\n    @classmethod\n    async def _process_stream_response(\n        cls,\n        response,\n        account: Dict[str, Any],\n        scraper: CloudScraper,\n        prompt: str,\n        model_id: str,\n    ) -> AsyncResult:\n        line_pattern = re.compile(b\"^([0-9a-fA-F]+):(.*)\")\n        target_stream_id = None\n        reward_info = None\n        is_thinking = False\n        thinking_content = \"\"\n        normal_content = \"\"\n        quick_content = \"\"\n        variant_text = \"\"","sourceCodeStart":775,"sourceCodeEnd":811,"githubUrl":"https://github.com/xtekky/gpt4free/blob/973504e1770928ed5fb82f43da528f441ad9ddc3/g4f/Provider/Yupp.py#L775-L811","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check Yupp service status / retry later if 500s indicate an upstream outage","Supply multiple fresh tokens so rotation has real alternatives (YUPP_API_KEY with several tokens)","Update g4f and cloudscraper — a provider change may misclassify responses as failures","Switch to a different provider as fallback while Yupp is unhealthy"],"exampleFix":"# before\nclient = Client(provider='Yupp')\n\n# after\nfrom g4f.Provider import IterListProvider\nclient = Client(provider=IterListProvider([Yupp, Cloudflare, DeepInfra], shuffle=False))","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    resp = await create(..., provider='Yupp')\nexcept ProviderException as e:\n    if 'All Yupp accounts failed' in str(e):\n        resp = await create(..., provider='Cloudflare')  # rotate provider","preventionTips":["Use IterListProvider/RetryProvider so exhaustion falls through to the next provider","Alert when Yupp 500-rate spikes — usually upstream instability","Run with multiple tokens to avoid single-account exhaustion"],"tags":["yupp","account-rotation","upstream-outage","retry-exhausted"],"backgroundTag":null,"analyzedSha":"973504e1770928ed5fb82f43da528f441ad9ddc3","analyzedAt":"2026-08-14T23:45:32.408Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}