Skip to content

Commit a356a16

Browse files
.NET: Remove OpenAIAssistantClientExtensions class (#5058)
* Remove OpenAIAssistantClientExtensions class Remove the deprecated OpenAI Assistants API extension methods, along with their unit tests, integration tests, sample project, and related references. - Delete OpenAIAssistantClientExtensions.cs (source) - Delete OpenAIAssistantClientExtensionsTests.cs (unit + integration tests) - Delete Agent_With_OpenAIAssistants sample project - Remove sample from solution file, README, and verify-samples definitions - Remove AIOpenAIAssistants diagnostic ID constant Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * add removed extension methods to the suppression file --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 95fd5ec commit a356a16

11 files changed

Lines changed: 35 additions & 1802 deletions

File tree

dotnet/agent-framework-dotnet.slnx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
<Project Path="samples/02-agents/AgentProviders/Agent_With_GoogleGemini/Agent_With_GoogleGemini.csproj" />
3535
<Project Path="samples/02-agents/AgentProviders/Agent_With_Ollama/Agent_With_Ollama.csproj" />
3636
<Project Path="samples/02-agents/AgentProviders/Agent_With_ONNX/Agent_With_ONNX.csproj" />
37-
<Project Path="samples/02-agents/AgentProviders/Agent_With_OpenAIAssistants/Agent_With_OpenAIAssistants.csproj" />
3837
<Project Path="samples/02-agents/AgentProviders/Agent_With_OpenAIChatCompletion/Agent_With_OpenAIChatCompletion.csproj" />
3938
<Project Path="samples/02-agents/AgentProviders/Agent_With_OpenAIResponses/Agent_With_OpenAIResponses.csproj" />
4039
</Folder>

dotnet/eng/verify-samples/AgentsSamples.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -781,19 +781,6 @@ internal static class AgentsSamples
781781
SkipReason = "Requires local Ollama server.",
782782
},
783783

784-
new SampleDefinition
785-
{
786-
Name = "Agent_With_OpenAIAssistants",
787-
ProjectPath = "samples/02-agents/AgentProviders/Agent_With_OpenAIAssistants",
788-
RequiredEnvironmentVariables = ["OPENAI_API_KEY"],
789-
OptionalEnvironmentVariables = ["OPENAI_CHAT_MODEL_NAME"],
790-
ExpectedOutputDescription =
791-
[
792-
"The output should contain a joke about a pirate from the OpenAI Assistants API.",
793-
"The output should not contain error messages or stack traces.",
794-
],
795-
},
796-
797784
new SampleDefinition
798785
{
799786
Name = "Agent_With_OpenAIChatCompletion",

dotnet/samples/02-agents/AgentProviders/Agent_With_OpenAIAssistants/Agent_With_OpenAIAssistants.csproj

Lines changed: 0 additions & 15 deletions
This file was deleted.

dotnet/samples/02-agents/AgentProviders/Agent_With_OpenAIAssistants/Program.cs

Lines changed: 0 additions & 41 deletions
This file was deleted.

dotnet/samples/02-agents/AgentProviders/Agent_With_OpenAIAssistants/README.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

dotnet/samples/02-agents/AgentProviders/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ See the README.md for each sample for the prerequisites for that sample.
2525
|[Creating an AIAgent with GitHub Copilot](./Agent_With_GitHubCopilot/)|This sample demonstrates how to create an AIAgent using GitHub Copilot SDK as the underlying inference service|
2626
|[Creating an AIAgent with Ollama](./Agent_With_Ollama/)|This sample demonstrates how to create an AIAgent using Ollama as the underlying inference service|
2727
|[Creating an AIAgent with ONNX](./Agent_With_ONNX/)|This sample demonstrates how to create an AIAgent using ONNX as the underlying inference service|
28-
|[Creating an AIAgent with OpenAI Assistants](./Agent_With_OpenAIAssistants/)|This sample demonstrates how to create an AIAgent using OpenAI Assistants as the underlying inference service.</br>WARNING: The Assistants API is deprecated and will be shut down. For more information see the OpenAI documentation: https://platform.openai.com/docs/assistants/migration|
2928
|[Creating an AIAgent with OpenAI ChatCompletion](./Agent_With_OpenAIChatCompletion/)|This sample demonstrates how to create an AIAgent using OpenAI ChatCompletion as the underlying inference service|
3029
|[Creating an AIAgent with OpenAI Responses](./Agent_With_OpenAIResponses/)|This sample demonstrates how to create an AIAgent using OpenAI Responses as the underlying inference service|
3130

dotnet/src/Microsoft.Agents.AI.OpenAI/CompatibilitySuppressions.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,41 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
33
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
4+
<Suppression>
5+
<DiagnosticId>CP0001</DiagnosticId>
6+
<Target>T:OpenAI.Assistants.OpenAIAssistantClientExtensions</Target>
7+
<Left>lib/net10.0/Microsoft.Agents.AI.OpenAI.dll</Left>
8+
<Right>lib/net10.0/Microsoft.Agents.AI.OpenAI.dll</Right>
9+
<IsBaselineSuppression>true</IsBaselineSuppression>
10+
</Suppression>
11+
<Suppression>
12+
<DiagnosticId>CP0001</DiagnosticId>
13+
<Target>T:OpenAI.Assistants.OpenAIAssistantClientExtensions</Target>
14+
<Left>lib/net472/Microsoft.Agents.AI.OpenAI.dll</Left>
15+
<Right>lib/net472/Microsoft.Agents.AI.OpenAI.dll</Right>
16+
<IsBaselineSuppression>true</IsBaselineSuppression>
17+
</Suppression>
18+
<Suppression>
19+
<DiagnosticId>CP0001</DiagnosticId>
20+
<Target>T:OpenAI.Assistants.OpenAIAssistantClientExtensions</Target>
21+
<Left>lib/net8.0/Microsoft.Agents.AI.OpenAI.dll</Left>
22+
<Right>lib/net8.0/Microsoft.Agents.AI.OpenAI.dll</Right>
23+
<IsBaselineSuppression>true</IsBaselineSuppression>
24+
</Suppression>
25+
<Suppression>
26+
<DiagnosticId>CP0001</DiagnosticId>
27+
<Target>T:OpenAI.Assistants.OpenAIAssistantClientExtensions</Target>
28+
<Left>lib/net9.0/Microsoft.Agents.AI.OpenAI.dll</Left>
29+
<Right>lib/net9.0/Microsoft.Agents.AI.OpenAI.dll</Right>
30+
<IsBaselineSuppression>true</IsBaselineSuppression>
31+
</Suppression>
32+
<Suppression>
33+
<DiagnosticId>CP0001</DiagnosticId>
34+
<Target>T:OpenAI.Assistants.OpenAIAssistantClientExtensions</Target>
35+
<Left>lib/netstandard2.0/Microsoft.Agents.AI.OpenAI.dll</Left>
36+
<Right>lib/netstandard2.0/Microsoft.Agents.AI.OpenAI.dll</Right>
37+
<IsBaselineSuppression>true</IsBaselineSuppression>
38+
</Suppression>
439
<Suppression>
540
<DiagnosticId>CP0002</DiagnosticId>
641
<Target>M:OpenAI.Responses.OpenAIResponseClientExtensions.AsAIAgent(OpenAI.Responses.ResponsesClient,Microsoft.Agents.AI.ChatClientAgentOptions,System.Func{Microsoft.Extensions.AI.IChatClient,Microsoft.Extensions.AI.IChatClient},Microsoft.Extensions.Logging.ILoggerFactory,System.IServiceProvider)</Target>

0 commit comments

Comments
 (0)