From 1557e2d4ceb72b7b53fad1efa0e4e35240755fa9 Mon Sep 17 00:00:00 2001 From: Ido Lavi Date: Wed, 19 Nov 2025 16:59:38 +0200 Subject: [PATCH] Use auth key name if there are no app id in in headers or in extra_data --- litellm/proxy/guardrails/guardrail_hooks/noma/noma.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/guardrails/guardrail_hooks/noma/noma.py b/litellm/proxy/guardrails/guardrail_hooks/noma/noma.py index c2e00b0c7c5..24ef66c4bee 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/noma/noma.py +++ b/litellm/proxy/guardrails/guardrail_hooks/noma/noma.py @@ -799,7 +799,7 @@ class NomaGuardrail(CustomGuardrail): or request_data.get("metadata", {}) .get("headers", {}) .get("x-noma-application-id") - or self.application_id, + or (user_auth.key_name if user_auth.key_name else self.application_id), "ipAddress": request_data.get("metadata", {}).get( "requester_ip_address", None ),