Skip to content

Commit 69ad3e0

Browse files
authored
Merge branch 'main' into chore/client-comment-fix
2 parents eb533ad + fad098f commit 69ad3e0

File tree

9 files changed

+48
-22
lines changed

9 files changed

+48
-22
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
name: CI
22
on:
33
push:
4-
branches:
5-
- main
6-
pull_request:
7-
branches:
8-
- main
9-
- next
4+
branches-ignore:
5+
- 'generated'
6+
- 'codegen/**'
7+
- 'integrated/**'
8+
- 'stl-preview-head/**'
9+
- 'stl-preview-base/**'
1010

1111
jobs:
1212
lint:
1313
timeout-minutes: 10
1414
name: lint
15-
runs-on: ubuntu-latest
15+
runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
1616
steps:
1717
- uses: actions/checkout@v4
1818

@@ -33,7 +33,7 @@ jobs:
3333
test:
3434
timeout-minutes: 10
3535
name: test
36-
runs-on: ubuntu-latest
36+
runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
3737
steps:
3838
- uses: actions/checkout@v4
3939

@@ -54,7 +54,7 @@ jobs:
5454
examples:
5555
timeout-minutes: 10
5656
name: examples
57-
runs-on: ubuntu-latest
57+
runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
5858
if: github.repository == 'openai/openai-python'
5959

6060
steps:

.release-please-manifest.json

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

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
## 1.76.2 (2025-04-29)
4+
5+
Full Changelog: [v1.76.1...v1.76.2](https://github.com/openai/openai-python/compare/v1.76.1...v1.76.2)
6+
7+
### Chores
8+
9+
* **api:** API spec cleanup ([0a4d3e2](https://github.com/openai/openai-python/commit/0a4d3e2b495d22dd42ce1773b870554c64f9b3b2))
10+
11+
## 1.76.1 (2025-04-29)
12+
13+
Full Changelog: [v1.76.0...v1.76.1](https://github.com/openai/openai-python/compare/v1.76.0...v1.76.1)
14+
15+
### Chores
16+
17+
* broadly detect json family of content-type headers ([b4b1b08](https://github.com/openai/openai-python/commit/b4b1b086b512eecc0ada7fc1efa45eb506982f13))
18+
* **ci:** only use depot for staging repos ([35312d8](https://github.com/openai/openai-python/commit/35312d80e6bbc1a61d06ad253af9a713b5ef040c))
19+
* **ci:** run on more branches and use depot runners ([a6a45d4](https://github.com/openai/openai-python/commit/a6a45d4af8a4d904b37573a9b223d56106b4887d))
20+
321
## 1.76.0 (2025-04-23)
422

523
Full Changelog: [v1.75.0...v1.76.0](https://github.com/openai/openai-python/compare/v1.75.0...v1.76.0)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "openai"
3-
version = "1.76.0"
3+
version = "1.76.2"
44
description = "The official Python library for the openai API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/openai/_legacy_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
304304
# split is required to handle cases where additional information is included
305305
# in the response, e.g. application/json; charset=utf-8
306306
content_type, *_ = response.headers.get("content-type", "*").split(";")
307-
if content_type != "application/json":
307+
if not content_type.endswith("json"):
308308
if is_basemodel(cast_to):
309309
try:
310310
data = response.json()

src/openai/_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
237237
# split is required to handle cases where additional information is included
238238
# in the response, e.g. application/json; charset=utf-8
239239
content_type, *_ = response.headers.get("content-type", "*").split(";")
240-
if content_type != "application/json":
240+
if not content_type.endswith("json"):
241241
if is_basemodel(cast_to):
242242
try:
243243
data = response.json()

src/openai/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "openai"
4-
__version__ = "1.76.0" # x-release-please-version
4+
__version__ = "1.76.2" # x-release-please-version

src/openai/lib/streaming/responses/_events.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@
3232
ResponseFileSearchCallSearchingEvent,
3333
ResponseWebSearchCallInProgressEvent,
3434
ResponseFileSearchCallInProgressEvent,
35+
ResponseReasoningSummaryPartDoneEvent,
36+
ResponseReasoningSummaryTextDoneEvent,
3537
ResponseFunctionCallArgumentsDoneEvent,
38+
ResponseReasoningSummaryPartAddedEvent,
39+
ResponseReasoningSummaryTextDeltaEvent,
3640
ResponseFunctionCallArgumentsDeltaEvent as RawResponseFunctionCallArgumentsDeltaEvent,
3741
ResponseCodeInterpreterCallCodeDoneEvent,
3842
ResponseCodeInterpreterCallCodeDeltaEvent,
@@ -101,6 +105,10 @@ class ResponseCompletedEvent(RawResponseCompletedEvent, GenericModel, Generic[Te
101105
ResponseWebSearchCallCompletedEvent,
102106
ResponseWebSearchCallInProgressEvent,
103107
ResponseWebSearchCallSearchingEvent,
108+
ResponseReasoningSummaryPartAddedEvent,
109+
ResponseReasoningSummaryPartDoneEvent,
110+
ResponseReasoningSummaryTextDeltaEvent,
111+
ResponseReasoningSummaryTextDoneEvent,
104112
],
105113
PropertyInfo(discriminator="type"),
106114
]

src/openai/resources/beta/threads/threads.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ def create_and_run_poll(
741741
thread: thread_create_and_run_params.Thread | NotGiven = NOT_GIVEN,
742742
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
743743
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
744-
tools: Optional[Iterable[thread_create_and_run_params.Tool]] | NotGiven = NOT_GIVEN,
744+
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
745745
top_p: Optional[float] | NotGiven = NOT_GIVEN,
746746
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
747747
poll_interval_ms: int | NotGiven = NOT_GIVEN,
@@ -797,7 +797,7 @@ def create_and_run_stream(
797797
thread: thread_create_and_run_params.Thread | NotGiven = NOT_GIVEN,
798798
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
799799
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
800-
tools: Optional[Iterable[thread_create_and_run_params.Tool]] | NotGiven = NOT_GIVEN,
800+
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
801801
top_p: Optional[float] | NotGiven = NOT_GIVEN,
802802
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
803803
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -826,7 +826,7 @@ def create_and_run_stream(
826826
thread: thread_create_and_run_params.Thread | NotGiven = NOT_GIVEN,
827827
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
828828
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
829-
tools: Optional[Iterable[thread_create_and_run_params.Tool]] | NotGiven = NOT_GIVEN,
829+
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
830830
top_p: Optional[float] | NotGiven = NOT_GIVEN,
831831
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
832832
event_handler: AssistantEventHandlerT,
@@ -855,7 +855,7 @@ def create_and_run_stream(
855855
thread: thread_create_and_run_params.Thread | NotGiven = NOT_GIVEN,
856856
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
857857
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
858-
tools: Optional[Iterable[thread_create_and_run_params.Tool]] | NotGiven = NOT_GIVEN,
858+
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
859859
top_p: Optional[float] | NotGiven = NOT_GIVEN,
860860
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
861861
event_handler: AssistantEventHandlerT | None = None,
@@ -1590,7 +1590,7 @@ async def create_and_run_poll(
15901590
thread: thread_create_and_run_params.Thread | NotGiven = NOT_GIVEN,
15911591
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
15921592
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
1593-
tools: Optional[Iterable[thread_create_and_run_params.Tool]] | NotGiven = NOT_GIVEN,
1593+
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
15941594
top_p: Optional[float] | NotGiven = NOT_GIVEN,
15951595
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
15961596
poll_interval_ms: int | NotGiven = NOT_GIVEN,
@@ -1648,7 +1648,7 @@ def create_and_run_stream(
16481648
thread: thread_create_and_run_params.Thread | NotGiven = NOT_GIVEN,
16491649
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
16501650
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
1651-
tools: Optional[Iterable[thread_create_and_run_params.Tool]] | NotGiven = NOT_GIVEN,
1651+
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
16521652
top_p: Optional[float] | NotGiven = NOT_GIVEN,
16531653
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
16541654
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1677,7 +1677,7 @@ def create_and_run_stream(
16771677
thread: thread_create_and_run_params.Thread | NotGiven = NOT_GIVEN,
16781678
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
16791679
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
1680-
tools: Optional[Iterable[thread_create_and_run_params.Tool]] | NotGiven = NOT_GIVEN,
1680+
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
16811681
top_p: Optional[float] | NotGiven = NOT_GIVEN,
16821682
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
16831683
event_handler: AsyncAssistantEventHandlerT,
@@ -1706,7 +1706,7 @@ def create_and_run_stream(
17061706
thread: thread_create_and_run_params.Thread | NotGiven = NOT_GIVEN,
17071707
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
17081708
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
1709-
tools: Optional[Iterable[thread_create_and_run_params.Tool]] | NotGiven = NOT_GIVEN,
1709+
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
17101710
top_p: Optional[float] | NotGiven = NOT_GIVEN,
17111711
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
17121712
event_handler: AsyncAssistantEventHandlerT | None = None,

0 commit comments

Comments
 (0)