{"record":{"id":"1f7dd8a354794f83","repo":"BerriAI/litellm","slug":"generic-client-secret-not-set-set-it-in-env-file","errorCode":null,"errorMessage":"GENERIC_CLIENT_SECRET not set. Set it in .env file","messagePattern":"GENERIC_CLIENT_SECRET not set\\. Set it in \\.env file","errorType":"http","errorClass":"ProxyException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/management_endpoints/ui_sso.py","lineNumber":1294,"sourceCode":"        user_role=user_role,\n        extra_fields=extra_fields,\n    )\n\n\ndef _setup_generic_sso_env_vars(\n    generic_client_id: str, redirect_url: str\n) -> tuple[str, list[str], str, str, str, bool]:\n    \"\"\"Setup and validate Generic SSO environment variables.\"\"\"\n    generic_client_secret: Final = os.getenv(\"GENERIC_CLIENT_SECRET\", None)\n    generic_scope: Final = os.getenv(\"GENERIC_SCOPE\", \"openid email profile\").split(\" \")\n    generic_authorization_endpoint: Final = os.getenv(\"GENERIC_AUTHORIZATION_ENDPOINT\", None)\n    generic_token_endpoint: Final = os.getenv(\"GENERIC_TOKEN_ENDPOINT\", None)\n    generic_userinfo_endpoint: Final = os.getenv(\"GENERIC_USERINFO_ENDPOINT\", None)\n    generic_include_client_id: Final = os.getenv(\"GENERIC_INCLUDE_CLIENT_ID\", \"false\").lower() == \"true\"\n\n    # Validate required environment variables\n    if generic_client_secret is None:\n        raise ProxyException(\n            message=\"GENERIC_CLIENT_SECRET not set. Set it in .env file\",\n            type=ProxyErrorTypes.auth_error,\n            param=\"GENERIC_CLIENT_SECRET\",\n            code=status.HTTP_500_INTERNAL_SERVER_ERROR,\n        )\n    if generic_authorization_endpoint is None:\n        raise ProxyException(\n            message=\"GENERIC_AUTHORIZATION_ENDPOINT not set. Set it in .env file\",\n            type=ProxyErrorTypes.auth_error,\n            param=\"GENERIC_AUTHORIZATION_ENDPOINT\",\n            code=status.HTTP_500_INTERNAL_SERVER_ERROR,\n        )\n    if generic_token_endpoint is None:\n        raise ProxyException(\n            message=\"GENERIC_TOKEN_ENDPOINT not set. Set it in .env file\",\n            type=ProxyErrorTypes.auth_error,\n            param=\"GENERIC_TOKEN_ENDPOINT\",\n            code=status.HTTP_500_INTERNAL_SERVER_ERROR,","sourceCodeStart":1276,"sourceCodeEnd":1312,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/ui_sso.py#L1276-L1312","documentation":"Error \"GENERIC_CLIENT_SECRET not set. Set it in .env file\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/ui_sso.py:1294 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set GENERIC_CLIENT_SECRET in the .env file and restart the proxy."],"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-14T05:17:10.506Z"}