Hi ,
I am building agent it is always with default AI Message List structure. Inside agent I am calling AzureAisearch function which should be executed dynamically. The problem is when manually agent tested using systems and user message, it return output. however when called from app it gives below error.
Failed to call AI model. Status code: BadRequest. AzureException BadRequestError - Invalid schema for function 'Call***POC': In context=('properties', 'Request', 'properties', 'Messages', 'items', 'properties', 'Content', 'items', 'properties', 'ContentBinaryData', 'type', '0'), 'additionalProperties' is required to be supplied and to be false.., provider_name: azure (OS-ABRS-FM-40001)
Hello, Sheetal,You can’t really “change” the default AI Message List structure in ODC. The Agent runtime expects that exact shape, and when you call the Agent from an app it validates the function/tool schema much more strictly than in the manual tester.
That error is basically saying: your tool/function JSON schema is missing
additionalProperties: false
on an object level in the path that includes Request -> Messages -> Content -> ContentBinaryData -> type -> "0".
What to do:
Fix the tool/function schema
In the tool you exposed (e.g., Call***POC), ensure every object definition in the schema explicitly has:
"type": "object"
"additionalProperties": false
Especially for nested objects under Request, Messages[], and Content[].
If you have oneOf/anyOf for content types (text vs binary), add additionalProperties: false inside each branch (including the "0" branch mentioned in the error).
Don’t send binary content unless you really need it
When calling from the app, make sure you’re not accidentally populating ContentBinaryData (attachments/images/etc.).
Keep the message content to plain text items only.
Build the messages using the platform helpers
Use the standard ODC pattern to create messages (system/user) and pass that AI Message List directly to the Agent.
Avoid manually crafting JSON for the message list, because it’s easy to introduce extra fields that violate the schema.
If they share their tool schema snippet (the Request / Messages / Content part), you can point out exactly where additionalProperties: false is missing.
Best, Miguel