fix(providers): add max_completion_tokens for openai o1 compatibility (#2464)

This commit is contained in:
Flo 2026-03-25 10:35:23 +03:00 committed by GitHub
parent 723ed8172b
commit 33f357119e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -230,6 +230,7 @@ class OpenAICompatProvider(LLMProvider):
"model": model_name,
"messages": self._sanitize_messages(self._sanitize_empty_content(messages)),
"max_tokens": max(1, max_tokens),
"max_completion_tokens": max(1, max_tokens),
"temperature": temperature,
}