{"record":{"id":"4f7e141a19d8b33b","repo":"BerriAI/litellm","slug":"gigachat-authentication-failed-e-response-text","errorCode":null,"errorMessage":"GigaChat authentication failed: {e.response.text}","messagePattern":"GigaChat authentication failed: (.+?)","errorType":"exception","errorClass":"GigaChatAuthError","httpStatus":null,"severity":"error","filePath":"litellm/llms/gigachat/authenticator.py","lineNumber":174,"sourceCode":"    Returns:\n        Tuple of (access_token, expires_at_ms)\n    \"\"\"\n    headers: Final = {\n        \"Authorization\": f\"Basic {credentials}\",\n        \"RqUID\": str(uuid.uuid4()),\n        \"Content-Type\": \"application/x-www-form-urlencoded\",\n    }\n    data: Final = {\"scope\": scope}\n\n    verbose_logger.debug(\"Requesting GigaChat access token from %s\", auth_url)\n\n    try:\n        client: Final = _get_http_client()\n        response: Final = client.post(auth_url, headers=headers, data=data, timeout=30)\n        response.raise_for_status()\n        return _parse_token_response(response)\n    except httpx.HTTPStatusError as e:\n        raise GigaChatAuthError(\n            status_code=e.response.status_code,\n            message=f\"GigaChat authentication failed: {e.response.text}\",\n        )\n    except httpx.RequestError as e:\n        raise GigaChatAuthError(\n            status_code=500,\n            message=f\"GigaChat authentication request failed: {e}\",\n        )\n\n\nasync def _request_token_async(\n    credentials: str,\n    scope: str,\n    auth_url: str,\n) -> tuple[str, int]:\n    \"\"\"Async version of _request_token_sync.\"\"\"\n    headers: Final = {\n        \"Authorization\": f\"Basic {credentials}\",","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/gigachat/authenticator.py#L156-L192","documentation":"Error \"GigaChat authentication failed: {e.response.text}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/gigachat/authenticator.py:174 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the response text in the error; GigaChat rejected the credentials.","Verify GIGACHAT_CREDENTIALS (base64 client credentials) or GIGACHAT_API_KEY, and that the correct auth scope is used."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}