-
Notifications
You must be signed in to change notification settings - Fork 665
Closed
Description
diff --git a/openevolve/llm/openai.py b/openevolve/llm/openai.py
index d396dd1..77f04a8 100644
--- a/openevolve/llm/openai.py
+++ b/openevolve/llm/openai.py
@@ -66,8 +66,10 @@ class OpenAILLM(LLMInterface):
formatted_messages.extend(messages)
# Set up generation parameters
- if self.api_base == "https://api.openai.com/v1" and str(self.model).lower().startswith("o"):
- # For o-series models
+ model_lower = str(self.model).lower()
+ # Check if model is o-series or gpt-5, which require max_completion_tokens
+ if self.api_base == "https://api.openai.com/v1" and (model_lower.startswith("o") or model_lower.startswith("gpt-5")):
+ # For o-series models and gpt-5
params = {
"model": self.model,
"messages": formatted_messages,
Metadata
Metadata
Assignees
Labels
No labels