BerriAI/litellm · error · GigaChatAuthError

GigaChat authentication request failed

Error message

GigaChat authentication request failed: {e}

What it means

Error "GigaChat authentication request failed: {e}" thrown in BerriAI/litellm.

Solutions

  1. The token request itself failed (network/TLS); check connectivity to GigaChat's OAuth endpoint and any corporate proxy or CA bundle settings.

When it happens

Trigger: Thrown at litellm/llms/gigachat/authenticator.py:179 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/0cf74ef2fe993a66. Report an issue: GitHub.

Appendix: source

Thrown at litellm/llms/gigachat/authenticator.py:179

        "RqUID": str(uuid.uuid4()),
        "Content-Type": "application/x-www-form-urlencoded",
    }
    data: Final = {"scope": scope}

    verbose_logger.debug("Requesting GigaChat access token from %s", auth_url)

    try:
        client: Final = _get_http_client()
        response: Final = client.post(auth_url, headers=headers, data=data, timeout=30)
        response.raise_for_status()
        return _parse_token_response(response)
    except httpx.HTTPStatusError as e:
        raise GigaChatAuthError(
            status_code=e.response.status_code,
            message=f"GigaChat authentication failed: {e.response.text}",
        )
    except httpx.RequestError as e:
        raise GigaChatAuthError(
            status_code=500,
            message=f"GigaChat authentication request failed: {e}",
        )


async def _request_token_async(
    credentials: str,
    scope: str,
    auth_url: str,
) -> tuple[str, int]:
    """Async version of _request_token_sync."""
    headers: Final = {
        "Authorization": f"Basic {credentials}",
        "RqUID": str(uuid.uuid4()),
        "Content-Type": "application/x-www-form-urlencoded",
    }
    data: Final = {"scope": scope}

View on GitHub (pinned to 77b7c6c40c)