Hi everyone,
I’m seeing what looks like a model/deployment behavior change when moving from a GPT-4.1 deployment to GPT-5.2 in Azure AI Foundry. My models are deployed in Canada East.
What I’m trying to do
Include a PDF as part of a Chat Completions request, so the model can summarize/quote from it.
What worked before (GPT-4.1)
With GPT-4.1, I could include a PDF using ChatMessageContentPart.CreateFilePart(...) and the model clearly used the PDF content in its response.
What happens now (GPT-5.2)
With GPT-5.2, the call returns success (no refusal, no error), but the PDF content is ignored. The answer is generic and behaves as if the file was not provided.
I tried these two approaches:
- Inline file part (bytes in request)
- Upload first + reference by file id (The upload was successful, but again, file content was ignored)
Packages / versions
<PackageReference Include="Azure.AI.OpenAI" Version="2.2.0-beta.4" />
<PackageReference Include="Azure.Core" Version="1.54.0" />
<PackageReference Include="OpenAI" Version="2.2.0-beta.4" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.3.9" />
Region / deployment
- Azure AI Foundry
- Region: Canada East
- Model deployment: gpt-5.2
- Previously: gpt-4.1
Minimal code (upload + fileId reference)
using Azure.AI.OpenAI;
using OpenAI.Chat;
using OpenAI.Files;
using System.ClientModel;
var azureClient = new AzureOpenAIClient(new Uri(endpoint), new ApiKeyCredential(apiKey));
var chatClient = azureClient.GetChatClient(deploymentName); // gpt-5.2 deployment
var fileClient = azureClient.GetOpenAIFileClient();
var upload = fileClient.UploadFile(localPdfPath, FileUploadPurpose.Assistants);
var fileId = upload.Value.Id;
#pragma warning disable OPENAI001
var parts = new List<ChatMessageContentPart>
{
ChatMessageContentPart.CreateTextPart("Summarize the attached PDF and quote the first paragraph verbatim."),
ChatMessageContentPart.CreateFilePart(fileId),
};
#pragma warning restore OPENAI001
var messages = new List<ChatMessage>
{
ChatMessage.CreateUserMessage(parts)
};
var completion = chatClient.CompleteChat(messages);
Console.WriteLine(completion.Value.Content[0].Text);
Minimal code (inline bytes in request)
#pragma warning disable OPENAI001
var parts = new List<ChatMessageContentPart>
{
ChatMessageContentPart.CreateTextPart("Summarize the attached PDF."),
ChatMessageContentPart.CreateFilePart(
BinaryData.FromBytes(pdfBytes, "application/pdf"),
"application/pdf",
"document.pdf")
};
#pragma warning restore OPENAI001
Questions
- Does GPT-5.2 on Azure currently support using PDFs in Chat Completions via
ChatMessageContentPart.CreateFilePart(...) (either inline bytes or fileId)?
- If not, what’s the recommended Azure-supported approach for document grounding with GPT-5.2 (Responses API? Assistants + vector store? something else)?
- Is this a known limitation/bug for gpt-5.2 or for Canada East deployments?
- Are there any required request options, headers, or deployment settings to enable file usage?
Any guidance or confirmation would be appreciated. I can provide sanitized logs / raw request payload if needed.