BerriAI/litellm · error · GigaChatAuthError
GigaChat credentials not provided. Set GIGACHAT_CREDENTIALS
Error message
GigaChat credentials not provided. Set GIGACHAT_CREDENTIALS or GIGACHAT_API_KEY environment variable.
What it means
Error "GigaChat credentials not provided. Set GIGACHAT_CREDENTIALS or GIGACHAT_API_KEY environment variable." thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/gigachat/authenticator.py:83
auth_url: str | None = None,
) -> str:
"""
Get valid access token, using cache if available.
Args:
credentials: Base64-encoded credentials (client_id:client_secret)
scope: API scope (GIGACHAT_API_PERS, GIGACHAT_API_CORP, etc.)
auth_url: OAuth endpoint URL
Returns:
Access token string
Raises:
GigaChatAuthError: If authentication fails
"""
credentials = credentials or _get_credentials()
if not credentials:
raise GigaChatAuthError(
status_code=401,
message="GigaChat credentials not provided. Set GIGACHAT_CREDENTIALS or GIGACHAT_API_KEY environment variable.",
)
scope = scope or _get_scope()
auth_url = auth_url or _get_auth_url()
# Check cache
cache_key: Final = f"gigachat_token:{credentials[:16]}"
cached: Final = _token_cache.get_cache(cache_key)
if cached:
token, expires_at = cached
# Check if token is still valid (with buffer)
if time.time() * 1000 < expires_at - TOKEN_EXPIRY_BUFFER_MS:
verbose_logger.debug("Using cached GigaChat access token")
return token
# Request new tokenView on GitHub (pinned to 6c2dcb801b)
Solutions
- Set GIGACHAT_CREDENTIALS or GIGACHAT_API_KEY in the environment.
When it happens
Trigger: Thrown at litellm/llms/gigachat/authenticator.py:83 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/31ca35a44cd45ae3.
Report an issue: GitHub.