You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore(tests): skip some failing tests on the latest python versions
* chore(internal): add tests for breaking change detection
* move over parse and stream methods out of beta
* update docs
* update tests
* remove old beta files
* fix relative import
* fix(ci): release-doctor — report correct token name
* feat(api): webhook and deep research support
* release: 1.92.0
---------
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: David Meadows <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,25 @@
1
1
# Changelog
2
2
3
+
## 1.92.0 (2025-06-26)
4
+
5
+
Full Changelog: [v1.91.0...v1.92.0](https://github.com/openai/openai-python/compare/v1.91.0...v1.92.0)
6
+
7
+
### Features
8
+
9
+
***api:** webhook and deep research support ([d3bb116](https://github.com/openai/openai-python/commit/d3bb116f34f470502f902b88131deec43a953b12))
10
+
***client:** move stream and parse out of beta ([0e358ed](https://github.com/openai/openai-python/commit/0e358ed66b317038705fb38958a449d284f3cb88))
11
+
12
+
13
+
### Bug Fixes
14
+
15
+
***ci:** release-doctor — report correct token name ([ff8c556](https://github.com/openai/openai-python/commit/ff8c5561e44e8a0902732b5934c97299d2c98d4e))
16
+
17
+
18
+
### Chores
19
+
20
+
***internal:** add tests for breaking change detection ([710fe8f](https://github.com/openai/openai-python/commit/710fe8fd5f9e33730338341680152d3f2556dfa0))
21
+
***tests:** skip some failing tests on the latest python versions ([93ccc38](https://github.com/openai/openai-python/commit/93ccc38a8ef1575d77d33d031666d07d10e4af72))
22
+
3
23
## 1.91.0 (2025-06-23)
4
24
5
25
Full Changelog: [v1.90.0...v1.91.0](https://github.com/openai/openai-python/compare/v1.90.0...v1.91.0)
Copy file name to clipboardExpand all lines: README.md
+78Lines changed: 78 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -406,6 +406,84 @@ client.files.create(
406
406
407
407
The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.
408
408
409
+
## Webhook Verification
410
+
411
+
Verifying webhook signatures is _optional but encouraged_.
412
+
413
+
### Parsing webhook payloads
414
+
415
+
For most use cases, you will likely want to verify the webhook and parse the payload at the same time. To achieve this, we provide the method `client.webhooks.unwrap()`, which parses a webhook request and verifies that it was sent by OpenAI. This method will raise an error if the signature is invalid.
416
+
417
+
Note that the `body` parameter must be the raw JSON string sent from the server (do not parse it first). The `.unwrap()` method will parse this JSON for you into an event object after verifying the webhook was sent from OpenAI.
418
+
419
+
```python
420
+
from openai import OpenAI
421
+
from flask import Flask, request
422
+
423
+
app = Flask(__name__)
424
+
client = OpenAI() # OPENAI_WEBHOOK_SECRET environment variable is used by default
In some cases, you may want to verify the webhook separately from parsing the payload. If you prefer to handle these steps separately, we provide the method `client.webhooks.verify_signature()` to _only verify_ the signature of a webhook request. Like `.unwrap()`, this method will raise an error if the signature is invalid.
454
+
455
+
Note that the `body` parameter must be the raw JSON string sent from the server (do not parse it first). You will then need to parse the body after verifying the signature.
456
+
457
+
```python
458
+
import json
459
+
from openai import OpenAI
460
+
from flask import Flask, request
461
+
462
+
app = Flask(__name__)
463
+
client = OpenAI() # OPENAI_WEBHOOK_SECRET environment variable is used by default
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `openai.APIConnectionError` is raised.
0 commit comments