feat: add reasoning_effort config to enable LLM thinking mode

This commit is contained in:
Re-bin
2026-02-28 17:18:05 +00:00
parent 0a5f3b6194
commit f9d72e2e74
9 changed files with 23 additions and 2 deletions

View File

@@ -178,6 +178,7 @@ class LiteLLMProvider(LLMProvider):
model: str | None = None,
max_tokens: int = 4096,
temperature: float = 0.7,
reasoning_effort: str | None = None,
) -> LLMResponse:
"""
Send a chat completion request via LiteLLM.
@@ -224,6 +225,10 @@ class LiteLLMProvider(LLMProvider):
if self.extra_headers:
kwargs["extra_headers"] = self.extra_headers
if reasoning_effort:
kwargs["reasoning_effort"] = reasoning_effort
kwargs["drop_params"] = True
if tools:
kwargs["tools"] = tools
kwargs["tool_choice"] = "auto"