OpenAI Multi-Agent SDK Dict Parameter Error - How to Disable additionalProperties for Object Schema

I’m getting an error when using a function tool with Dict parameters in the OpenAI Multi-Agent SDK. Here’s my function:

@function_tool
def process_records(data_dict: Dict, filter_key: str, condition: str, target_value: Union[str, int]) -> Dict:
    pass

The error message says:

agents.exceptions.UserError: additionalProperties should not be set for object types. This could be because you’re using an older version of Pydantic, or because you configured additional properties to be allowed. If you really need this, update the function or output tool to not use a strict schema.

I’m creating my agent like this:

my_agent = Agent(
    name="DataProcessor",
    model="o4-mini", 
    instructions=MY_INSTRUCTIONS,
    tools=[search_records, get_date, process_records]
)

How do I configure the additionalProperties setting to false? I can’t find where to set this in the multi-agent SDK documentation.

I ran into this exact issue last month and found the problem is actually with how the OpenAI SDK handles Dict type annotations. The multi-agent framework generates JSON schemas automatically from your function signatures, and bare Dict types create schemas with additionalProperties enabled by default, which conflicts with the strict mode. Instead of using Dict directly, you need to define a proper Pydantic model or use TypedDict. I switched my approach to something like this: python from typing_extensions import TypedDict class DataRecord(TypedDict): # define your expected structure here id: str value: Union[str, int] @function_tool def process_records(data_dict: DataRecord, filter_key: str, condition: str, target_value: Union[str, int]) -> DataRecord: pass Alternatively, you can create a proper Pydantic BaseModel class if you need more complex validation. The key is giving the SDK a concrete schema structure rather than an open-ended Dict type.