diff --git a/dotnet/samples/HostedAgents/AgentWithHostedMCP/AgentWithHostedMCP.csproj b/dotnet/samples/HostedAgents/AgentWithHostedMCP/AgentWithHostedMCP.csproj
index d2c0ea70f8..1244b81542 100644
--- a/dotnet/samples/HostedAgents/AgentWithHostedMCP/AgentWithHostedMCP.csproj
+++ b/dotnet/samples/HostedAgents/AgentWithHostedMCP/AgentWithHostedMCP.csproj
@@ -39,8 +39,8 @@
-
-
+
+
diff --git a/dotnet/samples/HostedAgents/AgentWithHostedMCP/Program.cs b/dotnet/samples/HostedAgents/AgentWithHostedMCP/Program.cs
index 9cbea8b73a..4dffdf92bd 100644
--- a/dotnet/samples/HostedAgents/AgentWithHostedMCP/Program.cs
+++ b/dotnet/samples/HostedAgents/AgentWithHostedMCP/Program.cs
@@ -9,7 +9,7 @@
using Azure.Identity;
using Microsoft.Agents.AI;
using Microsoft.Extensions.AI;
-using OpenAI;
+using OpenAI.Responses;
var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set.");
var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
@@ -25,7 +25,7 @@
AIAgent agent = new AzureOpenAIClient(
new Uri(endpoint),
new DefaultAzureCredential())
- .GetOpenAIResponseClient(deploymentName)
+ .GetResponsesClient(deploymentName)
.CreateAIAgent(
instructions: "You answer questions by searching the Microsoft Learn content only.",
name: "MicrosoftLearnAgent",
diff --git a/dotnet/samples/HostedAgents/AgentWithTextSearchRag/AgentWithTextSearchRag.csproj b/dotnet/samples/HostedAgents/AgentWithTextSearchRag/AgentWithTextSearchRag.csproj
index 54791c1992..03ffaf1824 100644
--- a/dotnet/samples/HostedAgents/AgentWithTextSearchRag/AgentWithTextSearchRag.csproj
+++ b/dotnet/samples/HostedAgents/AgentWithTextSearchRag/AgentWithTextSearchRag.csproj
@@ -38,8 +38,8 @@
-
-
+
+
diff --git a/dotnet/samples/HostedAgents/AgentWithTextSearchRag/Program.cs b/dotnet/samples/HostedAgents/AgentWithTextSearchRag/Program.cs
index d8be12c5b5..b197ffeefc 100644
--- a/dotnet/samples/HostedAgents/AgentWithTextSearchRag/Program.cs
+++ b/dotnet/samples/HostedAgents/AgentWithTextSearchRag/Program.cs
@@ -8,9 +8,8 @@
using Azure.AI.OpenAI;
using Azure.Identity;
using Microsoft.Agents.AI;
-using Microsoft.Agents.AI.Data;
using Microsoft.Extensions.AI;
-using OpenAI;
+using OpenAI.Chat;
var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set.");
var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
@@ -28,7 +27,10 @@
.GetChatClient(deploymentName)
.CreateAIAgent(new ChatClientAgentOptions
{
- Instructions = "You are a helpful support specialist for Contoso Outdoors. Answer questions using the provided context and cite the source document when available.",
+ ChatOptions = new ChatOptions
+ {
+ Instructions = "You are a helpful support specialist for Contoso Outdoors. Answer questions using the provided context and cite the source document when available.",
+ },
AIContextProviderFactory = ctx => new TextSearchProvider(MockSearchAsync, ctx.SerializedState, ctx.JsonSerializerOptions, textSearchOptions)
});
diff --git a/dotnet/src/Microsoft.Agents.AI.Purview/README.md b/dotnet/src/Microsoft.Agents.AI.Purview/README.md
index 3e46ceff65..1ee2a25826 100644
--- a/dotnet/src/Microsoft.Agents.AI.Purview/README.md
+++ b/dotnet/src/Microsoft.Agents.AI.Purview/README.md
@@ -50,7 +50,7 @@ TokenCredential browserCredential = new InteractiveBrowserCredential(
IChatClient client = new AzureOpenAIClient(
new Uri(endpoint),
new AzureCliCredential())
- .GetOpenAIResponseClient(deploymentName)
+ .GetResponsesClient(deploymentName)
.AsIChatClient()
.AsBuilder()
.WithPurview(browserCredential, new PurviewSettings("My Sample App"))
@@ -198,7 +198,7 @@ Use the chat middleware when you attach directly to a chat client (e.g. minimal
IChatClient client = new AzureOpenAIClient(
new Uri(endpoint),
new AzureCliCredential())
- .GetOpenAIResponseClient(deploymentName)
+ .GetResponsesClient(deploymentName)
.AsIChatClient()
.AsBuilder()
.WithPurview(browserCredential, new PurviewSettings("Agent Framework Test App"))