{"record":{"id":"312ade13e6046d98","repo":"BerriAI/litellm","slug":"litellm-error-trying-to-use-supabase-but-url-or-k","errorCode":null,"errorMessage":"LiteLLM Error, trying to use Supabase but url or key not passed. Create a table and set `litellm.supabase_url=<your-url>` and `litellm.supabase_key=<your-key>`","messagePattern":"LiteLLM Error, trying to use Supabase but url or key not passed\\. Create a table and set `litellm\\.supabase_url=<your-url>` and `litellm\\.supabase_key=<your-key>`","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/supabase.py","lineNumber":28,"sourceCode":"import litellm\n\n\nclass Supabase:\n    # Class variables or attributes\n    supabase_table_name = \"request_logs\"\n\n    def __init__(self):\n        # Instance variables\n        self.supabase_url = os.getenv(\"SUPABASE_URL\")\n        self.supabase_key = os.getenv(\"SUPABASE_KEY\")\n        try:\n            import supabase\n        except ImportError:\n            subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"supabase\"])\n            import supabase\n\n        if self.supabase_url is None or self.supabase_key is None:\n            raise ValueError(\n                \"LiteLLM Error, trying to use Supabase but url or key not passed. Create a table and set `litellm.supabase_url=<your-url>` and `litellm.supabase_key=<your-key>`\"\n            )\n        self.supabase_client = supabase.create_client(self.supabase_url, self.supabase_key)\n\n    def input_log_event(self, model, messages, end_user, litellm_call_id, print_verbose):\n        try:\n            print_verbose(f\"Supabase Logging - Enters input logging function for model {model}\")\n            supabase_data_obj: Final = {\n                \"model\": model,\n                \"messages\": messages,\n                \"end_user\": end_user,\n                \"status\": \"initiated\",\n                \"litellm_call_id\": litellm_call_id,\n            }\n            data, count = self.supabase_client.table(self.supabase_table_name).insert(supabase_data_obj).execute()\n            print_verbose(f\"data: {data}\")\n        except Exception:\n            print_verbose(f\"Supabase Logging Error - {traceback.format_exc()}\")","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/integrations/supabase.py#L10-L46","documentation":"Supabase logger init found neither SUPABASE_URL nor SUPABASE_KEY in the environment (and no litellm.supabase_url/key overrides), so there is no database to write request_logs to; the message points at the required settings.","triggerScenarios":"Using the Supabase callback without configuring url and key.","commonSituations":"Missing one of the two settings, or settings applied after the logger initialized.","solutions":["Set litellm.supabase_url and litellm.supabase_key with your Supabase project URL and key."],"exampleFix":"litellm.supabase_url='https://xyz.supabase.co'; litellm.supabase_key='<service-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-23T08:17:48.524Z"}