Skip to content

Commit 2cb445c

Browse files
authored
Merge branch 'main' into feat/import-startup-lazy-2819
2 parents c9b9161 + e507a4e commit 2cb445c

150 files changed

Lines changed: 5332 additions & 829 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: CI
22
on:
33
push:
4-
branches-ignore:
5-
- 'generated'
6-
- 'codegen/**'
7-
- 'integrated/**'
8-
- 'stl-preview-head/**'
9-
- 'stl-preview-base/**'
4+
branches:
5+
- '**'
6+
- '!integrated/**'
7+
- '!stl-preview-head/**'
8+
- '!stl-preview-base/**'
9+
- '!generated'
10+
- '!codegen/**'
11+
- 'codegen/stl/**'
1012
pull_request:
1113
branches-ignore:
1214
- 'stl-preview-head/**'
@@ -17,17 +19,15 @@ jobs:
1719
timeout-minutes: 10
1820
name: lint
1921
runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
20-
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
22+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
2123
steps:
22-
- uses: actions/checkout@v6
24+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2325

24-
- name: Install Rye
25-
run: |
26-
curl -sSf https://rye.astral.sh/get | bash
27-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
28-
env:
29-
RYE_VERSION: '0.44.0'
30-
RYE_INSTALL_OPTION: '--yes'
26+
- name: Set up Rye
27+
uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
28+
with:
29+
version: '0.44.0'
30+
enable-cache: true
3131

3232
- name: Install dependencies
3333
run: rye sync --all-features
@@ -36,23 +36,21 @@ jobs:
3636
run: ./scripts/lint
3737

3838
build:
39-
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
39+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
4040
timeout-minutes: 10
4141
name: build
4242
permissions:
4343
contents: read
4444
id-token: write
4545
runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
4646
steps:
47-
- uses: actions/checkout@v6
47+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
4848

49-
- name: Install Rye
50-
run: |
51-
curl -sSf https://rye.astral.sh/get | bash
52-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
53-
env:
54-
RYE_VERSION: '0.44.0'
55-
RYE_INSTALL_OPTION: '--yes'
49+
- name: Set up Rye
50+
uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
51+
with:
52+
version: '0.44.0'
53+
enable-cache: true
5654

5755
- name: Install dependencies
5856
run: rye sync --all-features
@@ -61,14 +59,18 @@ jobs:
6159
run: rye build
6260

6361
- name: Get GitHub OIDC Token
64-
if: github.repository == 'stainless-sdks/openai-python'
62+
if: |-
63+
github.repository == 'stainless-sdks/openai-python' &&
64+
!startsWith(github.ref, 'refs/heads/stl/')
6565
id: github-oidc
66-
uses: actions/github-script@v8
66+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
6767
with:
6868
script: core.setOutput('github_token', await core.getIDToken());
6969

7070
- name: Upload tarball
71-
if: github.repository == 'stainless-sdks/openai-python'
71+
if: |-
72+
github.repository == 'stainless-sdks/openai-python' &&
73+
!startsWith(github.ref, 'refs/heads/stl/')
7274
env:
7375
URL: https://pkg.stainless.com/s
7476
AUTH: ${{ steps.github-oidc.outputs.github_token }}
@@ -81,15 +83,13 @@ jobs:
8183
runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
8284
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
8385
steps:
84-
- uses: actions/checkout@v6
86+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
8587

86-
- name: Install Rye
87-
run: |
88-
curl -sSf https://rye.astral.sh/get | bash
89-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
90-
env:
91-
RYE_VERSION: '0.44.0'
92-
RYE_INSTALL_OPTION: '--yes'
88+
- name: Set up Rye
89+
uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
90+
with:
91+
version: '0.44.0'
92+
enable-cache: true
9393

9494
- name: Bootstrap
9595
run: ./scripts/bootstrap
@@ -101,18 +101,16 @@ jobs:
101101
timeout-minutes: 10
102102
name: examples
103103
runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
104-
if: github.repository == 'openai/openai-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
104+
if: github.repository == 'openai/openai-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
105105

106106
steps:
107-
- uses: actions/checkout@v6
107+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
108108

109-
- name: Install Rye
110-
run: |
111-
curl -sSf https://rye.astral.sh/get | bash
112-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
113-
env:
114-
RYE_VERSION: '0.44.0'
115-
RYE_INSTALL_OPTION: '--yes'
109+
- name: Set up Rye
110+
uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
111+
with:
112+
version: '0.44.0'
113+
enable-cache: true
116114
- name: Install dependencies
117115
run: |
118116
rye sync --all-features

.github/workflows/create-releases.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,20 @@ jobs:
1414
environment: publish
1515

1616
steps:
17-
- uses: actions/checkout@v6
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1818

19-
- uses: stainless-api/trigger-release-please@v1
19+
- uses: stainless-api/trigger-release-please@bb6677c5a04578eec1ccfd9e1913b5b78ed64c61 # v1
2020
id: release
2121
with:
2222
repo: ${{ github.event.repository.full_name }}
2323
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
2424

25-
- name: Install Rye
25+
- name: Set up Rye
2626
if: ${{ steps.release.outputs.releases_created }}
27-
run: |
28-
curl -sSf https://rye.astral.sh/get | bash
29-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
30-
env:
31-
RYE_VERSION: '0.44.0'
32-
RYE_INSTALL_OPTION: '--yes'
27+
uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
28+
with:
29+
version: '0.44.0'
30+
enable-cache: true
3331

3432
- name: Publish to PyPI
3533
if: ${{ steps.release.outputs.releases_created }}

.github/workflows/detect-breaking-changes.yml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,16 @@ jobs:
1515
run: |
1616
echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV
1717
18-
- uses: actions/checkout@v6
18+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1919
with:
2020
# Ensure we can check out the pull request base in the script below.
2121
fetch-depth: ${{ env.FETCH_DEPTH }}
2222

23-
- name: Install Rye
24-
run: |
25-
curl -sSf https://rye.astral.sh/get | bash
26-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
27-
env:
28-
RYE_VERSION: '0.44.0'
29-
RYE_INSTALL_OPTION: '--yes'
23+
- name: Set up Rye
24+
uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
25+
with:
26+
version: '0.44.0'
27+
enable-cache: true
3028
- name: Install dependencies
3129
run: |
3230
rye sync --all-features
@@ -45,32 +43,30 @@ jobs:
4543
if: github.repository == 'openai/openai-python'
4644
steps:
4745
# Setup this sdk
48-
- uses: actions/checkout@v4
46+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
4947
with:
5048
path: openai-python
5149

52-
- name: Install Rye
53-
working-directory: openai-python
54-
run: |
55-
curl -sSf https://rye.astral.sh/get | bash
56-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
57-
env:
58-
RYE_VERSION: '0.44.0'
59-
RYE_INSTALL_OPTION: '--yes'
50+
- name: Set up Rye
51+
uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
52+
with:
53+
version: '0.44.0'
54+
enable-cache: true
55+
working-directory: openai-python
6056

6157
- name: Install dependencies
6258
working-directory: openai-python
6359
run: |
6460
rye sync --all-features
6561
6662
# Setup the agents lib
67-
- uses: actions/checkout@v4
63+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
6864
with:
6965
repository: openai/openai-agents-python
7066
path: openai-agents-python
7167

7268
- name: Setup uv
73-
uses: astral-sh/setup-uv@v5
69+
uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5
7470
with:
7571
enable-cache: true
7672

@@ -85,4 +81,3 @@ jobs:
8581
- name: Run integration type checks
8682
working-directory: openai-agents-python
8783
run: make mypy
88-

.github/workflows/publish-pypi.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@ jobs:
1111
environment: publish
1212

1313
steps:
14-
- uses: actions/checkout@v6
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1515

16-
- name: Install Rye
17-
run: |
18-
curl -sSf https://rye.astral.sh/get | bash
19-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
20-
env:
21-
RYE_VERSION: '0.44.0'
22-
RYE_INSTALL_OPTION: '--yes'
16+
- name: Set up Rye
17+
uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
18+
with:
19+
version: '0.44.0'
20+
enable-cache: true
2321

2422
- name: Publish to PyPI
2523
run: |

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
if: github.repository == 'openai/openai-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
1414

1515
steps:
16-
- uses: actions/checkout@v6
16+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1717

1818
- name: Check release environment
1919
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.prism.log
2+
.stdy.log
23
_dev
34

45
__pycache__

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.26.0"
2+
".": "2.32.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 148
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-9c802d45a9bf2a896b5fd22ac22bba185e8a145bd40ed242df9bb87a05e954eb.yml
3-
openapi_spec_hash: 97984ed69285e660b7d5c810c69ed449
4-
config_hash: 8240b8a7a7fc145a45b93bda435612d6
1+
configured_endpoints: 152
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7c540cce6eb30401259f4831ea9803b6d88501605d13734f98212cbb3b199e10.yml
3+
openapi_spec_hash: 06e656be22bbb92689954253668b42fc
4+
config_hash: 1a88b104658b6c854117996c080ebe6b

0 commit comments

Comments
 (0)