{"record":{"id":"0ef1f8bf49a8c8e9","repo":"BerriAI/litellm","slug":"environment-variable-oidc-aud-not-found","errorCode":null,"errorMessage":"Environment variable {oidc_aud} not found","messagePattern":"Environment variable (.+?) not found","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/secret_managers/main.py","lineNumber":302,"sourceCode":"                    return oidc_token\n                except Exception as e:\n                    error_msg: Final = f\"Azure OIDC provider failed: {e}\"\n                    verbose_logger.error(error_msg)\n                    raise ValueError(error_msg)\n            with open(azure_federated_token_file, \"r\") as f:\n                oidc_token = f.read()\n                return oidc_token\n        elif oidc_provider == \"file\":\n            # Load token from a file within an allowed credential directory.\n            safe_path: Final = _resolve_oidc_file_path(oidc_aud)\n            with open(safe_path, \"r\") as f:\n                oidc_token = f.read()\n                return oidc_token\n        elif oidc_provider == \"env\":\n            # Load token directly from an environment variable\n            oidc_token = os.getenv(oidc_aud)\n            if oidc_token is None:\n                raise ValueError(f\"Environment variable {oidc_aud} not found\")\n            return oidc_token\n        elif oidc_provider == \"env_path\":\n            # Load token from a file path specified in an environment variable\n            token_file_path: Final = os.getenv(oidc_aud)\n            if token_file_path is None:\n                raise ValueError(f\"Environment variable {oidc_aud} not found\")\n            with open(token_file_path, \"r\") as f:\n                oidc_token = f.read()\n                return oidc_token\n        else:\n            raise ValueError(\"Unsupported OIDC provider\")\n\n    try:\n        if _should_read_secret_from_secret_manager() and litellm.secret_manager_client is not None:\n            try:\n                client: Final = litellm.secret_manager_client\n                key_manager = \"local\"\n                if key_management_system is not None:","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/secret_managers/main.py#L284-L320","documentation":"OIDC failure for the 'env'-style audience resolution: the code treats oidc_aud as an environment variable name and the lookup returned None, so the expected token environment variable is not set in the process.","triggerScenarios":"Thrown at litellm/secret_managers/main.py:302 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Export the environment variable named by {oidc_aud} containing the OIDC audience/token value before the request."],"exampleFix":null,"handlingStrategy":"validation","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"}