From 21c70323dfea757659356df9d5f913a38c3a1a26 Mon Sep 17 00:00:00 2001 From: jnjpng Date: Fri, 16 Jan 2026 12:05:18 -0800 Subject: [PATCH] fix: respect strict mode for temporal with fallback on client (#8839) * base * update --- letta/llm_api/openai_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/letta/llm_api/openai_client.py b/letta/llm_api/openai_client.py index 311a7379..c1cb1f5b 100644 --- a/letta/llm_api/openai_client.py +++ b/letta/llm_api/openai_client.py @@ -569,6 +569,10 @@ class OpenAIClient(LLMClientBase): tool.function = FunctionSchema(**structured_output_version) except ValueError as e: logger.warning(f"Failed to convert tool function to structured output, tool={tool}, error={e}") + else: + # Ensure strict is False when not using structured output + # This overrides any strict: True that may have been set by enable_strict_mode() + tool.function.strict = False if not supports_structured_output(llm_config) else tool.function.strict request_data = data.model_dump(exclude_unset=True) # If Ollama