diff --git a/letta/agents/helpers.py b/letta/agents/helpers.py index 42257436..7f001176 100644 --- a/letta/agents/helpers.py +++ b/letta/agents/helpers.py @@ -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 diff --git a/letta/schemas/providers/openai.py b/letta/schemas/providers/openai.py index c01a9542..c3810255 100644 --- a/letta/schemas/providers/openai.py +++ b/letta/schemas/providers/openai.py @@ -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