From f704f3f799b66b74c105665db97b598b633fea41 Mon Sep 17 00:00:00 2001 From: hx Date: Sat, 5 Sep 2026 10:48:46 +0800 Subject: [PATCH] refactor(anthropic): use PEP 604 optional typing for reasoning effort flag Co-authored-by: Cursor --- litellm/llms/anthropic/experimental_pass_through/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/anthropic/experimental_pass_through/utils.py b/litellm/llms/anthropic/experimental_pass_through/utils.py index 62f0bfee07d..cfe3e985855 100644 --- a/litellm/llms/anthropic/experimental_pass_through/utils.py +++ b/litellm/llms/anthropic/experimental_pass_through/utils.py @@ -57,7 +57,7 @@ def normalize_reasoning_effort_value( except Exception: model_info = None - def _flag(key: str) -> Optional[bool]: + def _flag(key: str) -> bool | None: """Return the flag value, or None when not declared.""" if not model_info: return None