This commit is contained in:
Engel Nyst
2025-05-14 21:46:03 +02:00
committed by GitHub
parent d956abe56b
commit e4586432ad
3 changed files with 44 additions and 0 deletions

View File

@@ -159,6 +159,11 @@ class LLM(RetryMixin, DebugMixin):
'temperature': self.config.temperature,
'max_completion_tokens': self.config.max_output_tokens,
}
if self.config.top_k is not None:
# openai doesn't expose top_k
# litellm will handle it a bit differently than the openai-compatible params
kwargs['top_k'] = self.config.top_k
if (
self.config.model.lower() in REASONING_EFFORT_SUPPORTED_MODELS
or self.config.model.split('/')[-1] in REASONING_EFFORT_SUPPORTED_MODELS