Skip to content

Commit c7ea5db

Browse files
committed
merge
2 parents 475ef3b + d8e67d6 commit c7ea5db

File tree

1,392 files changed

+510637
-26571
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,392 files changed

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

.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

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
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+
321
## 2.5.0 (2025-09-23)
422

523
### Features Added

api/OpenAI.net8.0.cs

Lines changed: 207 additions & 6 deletions
Large diffs are not rendered by default.

api/OpenAI.netstandard2.0.cs

Lines changed: 139 additions & 6 deletions
Large diffs are not rendered by default.

codegen/generator/OpenAI.Library.Plugin.sln

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ VisualStudioVersion = 17.11.35327.3
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenAI.Library.Plugin", "src\OpenAI.Library.Plugin.csproj", "{E46178E4-F3F0-4E2F-8D42-A7F021B23E63}"
77
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAI.Library.Plugin.Tests", "test\OpenAI.Library.Plugin.Tests.csproj", "{8502C759-8CE7-418D-9C5B-49ADECFCD79C}"
9+
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAI.Library.Plugin.Tests.Common", "test\common\OpenAI.Library.Plugin.Tests.Common.csproj", "{666F7CD4-4D78-460A-AA9B-A2981EF96AD9}"
11+
EndProject
812
Global
913
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1014
Debug|Any CPU = Debug|Any CPU
@@ -15,8 +19,19 @@ Global
1519
{E46178E4-F3F0-4E2F-8D42-A7F021B23E63}.Debug|Any CPU.Build.0 = Debug|Any CPU
1620
{E46178E4-F3F0-4E2F-8D42-A7F021B23E63}.Release|Any CPU.ActiveCfg = Release|Any CPU
1721
{E46178E4-F3F0-4E2F-8D42-A7F021B23E63}.Release|Any CPU.Build.0 = Release|Any CPU
22+
{8502C759-8CE7-418D-9C5B-49ADECFCD79C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23+
{8502C759-8CE7-418D-9C5B-49ADECFCD79C}.Debug|Any CPU.Build.0 = Debug|Any CPU
24+
{8502C759-8CE7-418D-9C5B-49ADECFCD79C}.Release|Any CPU.ActiveCfg = Release|Any CPU
25+
{8502C759-8CE7-418D-9C5B-49ADECFCD79C}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{666F7CD4-4D78-460A-AA9B-A2981EF96AD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{666F7CD4-4D78-460A-AA9B-A2981EF96AD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{666F7CD4-4D78-460A-AA9B-A2981EF96AD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{666F7CD4-4D78-460A-AA9B-A2981EF96AD9}.Release|Any CPU.Build.0 = Release|Any CPU
1830
EndGlobalSection
1931
GlobalSection(SolutionProperties) = preSolution
2032
HideSolutionNode = FALSE
2133
EndGlobalSection
34+
GlobalSection(ExtensibilityGlobals) = postSolution
35+
SolutionGuid = {F0115F71-1DEE-403B-99F9-E1F06D6B5271}
36+
EndGlobalSection
2237
EndGlobal

codegen/generator/src/OpenAI.Library.Plugin.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20250926.1" />
11+
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20251009.7" />
1212
</ItemGroup>
1313

1414
<!-- Copy output to package dist path for local execution and -->
@@ -22,6 +22,3 @@
2222
</Target>
2323

2424
</Project>
25-
26-
27-

codegen/generator/src/OpenAILibraryGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System;
21
using System.ComponentModel.Composition;
32
using Microsoft.TypeSpec.Generator;
43
using Microsoft.TypeSpec.Generator.ClientModel;
@@ -16,11 +15,12 @@ public OpenAILibraryGenerator(GeneratorContext context) : base(context) { }
1615
protected override void Configure()
1716
{
1817
base.Configure();
18+
// This should be first, as it recomputes the type
19+
AddVisitor(new NonAbstractPublicTypesVisitor());
1920
AddVisitor(new ConstructorFixupVisitor());
2021
AddVisitor(new KindRenameVisitor());
2122
AddVisitor(new VisibilityVisitor());
2223
AddVisitor(new ContentInnerCollectionDefinedVisitor());
23-
AddVisitor(new NonAbstractPublicTypesVisitor());
2424
AddVisitor(new PageOrderRemovalVisitor(this));
2525
AddVisitor(new OmittedTypesVisitor());
2626
AddVisitor(new InvariantFormatAdditionalPropertiesVisitor());

0 commit comments

Comments
 (0)