Skip to content

Commit c46d692

Browse files
committed
merge
2 parents bba0222 + bef01b5 commit c46d692

File tree

1,934 files changed

+542449
-47453
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,934 files changed

+542449
-47453
lines changed

.config/dotnet-tools.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
"snippet-generator"
99
],
1010
"rollForward": false
11+
},
12+
"azure.sdk.tools.testproxy": {
13+
"version": "1.0.0-dev.20250922.2",
14+
"commands": [
15+
"test-proxy"
16+
],
17+
"rollForward": false
1118
}
1219
}
1320
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# This workflow validates changes made to the codegen folder by running code generation
2+
# and ensuring the process completes successfully without errors.
3+
name: CodeGen Validation
4+
5+
on:
6+
pull_request:
7+
paths:
8+
- 'codegen/**'
9+
- 'specification/**'
10+
- '.github/workflows/codegen-validation.yml'
11+
- 'scripts/Invoke-CodeGen.ps1'
12+
types: [opened, reopened, synchronize]
13+
workflow_dispatch:
14+
15+
jobs:
16+
validate-codegen:
17+
name: Validate Code Generation
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '22.x'
28+
29+
- name: Setup .NET
30+
uses: actions/setup-dotnet@v4
31+
with:
32+
# Use the version specified in global.json
33+
global-json-file: global.json
34+
35+
- name: Run CodeGen Script
36+
shell: pwsh
37+
run: |
38+
Write-Host "Running code generation validation..."
39+
./scripts/Invoke-CodeGen.ps1 -Clean
40+
41+
if ($LASTEXITCODE -ne 0) {
42+
Write-Error "Code generation failed with exit code: $LASTEXITCODE"
43+
exit $LASTEXITCODE
44+
}
45+
46+
Write-Host "Code generation completed successfully!"
47+
48+
- name: Check for uncommitted changes
49+
run: |
50+
# Check if there are any changes to tracked files after code generation
51+
if ! git diff --quiet; then
52+
echo "::error::Code generation produced uncommitted changes. Please run the codegen script locally and commit the results."
53+
echo "Changed files:"
54+
git diff --name-only
55+
echo "Diff details:"
56+
git diff
57+
exit 1
58+
fi
59+
60+
# Also check for untracked files that might have been generated
61+
if [ -n "$(git ls-files --others --exclude-standard)" ]; then
62+
echo "::error::Code generation produced untracked files. Please review and commit them if they should be included."
63+
echo "Untracked files:"
64+
git ls-files --others --exclude-standard
65+
exit 1
66+
fi
67+
68+
echo "No uncommitted changes detected - code generation is up to date!"
69+
70+
- name: Run codegen visitor tests
71+
run: dotnet test codegen/generator/test/
72+
--configuration Release
73+
--logger "trx;LogFilePrefix=codegen"
74+
--results-directory ${{github.workspace}}/artifacts/test-results
75+
${{ env.version_suffix_args}}
76+
77+
- name: Upload artifacts
78+
uses: actions/upload-artifact@v4
79+
if: ${{ !cancelled() }}
80+
with:
81+
name: build-artifacts
82+
path: ${{github.workspace}}/artifacts

.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!=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/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ jobs:
4949
if: ${{ !cancelled() }}
5050
with:
5151
name: build-artifacts
52-
path: ${{github.workspace}}/artifacts
52+
path: ${{github.workspace}}/artifacts

.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!=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: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,169 @@
11
# Release History
22

3+
## 2.6.0-beta.1 (Unreleased)
4+
5+
### Acknowledgments
6+
7+
Thank you to our developer community members who helped to make the OpenAI client library better with their contributions to this release:
8+
9+
- Maksim Kurnakov _([GitHub](https://github.com/kurnakovv))_
10+
- Benjamin Pinter _([GitHub](https://github.com/BenjaminDavidPinter))_
11+
12+
### Features Added
13+
14+
- OpenAI.Chat:
15+
- Added the `Minimal` property to `ChatReasoningEffortLevel`_(A community contribution, courtesy of [kurnakovv](https://github.com/kurnakovv))_
16+
17+
- OpenAI.Responses:
18+
- Added the `Minimal` property to `ResponseReasoningEffortLevel` _(A community contribution, courtesy of [kurnakovv](https://github.com/kurnakovv))_
19+
- Added the `Model` property to `OpenAIResponseClient` _(A community contribution, courtesy of [BenjaminDavidPinter](https://github.com/BenjaminDavidPinter))_
20+
21+
## 2.5.0 (2025-09-23)
22+
23+
### Features Added
24+
25+
- OpenAI.Responses:
26+
- Added the `Model` property to `OpenAIResponseClient`.
27+
- Added the `ServiceDescription` property to `McpTool`.
28+
- Enabled support for connectors, which are OpenAI-maintained MCP wrappers for popular services like Microsoft Outlook or Dropbox.
29+
- Added the `ConnectorId` property to `McpTool`.
30+
- Enabled support for authentication with remote MCP servers.
31+
- Added the `AuthorizationToken` property to `McpTool`.
32+
- Enabled support for the Code Interpreter tool, which allows models to write and run Python code in a sandboxed environment to solve complex problems in domains like data analysis, coding, and math.
33+
- Users can add the new `CodeInterpreterTool` to the `Tools` property of their `ResponseCreationOptions` and configure it.
34+
- Use the `Container` property to configure the sandboxed environment, including any files that should be made available.
35+
36+
### Bugs Fixed
37+
38+
- OpenAI.Responses:
39+
- Fixed an issue with the constructor of `McpToolCallApprovalRequestItem` not taking the item ID as a parameter. MCP approval requests are correlated to MCP approval responses using this ID, which implies that this ID should be required.
40+
- Fixed an issue with some of the MCP-related `StreamingResponseUpdate` classes missing the `ItemId` and `OutputIndex` properties.
41+
42+
## 2.4.0 (2025-09-05)
43+
44+
### Features Added
45+
46+
- OpenAI.Audio:
47+
- Added the `Endpoint` property to `AudioClient`.
48+
- OpenAI.Batch:
49+
- Added the `Endpoint` property to `BatchClient`.
50+
- OpenAI.Chat:
51+
- Added the `Endpoint` property to `ChatClient`.
52+
- 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.
53+
- Added an explicit conversion operator to `ChatCompletion` and `ChatCompletionDeletionResult` to convert from `ClientResult`.
54+
- OpenAI.Containers:
55+
- Added the `Endpoint` property to `ContainerClient`.
56+
- Added convenience counterparts to the protocol methods of `ContainerClient` that use the strongly-typed model classes.
57+
- Added automatic pagination support to the following methods of `ContainerClient`:
58+
- `GetContainers` and `GetContainersAsync`
59+
- `GetContainerFiles` and `GetContainerFilesAsync`
60+
- Added an explicit conversion operator to `ContainerResource`, `ContainerFileResource`, `DeleteContainerResponse`, and `DeleteContainerFileResponse` to convert from `ClientResult`.
61+
- OpenAI.Embeddings:
62+
- Added the `Endpoint` property to `EmbeddingsClient`.
63+
- Added an explicit conversion operator to `OpenAIEmbeddingCollection` to convert from `ClientResult`.
64+
- OpenAI.Evals:
65+
- Added the `Endpoint` property to `EvaluationClient`.
66+
- OpenAI.Files:
67+
- Added the `Endpoint` property to `OpenAIFileClient`.
68+
- Added an explicit conversion operator to `OpenAIFile`, `OpenAIFileCollection`, and `FileDeletionResult` to convert from `ClientResult`.
69+
- OpenAI.FineTuning:
70+
- Added the `Endpoint` property to `FineTuningClient`.
71+
- OpenAI.Graders:
72+
- Added the `Endpoint` property to `GraderClient`.
73+
- Added an explicit conversion operator to `RunGraderResponse` and `ValidateGraderResponse` to convert from `ClientResult`.
74+
- OpenAI.Images:
75+
- Added the `Endpoint` property to `ImageClient`.
76+
- Added an explicit conversion operator to `GeneratedImageCollection` to convert from `ClientResult`.
77+
- Added the `Background` property to `ImageEditOptions` to set transparency for the background of the generated image(s).
78+
- Added the `Quality` property to `ImageEditOptions` to set the quality of the generated image(s).
79+
- OpenAI.Images:
80+
- Added the `Endpoint` property to `ImageClient`.
81+
- Added an explicit conversion operator to `GeneratedImageCollection` to convert from `ClientResult`.
82+
- Added the `Background` property to `ImageEditOptions` to set transparency for the background of the generated image(s).
83+
- Added the `Quality` property to `ImageEditOptions` to set the quality of the generated image(s).
84+
- OpenAI.Models:
85+
- Added the `Endpoint` property to `OpenAIModelClient`.
86+
- Added an explicit conversion operator to `OpenAIModel`, `OpenAIModelCollection`, and `ModelDeletionResult` to convert from `ClientResult`.
87+
- OpenAI.Moderations:
88+
- Added the `Endpoint` property to `ModerationClient`.
89+
- Added an explicit conversion operator to `ModerationResultCollection` to convert from `ClientResult`.
90+
- OpenAI.Realtime:
91+
- Added a constructor that can take a string API key to `RealtimeClient`.
92+
- Added constructors that can take a custom `AuthenticationPolicy` to `RealtimeClient`.
93+
- Added the `Endpoint` property to `RealtimeClient`.
94+
- Replaced the `RequestOptions` parameter of the following methods of `RealtimeClient` for a new `RealtimeSessionOptions` parameter and a `CancellationToken` parameter:
95+
- `StartConversationSession` and `StartConversationSessionAsync`
96+
- `StartTranscriptionSession` and `StartTranscriptionSessionAsync`
97+
- `StartSession` and `StartSessionAsync`
98+
- OpenAI.Responses:
99+
- Added the `Endpoint` property to `OpenAIResponseClient`.
100+
- Added an explicit conversion operator to `OpenAIResponse` to convert from `ClientResult`.
101+
- Added new classes derived from `ResponseTool` to facilitate certain scenarios:
102+
- `FunctionTool`
103+
- `FileSearchTool`
104+
- `WebSearchTool`
105+
- `ComputerTool`
106+
- Added initial support for integrating with remote MCP servers via the Responses API in streaming and non-streaming scenarios.
107+
- Users can add the new `McpTool` to the `Tools` property of their `ResponseCreationOptions` and configure it.
108+
- Use the `AllowedTools` property to limit which of the server tools can be called by the model.
109+
- Use the `ToolCallApprovalPolicy` property to specify which tools require an explicit approval before being called by the model.
110+
- Support for selecting the `McpTool` via the `ToolChoice` property is coming soon.
111+
- Support for configuring the `McpTool` with an access token that can be used to authenticate with the remote MCP server is coming soon.
112+
- Support for connectors is coming soon.
113+
- Added new classes derived from `ResponseMessageAnnotation` to facilitate certain scenarios:
114+
- `FileCitationMessageAnnotation`
115+
- `FilePathMessageAnnotation`
116+
- `UriCitationMessageAnnotation`
117+
- 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.
118+
- OpenAI.VectorStores:
119+
- Added the `Endpoint` property to `OpenAIResponseClient`.
120+
- Added an explicit conversion operator to `VectorStore`, `VectorStoreFile`, `VectorStoreFileBatch`, `VectorStoreDeletionResult`, and `FileFromStoreRemovalResult` to convert from `ClientResult`.
121+
122+
### Bug Fixed
123+
124+
- OpenAI.Realtime:
125+
- 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.
126+
- Fixed an issue with the HTTP pipeline of the `RealtimeClient` that was preventing the following methods from working correctly:
127+
- `CreateEphemeralToken` and `CreateEphemeralTokenAsync`
128+
- `CreateEphemeralTranscriptionToken` and `CreateEphemeralTranscriptionTokenAsync`
129+
130+
### Breaking Changes in Preview APIs
131+
132+
- OpenAI.Chat:
133+
- Changed the type of the `options` parameter of the `GetChatCompletionMessages` method of the `ChatClient` from `ChatCompletionCollectionOptions` to `ChatCompletionMessageCollectionOptions`.
134+
- OpenAI.Realtime:
135+
- Replaced the `RequestOptions` parameter for a new `RealtimeSessionOptions` parameter and a `CancellationToken` parameter.
136+
- OpenAI.Responses:
137+
- Renamed the `Background` property to `BackgroundModeEnabled` for clarity.
138+
- Renamed the `ComputerOutput` class to `ComputerCallOutput`.
139+
- Changed the type of the `Delta` property of `StreamingResponseFunctionCallArgumentsDeltaUpdate` from `string` to `BinaryData`.
140+
- Changed the type of the `Arguments` property of `StreamingResponseFunctionCallArgumentsDoneUpdate` from `string` to `BinaryData` and renamed it to `FunctionArguments`.
141+
- Renamed the `WebSearchContextSize` class to `WebSearchToolContextSize`.
142+
- Renamed the `WebSearchUserLocation` class to `WebSearchToolLocation`.
143+
- Refactored the factory methods of `ResponseItem`.
144+
- Refactored the factory methods of `ResponseTool`.
145+
- Removed the properties of `ResponseMessageAnnotation` except for the `Kind` property and moved them to the new derived types.
146+
- OpenAI.VectorStores:
147+
- Removed the `OperationResult` pattern along with the `CreateVectorStoreOperation` `AddFileToVectorStoreOperation`, and `CreateBatchFileJobOperation` classes.
148+
- Renamed the `VectorStoreBatchFileJob` class to `VectorStoreFileBatch`
149+
- Renamed the `VectorStoreFileAssociation` class to `VectorStoreFile`
150+
- Renamed the `VectorStoreFileAssociationError` class to `VectorStoreFileError`
151+
- Renamed the `VectorStoreFileAssociationStatus` class to `VectorStoreFileStatus`
152+
- Renamed the `VectorStoreFileAssociationErrorCode` class to `VectorStoreFileErrorCode`
153+
- Renamed the `VectorStoreFileAssociationCollectionOptions` class to `VectorStoreFileCollectionOptions`
154+
- Renamed the `VectorStoreFileAssociationCollectionOrder` class to `VectorStoreFileCollectionOrder`
155+
- Renamed the `CancelBatchFileJob` and `CancelBatchFileJobAsync` methods of `VectorStoreClient` to `CancelVectorStoreFileBatch` and `CancelVectorStoreFileBatchAsync`
156+
- Renamed the `CreateBatchFileJob` and `CreateBatchFileJobAsync` methods of `VectorStoreClient` to `AddFileBatchToVectorStore` and `AddFileBatchToVectorStoreAsync`
157+
- Renamed the `GetBatchFileJob` and `GetBatchFileJobAsync` methods of `VectorStoreClient` to `GetVectorStoreFileBatch` and `GetVectorStoreFileBatchAsync`
158+
- Renamed the `GetFileAssociation` and `GetFileAssociationAsync` methods of `VectorStoreClient` to `GetVectorStoreFile` and `GetVectorStoreFileAsync`
159+
- Renamed the `GetFileAssociations` and `GetFileAssociationsAsync` methods of `VectorStoreClient` to `GetVectorStoreFiles` and `GetVectorStoreFilesAsync`
160+
- Renamed the `GetFileAssociationsInBatch` and `GetFileAssociationsInBatchAsync` methods of `VectorStoreClient` to `GetVectorStoreFilesInBatch` and `GetVectorStoreFilesInBatchAsync`
161+
- Renamed the `RemoveFileFromStore` and `RemoveFileFromStoreAsync` methods of `VectorStoreClient` to `RemoveFileFromVectorStore` and `RemoveFileFromVectorStoreAsync`
162+
163+
### Other Changes
164+
165+
- Updated the `System.ClientModel` dependency to version 1.6.1.
166+
3167
## 2.3.0 (2025-08-01)
4168

5169
### Features Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,4 +1101,4 @@ By default, the client classes will automatically retry the following errors up
11011101

11021102
### Observability
11031103

1104-
OpenAI .NET library supports experimental distributed tracing and metrics with OpenTelemetry. Check out [Observability with OpenTelemetry](./docs/observability.md) for more details.
1104+
OpenAI .NET library supports experimental distributed tracing and metrics with OpenTelemetry. Check out [Observability with OpenTelemetry](./docs/Observability.md) for more details.

0 commit comments

Comments
 (0)