Skip to content

Commit a1eeab5

Browse files
authored
chore: remove Stainless attribution and infrastructure (#3599)
## Changes - Remove Stainless attribution from legacy generated-file headers, README/agent guidance, security reporting, and repository-owned examples. - Remove Stainless-only CI/upload infrastructure, obsolete mirror-specific workflow behavior, and legacy `.stats.yml`. - Keep Castiron generation metadata, public release workflows, and mock-server validation intact. ## Out of scope - Renaming `X-Stainless-*` request headers, retry/idempotency identifiers, OpenAPI `x-stainless-*` extensions, generated fixture identifiers, changelog history, or third-party provenance.
1 parent 8bb0e14 commit a1eeab5

106 files changed

Lines changed: 42 additions & 339 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: 8 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,7 @@ on:
55
- '**'
66
- '!gh-readonly-queue/**'
77
- '!integrated/**'
8-
- '!stl-preview-head/**'
9-
- '!stl-preview-base/**'
10-
- '!generated'
11-
- '!codegen/**'
12-
- 'codegen/stl/**'
138
pull_request:
14-
branches-ignore:
15-
- 'stl-preview-head/**'
16-
- 'stl-preview-base/**'
179
merge_group:
1810
types:
1911
- checks_requested
@@ -30,8 +22,8 @@ jobs:
3022
lint:
3123
timeout-minutes: 10
3224
name: lint
33-
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
34-
if: (github.event_name == 'push' || github.event_name == 'merge_group' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
25+
runs-on: ubuntu-latest
26+
if: github.event_name == 'push' || github.event_name == 'merge_group' || github.event.pull_request.head.repo.fork
3527
steps:
3628
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3729

@@ -48,12 +40,12 @@ jobs:
4840
run: ./scripts/lint
4941

5042
build:
51-
if: (github.event_name == 'push' || github.event_name == 'merge_group' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
43+
if: github.event_name == 'push' || github.event_name == 'merge_group' || github.event.pull_request.head.repo.fork
5244
timeout-minutes: 10
5345
name: build
5446
permissions:
5547
contents: read
56-
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
48+
runs-on: ubuntu-latest
5749
steps:
5850
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5951
with:
@@ -96,54 +88,10 @@ jobs:
9688
- name: Validate HTTPX2 wheel on Python 3.14
9789
run: python scripts/utils/validate-httpx2-wheel.py
9890

99-
- name: Stage tarball for Stainless upload
100-
if: |-
101-
github.repository == 'stainless-sdks/openai-python' &&
102-
!startsWith(github.ref, 'refs/heads/stl/')
103-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
104-
with:
105-
name: stainless-package-tarball
106-
path: dist/
107-
if-no-files-found: error
108-
retention-days: 1
109-
110-
stainless-upload:
111-
name: upload tarball to Stainless
112-
needs: build
113-
if: github.repository == 'stainless-sdks/openai-python' && !startsWith(github.ref, 'refs/heads/stl/')
114-
runs-on: ubuntu-latest
115-
permissions:
116-
contents: read
117-
id-token: write
118-
119-
steps:
120-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
121-
with:
122-
persist-credentials: false
123-
124-
- name: Download tarball
125-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
126-
with:
127-
name: stainless-package-tarball
128-
path: dist/
129-
130-
- name: Get GitHub OIDC Token
131-
id: github-oidc
132-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
133-
with:
134-
script: core.setOutput('github_token', await core.getIDToken());
135-
136-
- name: Upload tarball
137-
env:
138-
URL: https://pkg.stainless.com/s
139-
AUTH: ${{ steps.github-oidc.outputs.github_token }}
140-
SHA: ${{ github.sha }}
141-
run: ./scripts/utils/upload-artifact.sh
142-
14391
test:
14492
timeout-minutes: 15
14593
name: test (Python ${{ matrix.python-version }})
146-
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
94+
runs-on: ubuntu-latest
14795
if: github.event_name == 'push' || github.event_name == 'merge_group' || github.event.pull_request.head.repo.fork
14896
strategy:
14997
fail-fast: false
@@ -185,7 +133,7 @@ jobs:
185133
test-httpx2:
186134
timeout-minutes: 20
187135
name: test (HTTPX2)
188-
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
136+
runs-on: ubuntu-latest
189137
if: github.event_name == 'push' || github.event_name == 'merge_group' || github.event.pull_request.head.repo.fork
190138
steps:
191139
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -223,8 +171,8 @@ jobs:
223171
timeout-minutes: 10
224172
name: examples
225173
environment: ci
226-
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
227-
if: github.repository == 'openai/openai-python' && github.ref != 'refs/heads/release-please--branches--main' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
174+
runs-on: ubuntu-latest
175+
if: github.repository == 'openai/openai-python' && github.ref != 'refs/heads/release-please--branches--main' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
228176

229177
steps:
230178
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

.stats.yml

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

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Generated SDK
44

5-
Most SDK source is generated by Stainless. Follow `CONTRIBUTING.md` before
5+
Most SDK source is generated from the OpenAI API schema. Follow `CONTRIBUTING.md` before
66
changing generated files. Handwritten policy, automation, tests, and examples
77
should remain small and should not alter exported SDK APIs unless the change
88
explicitly requires it.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The OpenAI Python library provides convenient access to the OpenAI REST API from
77
application. The library includes type definitions for all request params and response fields,
88
and offers both synchronous and asynchronous clients powered by [HTTPX2](https://httpx2.pydantic.dev/).
99

10-
It is generated from our [OpenAPI specification](https://github.com/openai/openai-openapi) with [Stainless](https://stainlessapi.com/).
10+
It is generated from our [OpenAPI specification](https://github.com/openai/openai-openapi).
1111

1212
## Documentation
1313

SECURITY.md

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,12 @@
22

33
## Reporting Security Issues
44

5-
This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
6-
7-
To report a security issue, please contact the Stainless team at security@stainless.com.
5+
Please report potential security vulnerabilities through OpenAI's
6+
[coordinated vulnerability disclosure process](https://openai.com/policies/coordinated-vulnerability-disclosure-policy).
7+
For questions about that process, contact disclosure@openai.com.
88

99
## Responsible Disclosure
1010

11-
We appreciate the efforts of security researchers and individuals who help us maintain the security of
12-
SDKs we generate. If you believe you have found a security vulnerability, please adhere to responsible
13-
disclosure practices by allowing us a reasonable amount of time to investigate and address the issue
14-
before making any information public.
15-
16-
## Reporting Non-SDK Related Security Issues
17-
18-
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by OpenAI, please follow the respective company's security reporting guidelines.
20-
21-
### OpenAI Terms and Policies
22-
23-
Our Security Policy can be found at [Security Policy URL](https://openai.com/policies/coordinated-vulnerability-disclosure-policy).
24-
25-
Please contact disclosure@openai.com for any questions or concerns regarding the security of our services.
26-
27-
---
28-
29-
Thank you for helping us keep the SDKs and systems they interact with secure.
11+
Please allow OpenAI a reasonable amount of time to investigate and address the
12+
issue before making information public. Thank you for helping us keep this SDK
13+
and the systems it interacts with secure.

examples/.keep

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
File generated from our OpenAPI spec by Stainless.
2-
31
This directory can be used to store example files demonstrating usage of this SDK.
4-
It is ignored by Stainless code generation and its content (other than this keep file) won't be touched.
2+
It is ignored by code generation and its content (other than this keep file) won't be touched.

scripts/mock

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@ elif [[ -f .castiron.stats.yml && -f api_reference/openapi.transformed.yml ]]; t
1717
exit 1
1818
fi
1919
else
20-
URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)"
21-
fi
22-
23-
# Check if the URL is empty
24-
if [ -z "$URL" ]; then
25-
echo "Error: No OpenAPI spec path/url provided or found in .stats.yml"
20+
echo "Error: No OpenAPI spec path/url provided or found in Castiron generation metadata" >&2
2621
exit 1
2722
fi
2823

scripts/utils/upload-artifact.sh

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

src/openai/_constants.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2-
31
import httpx2
42

53
RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"

src/openai/_event_handler.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2-
31
from __future__ import annotations
42

53
import threading

0 commit comments

Comments
 (0)