{"record":{"id":"31ca35a44cd45ae3","repo":"BerriAI/litellm","slug":"gigachat-credentials-not-provided-set-gigachat-cr","errorCode":null,"errorMessage":"GigaChat credentials not provided. Set GIGACHAT_CREDENTIALS or GIGACHAT_API_KEY environment variable.","messagePattern":"GigaChat credentials not provided\\. Set GIGACHAT_CREDENTIALS or GIGACHAT_API_KEY environment variable\\.","errorType":"exception","errorClass":"GigaChatAuthError","httpStatus":401,"severity":"error","filePath":"litellm/llms/gigachat/authenticator.py","lineNumber":83,"sourceCode":"    auth_url: str | None = None,\n) -> str:\n    \"\"\"\n    Get valid access token, using cache if available.\n\n    Args:\n        credentials: Base64-encoded credentials (client_id:client_secret)\n        scope: API scope (GIGACHAT_API_PERS, GIGACHAT_API_CORP, etc.)\n        auth_url: OAuth endpoint URL\n\n    Returns:\n        Access token string\n\n    Raises:\n        GigaChatAuthError: If authentication fails\n    \"\"\"\n    credentials = credentials or _get_credentials()\n    if not credentials:\n        raise GigaChatAuthError(\n            status_code=401,\n            message=\"GigaChat credentials not provided. Set GIGACHAT_CREDENTIALS or GIGACHAT_API_KEY environment variable.\",\n        )\n\n    scope = scope or _get_scope()\n    auth_url = auth_url or _get_auth_url()\n\n    # Check cache\n    cache_key: Final = f\"gigachat_token:{credentials[:16]}\"\n    cached: Final = _token_cache.get_cache(cache_key)\n    if cached:\n        token, expires_at = cached\n        # Check if token is still valid (with buffer)\n        if time.time() * 1000 < expires_at - TOKEN_EXPIRY_BUFFER_MS:\n            verbose_logger.debug(\"Using cached GigaChat access token\")\n            return token\n\n    # Request new token","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/gigachat/authenticator.py#L65-L101","documentation":"Error \"GigaChat credentials not provided. Set GIGACHAT_CREDENTIALS or GIGACHAT_API_KEY environment variable.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/gigachat/authenticator.py:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set GIGACHAT_CREDENTIALS or GIGACHAT_API_KEY in the environment."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}