Skip to content

Commit 14eced9

Browse files
authored
Match OpenAI models in strictness (#1356)
1 parent 613dac8 commit 14eced9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pydantic_ai_slim/pydantic_ai/models/openai.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,8 @@ def _map_tool_definition(f: ToolDefinition) -> responses.FunctionToolParam:
630630
'parameters': f.parameters_json_schema,
631631
'type': 'function',
632632
'description': f.description,
633-
'strict': True,
633+
# TODO(Marcelo): We should make this configurable, and if True, set `additionalProperties` to False.
634+
'strict': False,
634635
}
635636

636637
async def _map_message(self, messages: list[ModelMessage]) -> tuple[str, list[responses.ResponseInputItemParam]]:

0 commit comments

Comments
 (0)