Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform
This capability is not documented as supported in the new Microsoft Foundry agents experience when using responses.create() with agent_reference.
In the classic model, files could be attached to a thread message (for example via MessageAttachment), which then became available to tools like Code Interpreter or file search on that thread-specific vector store. In the new model:
-
responses.create()is a simplified, synchronous execution API that takesinput, optionalconversation, and anagent_referenceinextra_body. - The available documentation for tools focuses on:
- File search, where files are uploaded, added to a vector store, and then attached at the agent or conversation level, not passed as
file_idparameters onresponses.create(). - Code Interpreter, where troubleshooting covers upload/download of files via annotations and containers, but does not describe any
file_idargument onresponses.create()or conversation item creation.
- File search, where files are uploaded, added to a vector store, and then attached at the agent or conversation level, not passed as
The provided references show how to:
- Upload files and create vector stores for file search, including the requirement
purpose="assistants"and supported file types such as.csv(astext/plainortext/csv-compatible) and.pdf,.json, etc., but only in the context of file search and vector stores, not Code Interpreter containers. - Use the new
responses.create()API withagent_referencefor executing agent logic, without any documented mechanism to attach files byfile_idin the request body.
Because no parameter or pattern is documented for passing file_id into responses.create() or conversation.item.create() with agent_reference, and the only file-handling patterns described are:
- File search via vector stores attached to agents or conversations, and
- Classic agents/threads with message attachments,
the ability to directly attach uploaded files to a Code Interpreter container at responses.create() time is not currently documented or supported in the new agents SDK.
The supported and documented file-related options in the new experience are:
- Use file search: upload files, create a vector store, and attach it to the agent or conversation so the agent can retrieve content from those files.
- For Code Interpreter, rely on the tool’s own file upload/download flow via annotations (for example
container_file_citation), not via afile_idparameter onresponses.create().
References: