The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix: restrict thinking/reasoning_effort parameters to models with extended thinking support
Tim Elfrink8b66b50c3180
diff --git a/litellm/llms/github_copilot/chat/transformation.py b/litellm/llms/github_copilot/chat/transformation.pyindex e71e9b610ba..2aab0207ca1 100644--- a/litellm/llms/github_copilot/chat/transformation.py+++ b/litellm/llms/github_copilot/chat/transformation.py@@ -81,14 +81,19 @@ class GithubCopilotConfig(OpenAIConfig):"""Get supported OpenAI parameters for GitHub Copilot.- For Anthropic models (like claude-sonnet-4), includes thinking and reasoning parameters.+ For Claude models that support extended thinking (Claude 4 family and Claude 3-7), includes thinking and reasoning_effort parameters.For other models, returns standard OpenAI parameters (which may include reasoning_effort for o-series models)."""+ from litellm.utils import supports_reasoning+# Get base OpenAI parametersbase_params = super().get_supported_openai_params(model)- # Add Claude-specific parameters for Anthropic models- if "claude" in model.lower():+ # Add Claude-specific parameters for models that support extended thinking+ if "claude" in model.lower() and supports_reasoning(+ model=model,+ custom_llm_provider="github_copilot",+ ):if "thinking" not in base_params:base_params.append("thinking")# reasoning_effort is not included by parent for Claude models, so add it