From 67d85cbce26aace8cc372e9b406801f30c44926d Mon Sep 17 00:00:00 2001 From: yassin Date: Sat, 3 Oct 2026 23:55:17 +0000 Subject: [PATCH] fix(logging): end pod routing helper with explicit return Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/litellm_core_utils/core_helpers.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/litellm/litellm_core_utils/core_helpers.py b/litellm/litellm_core_utils/core_helpers.py index 420ae7bb372..65bdabf32a1 100644 --- a/litellm/litellm_core_utils/core_helpers.py +++ b/litellm/litellm_core_utils/core_helpers.py @@ -380,17 +380,15 @@ def _standard_logging_kubernetes_pod_routing( or pod_count < 1 ): return None - match selection: - case "round_robin" | "session_affinity" | "session_affinity_retry": - routing_record: Final[StandardLoggingKubernetesPodRouting] = { - "service_host": service_host, - "pod_ip": pod_ip, - "pod_count": pod_count, - "selection": selection, - } - return routing_record - case _: - return None + if selection in ("round_robin", "session_affinity", "session_affinity_retry"): + routing_record: Final[StandardLoggingKubernetesPodRouting] = { + "service_host": service_host, + "pod_ip": pod_ip, + "pod_count": pod_count, + "selection": selection, + } + return routing_record + return None def get_litellm_metadata_from_kwargs(kwargs: dict):