From 61a3923b718ac86927006197c7babfde76ce72f6 Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Fri, 1 May 2026 15:11:56 -0700 Subject: [PATCH] [Fix] Proxy: Repair Stale HTTP_METHODS Reference In Lazy OpenAPI Snapshot _normalize_operation_ids referenced HTTP_METHODS but only HTTP_METHOD_SUFFIXES is defined, raising NameError on snapshot generation and failing test_lazy_openapi_snapshot. The constant was renamed in an earlier merge without updating these two references; values are identical sets of HTTP method names. --- litellm/proxy/_lazy_openapi_snapshot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/_lazy_openapi_snapshot.py b/litellm/proxy/_lazy_openapi_snapshot.py index de118a66d98..c63ff8d0733 100644 --- a/litellm/proxy/_lazy_openapi_snapshot.py +++ b/litellm/proxy/_lazy_openapi_snapshot.py @@ -61,12 +61,12 @@ def _normalize_operation_ids(paths: Dict[str, Dict]) -> None: if not isinstance(path_ops, dict): continue - methods = {method for method in path_ops if method in HTTP_METHODS} + methods = {method for method in path_ops if method in HTTP_METHOD_SUFFIXES} if not methods: continue for method, operation in path_ops.items(): - if method not in HTTP_METHODS or not isinstance(operation, dict): + if method not in HTTP_METHOD_SUFFIXES or not isinstance(operation, dict): continue operation_id = operation.get("operationId")