xtekky/gpt4free · error · MissingAuthError
No Yupp accounts configured. Set YUPP_API_KEY environment va
Error message
No Yupp accounts configured. Set YUPP_API_KEY environment variable.
What it means
Raised by Yupp.get_models() as a MissingAuthError when no API token can be resolved. The provider tries three sources in order: the api_key argument, AuthManager.load_api_key (env var YUPP_API_KEY / stored auth), then browser cookie scraping via get_cookie_tokens(). Only if all three yield nothing does it raise, because listing models requires a real authenticated call to Yupp's model manager.
Source
Thrown at g4f/Provider/Yupp.py:413
class Yupp(AsyncGeneratorProvider, ProviderModelMixin):
url = "https://yupp.ai"
login_url = "https://discord.gg/qXA4Wf4Fsm"
working = False and has_cloudscraper
active_by_default = True
supports_stream = True
image_cache = True
@classmethod
def get_models(cls, api_key: str = None, **kwargs) -> List[str]:
if not cls.models:
if not api_key:
api_key = AuthManager.load_api_key(cls)
if not api_key:
api_key = get_cookie_tokens()
if api_key:
load_yupp_accounts(api_key)
else:
raise MissingAuthError(
"No Yupp accounts configured. Set YUPP_API_KEY environment variable."
)
api_key = YUPP_ACCOUNTS[0]["token"] if YUPP_ACCOUNTS else None
manager = YuppModelManager(session=create_scraper(), api_key=api_key)
models = manager.client.fetch_models()
if models:
cls.models_tags = {
model.get("name"): manager.processor.generate_tags(model)
for model in models
}
cls.models = [model.get("name") for model in models]
cls.image_models = [
model.get("name")
for model in models
if model.get("isImageGeneration")
]
cls.vision_models = [
model.get("name")View on GitHub (pinned to 973504e177)
Solutions
- Set the YUPP_API_KEY environment variable to a valid yupp.ai session token
- Log in to yupp.ai in a local browser so get_cookie_tokens() can harvest session cookies
- Pass api_key explicitly: Yupp.get_models(api_key='...')
- Store the key via g4f's AuthManager so load_api_key() finds it
Example fix
# before models = Yupp.get_models() # after import os os.environ['YUPP_API_KEY'] = 'your-yupp-session-token' models = Yupp.get_models()
Defensive patterns
Strategy: validation
Validate before calling
import os
from g4f.Provider.Yupp import get_cookie_tokens
def yupp_credentials_present(api_key=None):
return bool(api_key or os.getenv('YUPP_API_KEY') or get_cookie_tokens())
# call before Yupp.get_models() Try / catch
from g4f.errors import MissingAuthError
try:
models = Yupp.get_models()
except MissingAuthError:
models = [] # or prompt user for YUPP_API_KEY Prevention
- Set YUPP_API_KEY in the deployment environment rather than relying on browser cookies
- Skip Yupp in provider lists when no credential is detected
- Cache the model list so get_models() is not called on every request
When it happens
Trigger: Calling g4f.Provider.Yupp.get_models() (directly or via client.get_models()) on a machine with no YUPP_API_KEY environment variable, no saved auth file, and no yupp.ai session cookies in the local browser cookie store.
Common situations: Fresh installs/headless servers (no browser cookies exist), CI containers, or environments where the auth file was cleared. Users who assume model listing is public and needs no key.
Related errors
- Cannot validate GLM account (status {response.status})
- Failed to obtain API key from Z.ai authentication endpoint
- API key is required for Azure provider. Ask for API key in t
- API key has failed too many times.
- Claude organization ID not found. Please set the 'CLAUDE_ORG
AI-assisted analysis of xtekky/gpt4free@973504e177 (2026-08-14).
Data as JSON: /api/errors/ebbdb9f3cb4bdc31.
Report an issue: GitHub.