feat: set frequency penalty to 1 for gpt-4o (#3962)
This commit is contained in:
@@ -222,6 +222,7 @@ def _safe_load_tool_call_str(tool_call_args_str: str) -> dict:
|
||||
# Load it again - this is due to sometimes Anthropic returning weird json @caren
|
||||
tool_args = json.loads(tool_args)
|
||||
except json.JSONDecodeError:
|
||||
logger.error("Failed to JSON decode tool call argument string: %s", tool_call_args_str)
|
||||
tool_args = {}
|
||||
|
||||
return tool_args
|
||||
|
||||
@@ -142,7 +142,7 @@ class OpenAIProvider(Provider):
|
||||
"""This function is used to tune LLMConfig parameters to improve model performance."""
|
||||
|
||||
# gpt-4o-mini has started to regress with pretty bad emoji spam loops (2025-07)
|
||||
if "gpt-4o-mini" in model_name or "gpt-4.1-mini" in model_name:
|
||||
if "gpt-4o" in model_name or "gpt-4.1-mini" in model_name:
|
||||
llm_config.frequency_penalty = 1.0
|
||||
return llm_config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user