diff --git a/litellm/llms/github_copilot/chat/transformation.py b/litellm/llms/github_copilot/chat/transformation.py index c4969f67602..b18ed73f073 100644 --- a/litellm/llms/github_copilot/chat/transformation.py +++ b/litellm/llms/github_copilot/chat/transformation.py @@ -164,7 +164,7 @@ class GithubCopilotConfig(OpenAIConfig): and thinking.get("type") == "enabled" and existing_reasoning_effort is None ): - budget_tokens = thinking.get("budget_tokens", 0) + budget_tokens = thinking.get("budget_tokens") or 0 if budget_tokens >= 10000: reasoning_effort = "high" elif budget_tokens >= 5000: