Skip to content

Commit 21b8f40

Browse files
authored
Merge branch 'openai:main' into main
2 parents 5f546e6 + 0d85ca0 commit 21b8f40

Some content is hidden

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

52 files changed

+401
-305
lines changed

.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.107.2"
2+
".": "1.108.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-94b1e3cb0bdc616ff0c2f267c33dadd95f133b1f64e647aab6c64afb292b2793.yml
3-
openapi_spec_hash: 2395319ac9befd59b6536ae7f9564a05
4-
config_hash: 930dac3aa861344867e4ac84f037b5df
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-380330a93b5d010391ca3b36ea193c5353b0dfdf2ddd02789ef84a84ce427e82.yml
3+
openapi_spec_hash: 859703234259ecdd2a3c6f4de88eb504
4+
config_hash: b619b45c1e7facf819f902dee8fa4f97

CHANGELOG.md

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

3+
## 1.108.0 (2025-09-17)
4+
5+
Full Changelog: [v1.107.3...v1.108.0](https://github.com/openai/openai-python/compare/v1.107.3...v1.108.0)
6+
7+
### Features
8+
9+
* **api:** type updates for conversations, reasoning_effort and results for evals ([c2ee28c](https://github.com/openai/openai-python/commit/c2ee28c1b77eed98766fbb01cf1ad2ee240f412e))
10+
11+
12+
### Chores
13+
14+
* **internal:** update pydantic dependency ([369d10a](https://github.com/openai/openai-python/commit/369d10a40dfe744f6bfc10c99eb1f58176500120))
15+
16+
## 1.107.3 (2025-09-15)
17+
18+
Full Changelog: [v1.107.2...v1.107.3](https://github.com/openai/openai-python/compare/v1.107.2...v1.107.3)
19+
20+
### Chores
21+
22+
* **api:** docs and spec refactoring ([9bab5da](https://github.com/openai/openai-python/commit/9bab5da1802c3575c58e73ed1470dd5fa61fd1d2))
23+
* **tests:** simplify `get_platform` test ([0b1f6a2](https://github.com/openai/openai-python/commit/0b1f6a28d5a59e10873264e976d2e332903eef29))
24+
325
## 1.107.2 (2025-09-12)
426

527
Full Changelog: [v1.107.1...v1.107.2](https://github.com/openai/openai-python/compare/v1.107.1...v1.107.2)

api.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -991,22 +991,17 @@ Types:
991991
```python
992992
from openai.types.conversations import (
993993
ComputerScreenshotContent,
994-
ContainerFileCitationBody,
995994
Conversation,
996995
ConversationDeleted,
997996
ConversationDeletedResource,
998-
FileCitationBody,
999-
InputFileContent,
1000-
InputImageContent,
1001-
InputTextContent,
1002-
LobProb,
1003997
Message,
1004-
OutputTextContent,
1005-
RefusalContent,
1006998
SummaryTextContent,
1007999
TextContent,
1008-
TopLogProb,
1009-
URLCitationBody,
1000+
InputTextContent,
1001+
OutputTextContent,
1002+
RefusalContent,
1003+
InputImageContent,
1004+
InputFileContent,
10101005
)
10111006
```
10121007

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.107.2"
3+
version = "1.108.0"
44
description = "The official Python library for the openai API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

requirements-dev.lock

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ multidict==6.5.0
108108
mypy==1.14.1
109109
mypy-extensions==1.0.0
110110
# via mypy
111+
nest-asyncio==1.6.0
111112
nodeenv==1.8.0
112113
# via pyright
113114
nox==2023.4.22
@@ -133,11 +134,11 @@ portalocker==2.10.1
133134
propcache==0.3.2
134135
# via aiohttp
135136
# via yarl
136-
pycparser==2.22
137+
pycparser==2.23
137138
# via cffi
138-
pydantic==2.10.3
139+
pydantic==2.11.9
139140
# via openai
140-
pydantic-core==2.27.1
141+
pydantic-core==2.33.2
141142
# via pydantic
142143
pygments==2.18.0
143144
# via pytest
@@ -199,6 +200,9 @@ typing-extensions==4.12.2
199200
# via pydantic
200201
# via pydantic-core
201202
# via pyright
203+
# via typing-inspection
204+
typing-inspection==0.4.1
205+
# via pydantic
202206
tzdata==2024.1
203207
# via pandas
204208
urllib3==2.2.1

requirements.lock

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ pandas-stubs==2.2.2.240807
6767
propcache==0.3.2
6868
# via aiohttp
6969
# via yarl
70-
pycparser==2.22
70+
pycparser==2.23
7171
# via cffi
72-
pydantic==2.10.3
72+
pydantic==2.11.9
7373
# via openai
74-
pydantic-core==2.27.1
74+
pydantic-core==2.33.2
7575
# via pydantic
7676
python-dateutil==2.9.0.post0
7777
# via pandas
@@ -93,7 +93,10 @@ typing-extensions==4.12.2
9393
# via openai
9494
# via pydantic
9595
# via pydantic-core
96-
tzdata==2024.1
96+
# via typing-inspection
97+
typing-inspection==0.4.1
98+
# via pydantic
99+
tzdata==2025.2
97100
# via pandas
98101
websockets==15.0.1
99102
# via openai

src/openai/_models.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,15 @@ def model_dump(
281281
mode: Literal["json", "python"] | str = "python",
282282
include: IncEx | None = None,
283283
exclude: IncEx | None = None,
284-
by_alias: bool = False,
284+
by_alias: bool | None = None,
285285
exclude_unset: bool = False,
286286
exclude_defaults: bool = False,
287287
exclude_none: bool = False,
288288
round_trip: bool = False,
289289
warnings: bool | Literal["none", "warn", "error"] = True,
290290
context: dict[str, Any] | None = None,
291291
serialize_as_any: bool = False,
292+
fallback: Callable[[Any], Any] | None = None,
292293
) -> dict[str, Any]:
293294
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump
294295
@@ -320,10 +321,12 @@ def model_dump(
320321
raise ValueError("context is only supported in Pydantic v2")
321322
if serialize_as_any != False:
322323
raise ValueError("serialize_as_any is only supported in Pydantic v2")
324+
if fallback is not None:
325+
raise ValueError("fallback is only supported in Pydantic v2")
323326
dumped = super().dict( # pyright: ignore[reportDeprecated]
324327
include=include,
325328
exclude=exclude,
326-
by_alias=by_alias,
329+
by_alias=by_alias if by_alias is not None else False,
327330
exclude_unset=exclude_unset,
328331
exclude_defaults=exclude_defaults,
329332
exclude_none=exclude_none,
@@ -338,13 +341,14 @@ def model_dump_json(
338341
indent: int | None = None,
339342
include: IncEx | None = None,
340343
exclude: IncEx | None = None,
341-
by_alias: bool = False,
344+
by_alias: bool | None = None,
342345
exclude_unset: bool = False,
343346
exclude_defaults: bool = False,
344347
exclude_none: bool = False,
345348
round_trip: bool = False,
346349
warnings: bool | Literal["none", "warn", "error"] = True,
347350
context: dict[str, Any] | None = None,
351+
fallback: Callable[[Any], Any] | None = None,
348352
serialize_as_any: bool = False,
349353
) -> str:
350354
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json
@@ -373,11 +377,13 @@ def model_dump_json(
373377
raise ValueError("context is only supported in Pydantic v2")
374378
if serialize_as_any != False:
375379
raise ValueError("serialize_as_any is only supported in Pydantic v2")
380+
if fallback is not None:
381+
raise ValueError("fallback is only supported in Pydantic v2")
376382
return super().json( # type: ignore[reportDeprecated]
377383
indent=indent,
378384
include=include,
379385
exclude=exclude,
380-
by_alias=by_alias,
386+
by_alias=by_alias if by_alias is not None else False,
381387
exclude_unset=exclude_unset,
382388
exclude_defaults=exclude_defaults,
383389
exclude_none=exclude_none,

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.107.2" # x-release-please-version
4+
__version__ = "1.108.0" # x-release-please-version

src/openai/resources/chat/completions/completions.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,10 +1300,12 @@ def list(
13001300
13011301
limit: Number of Chat Completions to retrieve.
13021302
1303-
metadata:
1304-
A list of metadata keys to filter the Chat Completions by. Example:
1303+
metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
1304+
for storing additional information about the object in a structured format, and
1305+
querying for objects via API or the dashboard.
13051306
1306-
`metadata[key1]=value1&metadata[key2]=value2`
1307+
Keys are strings with a maximum length of 64 characters. Values are strings with
1308+
a maximum length of 512 characters.
13071309
13081310
model: The model used to generate the Chat Completions.
13091311
@@ -2736,10 +2738,12 @@ def list(
27362738
27372739
limit: Number of Chat Completions to retrieve.
27382740
2739-
metadata:
2740-
A list of metadata keys to filter the Chat Completions by. Example:
2741+
metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
2742+
for storing additional information about the object in a structured format, and
2743+
querying for objects via API or the dashboard.
27412744
2742-
`metadata[key1]=value1&metadata[key2]=value2`
2745+
Keys are strings with a maximum length of 64 characters. Values are strings with
2746+
a maximum length of 512 characters.
27432747
27442748
model: The model used to generate the Chat Completions.
27452749

0 commit comments

Comments
 (0)