Skip to content

Commit 16509f5

Browse files
authored
Merge branch 'main' into addtestframeworktake2
2 parents 30f13c7 + 47b5d81 commit 16509f5

17 files changed

+407
-220
lines changed

.github/workflows/live-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Run live tests
3333
run: dotnet test ./tests/OpenAI.Tests.csproj
3434
--configuration Release
35-
--filter="TestCategory!=Smoke&TestCategory!=Assistants&TestCategory!=StoredChat&TestCategory!=Images&TestCategory!=Uploads&TestCategory!=Moderations&TestCategory!=FineTuning&TestCategory!=Conversation&TestCategory!=MCP&TestCategory!=Manual"
35+
--filter="TestCategory!=Smoke&TestCategory!=Assistants&TestCategory!=StoredChat&TestCategory!=Images&TestCategory!=Uploads&TestCategory!=Moderations&TestCategory!=FineTuning&TestCategory!=Containers&TestCategory!=Conversation&TestCategory!=MCP&TestCategory!=Manual"
3636
--logger "trx;LogFilePrefix=live"
3737
--results-directory ${{github.workspace}}/artifacts/test-results
3838
${{ env.version_suffix_args}}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Run Live Tests
5656
run: dotnet test ./tests/OpenAI.Tests.csproj
5757
--configuration Release
58-
--filter="TestCategory!=Smoke&TestCategory!=Assistants&TestCategory!=StoredChat&TestCategory!=Images&TestCategory!=Uploads&TestCategory!=Moderations&TestCategory!=FineTuning&TestCategory!=Conversation&TestCategory!=MCP&TestCategory!=Manual"
58+
--filter="TestCategory!=Smoke&TestCategory!=Assistants&TestCategory!=StoredChat&TestCategory!=Images&TestCategory!=Uploads&TestCategory!=Moderations&TestCategory!=FineTuning&TestCategory!=Containers&TestCategory!=Conversation&TestCategory!=MCP&TestCategory!=Manual"
5959
--logger "trx;LogFilePrefix=live"
6060
--results-directory ${{ github.workspace }}/artifacts/test-results
6161
${{ env.version_suffix_args }}

CHANGELOG.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,130 @@
11
# Release History
22

3+
## 2.4.0 (2025-09-05)
4+
5+
### Features Added
6+
7+
- OpenAI.Audio:
8+
- Added the `Endpoint` property to `AudioClient`.
9+
- OpenAI.Batch:
10+
- Added the `Endpoint` property to `BatchClient`.
11+
- OpenAI.Chat:
12+
- Added the `Endpoint` property to `ChatClient`.
13+
- Added the `ServiceTier` property to `ChatCompletionOptions`, `ChatCompletion`, and `StreamingChatCompletionUpdate` to configure the policy that the server will use to process the request in terms of pricing, performance, etc.
14+
- Added an explicit conversion operator to `ChatCompletion` and `ChatCompletionDeletionResult` to convert from `ClientResult`.
15+
- OpenAI.Containers:
16+
- Added the `Endpoint` property to `ContainerClient`.
17+
- Added convenience counterparts to the protocol methods of `ContainerClient` that use the strongly-typed model classes.
18+
- Added automatic pagination support to the following methods of `ContainerClient`:
19+
- `GetContainers` and `GetContainersAsync`
20+
- `GetContainerFiles` and `GetContainerFilesAsync`
21+
- Added an explicit conversion operator to `ContainerResource`, `ContainerFileResource`, `DeleteContainerResponse`, and `DeleteContainerFileResponse` to convert from `ClientResult`.
22+
- OpenAI.Embeddings:
23+
- Added the `Endpoint` property to `EmbeddingsClient`.
24+
- Added an explicit conversion operator to `OpenAIEmbeddingCollection` to convert from `ClientResult`.
25+
- OpenAI.Evals:
26+
- Added the `Endpoint` property to `EvaluationClient`.
27+
- OpenAI.Files:
28+
- Added the `Endpoint` property to `OpenAIFileClient`.
29+
- Added an explicit conversion operator to `OpenAIFile`, `OpenAIFileCollection`, and `FileDeletionResult` to convert from `ClientResult`.
30+
- OpenAI.FineTuning:
31+
- Added the `Endpoint` property to `FineTuningClient`.
32+
- OpenAI.Graders:
33+
- Added the `Endpoint` property to `GraderClient`.
34+
- Added an explicit conversion operator to `RunGraderResponse` and `ValidateGraderResponse` to convert from `ClientResult`.
35+
- OpenAI.Images:
36+
- Added the `Endpoint` property to `ImageClient`.
37+
- Added an explicit conversion operator to `GeneratedImageCollection` to convert from `ClientResult`.
38+
- Added the `Background` property to `ImageEditOptions` to set transparency for the background of the generated image(s).
39+
- Added the `Quality` property to `ImageEditOptions` to set the quality of the generated image(s).
40+
- OpenAI.Images:
41+
- Added the `Endpoint` property to `ImageClient`.
42+
- Added an explicit conversion operator to `GeneratedImageCollection` to convert from `ClientResult`.
43+
- Added the `Background` property to `ImageEditOptions` to set transparency for the background of the generated image(s).
44+
- Added the `Quality` property to `ImageEditOptions` to set the quality of the generated image(s).
45+
- OpenAI.Models:
46+
- Added the `Endpoint` property to `OpenAIModelClient`.
47+
- Added an explicit conversion operator to `OpenAIModel`, `OpenAIModelCollection`, and `ModelDeletionResult` to convert from `ClientResult`.
48+
- OpenAI.Moderations:
49+
- Added the `Endpoint` property to `ModerationClient`.
50+
- Added an explicit conversion operator to `ModerationResultCollection` to convert from `ClientResult`.
51+
- OpenAI.Realtime:
52+
- Added a constructor that can take a string API key to `RealtimeClient`.
53+
- Added constructors that can take a custom `AuthenticationPolicy` to `RealtimeClient`.
54+
- Added the `Endpoint` property to `RealtimeClient`.
55+
- Replaced the `RequestOptions` parameter of the following methods of `RealtimeClient` for a new `RealtimeSessionOptions` parameter and a `CancellationToken` parameter:
56+
- `StartConversationSession` and `StartConversationSessionAsync`
57+
- `StartTranscriptionSession` and `StartTranscriptionSessionAsync`
58+
- `StartSession` and `StartSessionAsync`
59+
- OpenAI.Responses:
60+
- Added the `Endpoint` property to `OpenAIResponseClient`.
61+
- Added an explicit conversion operator to `OpenAIResponse` to convert from `ClientResult`.
62+
- Added new classes derived from `ResponseTool` to facilitate certain scenarios:
63+
- `FunctionTool`
64+
- `FileSearchTool`
65+
- `WebSearchTool`
66+
- `ComputerTool`
67+
- Added initial support for integrating with remote MCP servers via the Responses API in streaming and non-streaming scenarios.
68+
- Users can add the new `McpTool` to the `Tools` property of their `ResponseCreationOptions` and configure it.
69+
- Use the `AllowedTools` property to limit which of the server tools can be called by the model.
70+
- Use the `ToolCallApprovalPolicy` property to specify which tools require an explicit approval before being called by the model.
71+
- Support for selecting the `McpTool` via the `ToolChoice` property is coming soon.
72+
- Support for configuring the `McpTool` with an access token that can be used to authenticate with the remote MCP server is coming soon.
73+
- Support for connectors is coming soon.
74+
- Added new classes derived from `ResponseMessageAnnotation` to facilitate certain scenarios:
75+
- `FileCitationMessageAnnotation`
76+
- `FilePathMessageAnnotation`
77+
- `UriCitationMessageAnnotation`
78+
- Added the `ServiceTier` property to `ResponseCreationOptions`, `OpenAIResponse`, and `StreamingChatCompletionUpdate` to configure the policy that the server will use to process the request in terms of pricing, performance, etc.
79+
- OpenAI.VectorStores:
80+
- Added the `Endpoint` property to `OpenAIResponseClient`.
81+
- Added an explicit conversion operator to `VectorStore`, `VectorStoreFile`, `VectorStoreFileBatch`, `VectorStoreDeletionResult`, and `FileFromStoreRemovalResult` to convert from `ClientResult`.
82+
83+
### Bug Fixed
84+
85+
- OpenAI.Realtime:
86+
- Fixed an issue with the classes derived from `ResponseItem` (such as `ReasoningResponseItem`) missing some constructors or property setters, which made it difficult to use them as inputs.
87+
- Fixed an issue with the HTTP pipeline of the `RealtimeClient` that was preventing the following methods from working correctly:
88+
- `CreateEphemeralToken` and `CreateEphemeralTokenAsync`
89+
- `CreateEphemeralTranscriptionToken` and `CreateEphemeralTranscriptionTokenAsync`
90+
91+
### Breaking Changes in Preview APIs
92+
93+
- OpenAI.Chat:
94+
- Changed the type of the `options` parameter of the `GetChatCompletionMessages` method of the `ChatClient` from `ChatCompletionCollectionOptions` to `ChatCompletionMessageCollectionOptions`.
95+
- OpenAI.Realtime:
96+
- Replaced the `RequestOptions` parameter for a new `RealtimeSessionOptions` parameter and a `CancellationToken` parameter.
97+
- OpenAI.Responses:
98+
- Renamed the `Background` property to `BackgroundModeEnabled` for clarity.
99+
- Renamed the `ComputerOutput` class to `ComputerCallOutput`.
100+
- Changed the type of the `Delta` property of `StreamingResponseFunctionCallArgumentsDeltaUpdate` from `string` to `BinaryData`.
101+
- Changed the type of the `Arguments` property of `StreamingResponseFunctionCallArgumentsDoneUpdate` from `string` to `BinaryData` and renamed it to `FunctionArguments`.
102+
- Renamed the `WebSearchContextSize` class to `WebSearchToolContextSize`.
103+
- Renamed the `WebSearchUserLocation` class to `WebSearchToolLocation`.
104+
- Refactored the factory methods of `ResponseItem`.
105+
- Refactored the factory methods of `ResponseTool`.
106+
- Removed the properties of `ResponseMessageAnnotation` except for the `Kind` property and moved them to the new derived types.
107+
- OpenAI.VectorStores:
108+
- Removed the `OperationResult` pattern along with the `CreateVectorStoreOperation` `AddFileToVectorStoreOperation`, and `CreateBatchFileJobOperation` classes.
109+
- Renamed the `VectorStoreBatchFileJob` class to `VectorStoreFileBatch`
110+
- Renamed the `VectorStoreFileAssociation` class to `VectorStoreFile`
111+
- Renamed the `VectorStoreFileAssociationError` class to `VectorStoreFileError`
112+
- Renamed the `VectorStoreFileAssociationStatus` class to `VectorStoreFileStatus`
113+
- Renamed the `VectorStoreFileAssociationErrorCode` class to `VectorStoreFileErrorCode`
114+
- Renamed the `VectorStoreFileAssociationCollectionOptions` class to `VectorStoreFileCollectionOptions`
115+
- Renamed the `VectorStoreFileAssociationCollectionOrder` class to `VectorStoreFileCollectionOrder`
116+
- Renamed the `CancelBatchFileJob` and `CancelBatchFileJobAsync` methods of `VectorStoreClient` to `CancelVectorStoreFileBatch` and `CancelVectorStoreFileBatchAsync`
117+
- Renamed the `CreateBatchFileJob` and `CreateBatchFileJobAsync` methods of `VectorStoreClient` to `AddFileBatchToVectorStore` and `AddFileBatchToVectorStoreAsync`
118+
- Renamed the `GetBatchFileJob` and `GetBatchFileJobAsync` methods of `VectorStoreClient` to `GetVectorStoreFileBatch` and `GetVectorStoreFileBatchAsync`
119+
- Renamed the `GetFileAssociation` and `GetFileAssociationAsync` methods of `VectorStoreClient` to `GetVectorStoreFile` and `GetVectorStoreFileAsync`
120+
- Renamed the `GetFileAssociations` and `GetFileAssociationsAsync` methods of `VectorStoreClient` to `GetVectorStoreFiles` and `GetVectorStoreFilesAsync`
121+
- Renamed the `GetFileAssociationsInBatch` and `GetFileAssociationsInBatchAsync` methods of `VectorStoreClient` to `GetVectorStoreFilesInBatch` and `GetVectorStoreFilesInBatchAsync`
122+
- Renamed the `RemoveFileFromStore` and `RemoveFileFromStoreAsync` methods of `VectorStoreClient` to `RemoveFileFromVectorStore` and `RemoveFileFromVectorStoreAsync`
123+
124+
### Other Changes
125+
126+
- Updated the `System.ClientModel` dependency to version 1.6.1.
127+
3128
## 2.3.0 (2025-08-01)
4129

5130
### Features Added

api/OpenAI.net8.0.cs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4346,13 +4346,12 @@ public class RealtimeClient {
43464346
public virtual Task<ClientResult> CreateEphemeralTokenAsync(BinaryContent content, RequestOptions options = null);
43474347
public virtual ClientResult CreateEphemeralTranscriptionToken(BinaryContent content, RequestOptions options = null);
43484348
public virtual Task<ClientResult> CreateEphemeralTranscriptionTokenAsync(BinaryContent content, RequestOptions options = null);
4349-
public RealtimeSession StartConversationSession(string model, CancellationToken cancellationToken = default);
4350-
public virtual Task<RealtimeSession> StartConversationSessionAsync(string model, RequestOptions options);
4351-
public virtual Task<RealtimeSession> StartConversationSessionAsync(string model, CancellationToken cancellationToken = default);
4352-
public virtual Task<RealtimeSession> StartSessionAsync(string model, string intent, RequestOptions options);
4353-
public RealtimeSession StartTranscriptionSession(CancellationToken cancellationToken = default);
4354-
public virtual Task<RealtimeSession> StartTranscriptionSessionAsync(RequestOptions options);
4355-
public virtual Task<RealtimeSession> StartTranscriptionSessionAsync(CancellationToken cancellationToken = default);
4349+
public RealtimeSession StartConversationSession(string model, RealtimeSessionOptions options = null, CancellationToken cancellationToken = default);
4350+
public virtual Task<RealtimeSession> StartConversationSessionAsync(string model, RealtimeSessionOptions options = null, CancellationToken cancellationToken = default);
4351+
public RealtimeSession StartSession(string model, string intent, RealtimeSessionOptions options = null, CancellationToken cancellationToken = default);
4352+
public virtual Task<RealtimeSession> StartSessionAsync(string model, string intent, RealtimeSessionOptions options = null, CancellationToken cancellationToken = default);
4353+
public RealtimeSession StartTranscriptionSession(RealtimeSessionOptions options = null, CancellationToken cancellationToken = default);
4354+
public virtual Task<RealtimeSession> StartTranscriptionSessionAsync(RealtimeSessionOptions options = null, CancellationToken cancellationToken = default);
43564355
}
43574356
[Experimental("OPENAI002")]
43584357
[Flags]
@@ -4392,7 +4391,7 @@ public class RealtimeItem : IJsonModel<RealtimeItem>, IPersistableModel<Realtime
43924391
}
43934392
[Experimental("OPENAI002")]
43944393
public class RealtimeSession : IDisposable {
4395-
protected internal RealtimeSession(RealtimeClient parentClient, Uri endpoint, ApiKeyCredential credential);
4394+
protected internal RealtimeSession(ApiKeyCredential credential, RealtimeClient parentClient, Uri endpoint, string model, string intent);
43964395
public Net.WebSockets.WebSocket WebSocket { get; protected set; }
43974396
public virtual void AddItem(RealtimeItem item, string previousItemId, CancellationToken cancellationToken = default);
43984397
public virtual void AddItem(RealtimeItem item, CancellationToken cancellationToken = default);
@@ -4408,8 +4407,8 @@ public class RealtimeSession : IDisposable {
44084407
public virtual void ConfigureSession(ConversationSessionOptions sessionOptions, CancellationToken cancellationToken = default);
44094408
public virtual void ConfigureTranscriptionSession(TranscriptionSessionOptions sessionOptions, CancellationToken cancellationToken = default);
44104409
public virtual Task ConfigureTranscriptionSessionAsync(TranscriptionSessionOptions sessionOptions, CancellationToken cancellationToken = default);
4411-
protected internal virtual void Connect(RequestOptions options);
4412-
protected internal virtual Task ConnectAsync(RequestOptions options);
4410+
protected internal virtual void Connect(string queryString = null, IDictionary<string, string> headers = null, CancellationToken cancellationToken = default);
4411+
protected internal virtual Task ConnectAsync(string queryString = null, IDictionary<string, string> headers = null, CancellationToken cancellationToken = default);
44134412
public virtual void DeleteItem(string itemId, CancellationToken cancellationToken = default);
44144413
public virtual Task DeleteItemAsync(string itemId, CancellationToken cancellationToken = default);
44154414
public void Dispose();
@@ -4435,6 +4434,11 @@ public class RealtimeSession : IDisposable {
44354434
public virtual Task TruncateItemAsync(string itemId, int contentPartIndex, TimeSpan audioDuration, CancellationToken cancellationToken = default);
44364435
}
44374436
[Experimental("OPENAI002")]
4437+
public class RealtimeSessionOptions {
4438+
public IDictionary<string, string> Headers { get; }
4439+
public string QueryString { get; set; }
4440+
}
4441+
[Experimental("OPENAI002")]
44384442
public class RealtimeUpdate : IJsonModel<RealtimeUpdate>, IPersistableModel<RealtimeUpdate> {
44394443
public string EventId { get; }
44404444
public RealtimeUpdateKind Kind { get; }

0 commit comments

Comments
 (0)