{"record":{"id":"e2c27fc1b7021e52","repo":"BerriAI/litellm","slug":"missing-snowflake-jwt-key","errorCode":null,"errorMessage":"Missing Snowflake JWT key","messagePattern":"Missing Snowflake JWT key","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/snowflake/common_utils.py","lineNumber":21,"sourceCode":"        self,\n        headers: dict,\n        JWT: str | None = None,\n    ) -> dict:\n        \"\"\"\n        Return headers to use for Snowflake completion request\n\n        Snowflake REST API Ref: https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-llm-rest-api#api-reference\n        Expected headers:\n        {\n            \"Content-Type\": \"application/json\",\n            \"Accept\": \"application/json\",\n            \"Authorization\": \"Bearer \" + <JWT>,\n            \"X-Snowflake-Authorization-Token-Type\": \"KEYPAIR_JWT\"\n        }\n        \"\"\"\n\n        if JWT is None:\n            raise ValueError(\"Missing Snowflake JWT key\")\n\n        headers.update(\n            {\n                \"Content-Type\": \"application/json\",\n                \"Accept\": \"application/json\",\n                \"Authorization\": \"Bearer \" + JWT,\n                \"X-Snowflake-Authorization-Token-Type\": \"KEYPAIR_JWT\",\n            }\n        )\n        return headers\n","sourceCodeStart":3,"sourceCodeEnd":32,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/snowflake/common_utils.py#L3-L32","documentation":"Guard in the Snowflake header builder: a Bearer JWT is required to authorize Cortex REST API calls (X-Snowflake-Authorization-Token-Type: KEYPAIR_JWT). Fires when no keypair JWT was generated/passed, e.g. missing private key config for the Snowflake deployment.","triggerScenarios":"Triggered when a Snowflake call requires a JWT key but none is configured.","commonSituations":"See trigger scenarios.","solutions":["Provide the Snowflake JWT key (SNOWFLAKE_JWT_KEY) used for authentication."],"exampleFix":"os.environ[\"SNOWFLAKE_JWT_KEY\"] = \"<jwt-key>\"","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"}