Share via

Getting error "No connection matching model: gpt-5.1"

Nishant Gupta 0 Reputation points Microsoft Employee
2026-02-26T11:54:35.88+00:00

I am using OpenAI SDK (.NET) for connecting to Azure foundry and creating agents using AzureAssistantClient. I have model deployed in Azure Foundry with gpt 5.1 but when I create thread run and tried to call GetRunAsync to get the status of the run, it fails saying "No connection matching model: gpt-5.1".

With same agent configuration, I am using ChatClient and when invoked CompleteChatAsync, it is able to run successfully

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform

{count} votes

1 answer

Sort by: Most helpful
  1. Manas Mohanty 14,660 Reputation points Microsoft External Staff Moderator
    2026-03-05T01:57:54.6066667+00:00

    Hi Nishant Gupta

    I am trying to replicate this issue to be in same page.

    It seems you are using "AzureAssistantClient" to create Agents and facing some issue while using "GetRunAsync" to get the status of the runs.

    The codes mentioned in official documentation for Foundry classic uses PersistentAgent client though.(GPT 5.1 not supported)

    https://learn.microsoft.com/en-us/azure/foundry-classic/agents/quickstart?pivots=programming-language-csharp

    Also, attached code for new foundry which uses "projectClient" (GPT 5.1 supported)

    https://learn.microsoft.com/en-us/azure/foundry/quickstarts/get-started-code?tabs=csharp

    Please share your observation with official documentation usage.

    Have shared my connect details via private message to connect post minimal replication with respect to above official documentation to find any recent regression issues.

    Thank you for your inputs.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.