Skip to content

Commit 1dcdb13

Browse files
authored
Merge branch 'main' into main
2 parents 547ba89 + 8ade764 commit 1dcdb13

35 files changed

+709
-105
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- 'integrated/**'
88
- 'stl-preview-head/**'
99
- 'stl-preview-base/**'
10+
pull_request:
11+
branches-ignore:
12+
- 'stl-preview-head/**'
13+
- 'stl-preview-base/**'
1014

1115
jobs:
1216
lint:
@@ -95,11 +99,11 @@ jobs:
9599
run: |
96100
rye sync --all-features
97101
98-
- env:
102+
- env:
99103
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
100104
run: |
101105
rye run python examples/demo.py
102-
- env:
106+
- env:
103107
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
104108
run: |
105109
rye run python examples/async_demo.py

.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.85.0"
2+
".": "1.88.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: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-4865dda2b62927bd141cbc85f81be3d88602f103e2c581e15eb1caded3e3aaa2.yml
3-
openapi_spec_hash: 7d14a9b23ef4ac93ea46d629601b6f6b
4-
config_hash: ed1e6b3c5f93d12b80d31167f55c557c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-9e41d2d5471d2c28bff0d616f4476f5b0e6c541ef4cb51bdaaef5fdf5e13c8b2.yml
3+
openapi_spec_hash: 86f765e18d00e32cf2ce9db7ab84d946
4+
config_hash: dc5515e257676a27cb1ace1784aa92b3

CHANGELOG.md

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

3+
## 1.88.0 (2025-06-17)
4+
5+
Full Changelog: [v1.87.0...v1.88.0](https://github.com/openai/openai-python/compare/v1.87.0...v1.88.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([5d18a84](https://github.com/openai/openai-python/commit/5d18a8448ecbe31597e98ec7f64d7050c831901e))
10+
11+
12+
### Chores
13+
14+
* **ci:** enable for pull requests ([542b0ce](https://github.com/openai/openai-python/commit/542b0ce98f14ccff4f9e1bcbd3a9ea5e4f846638))
15+
* **internal:** minor formatting ([29d723d](https://github.com/openai/openai-python/commit/29d723d1f1baf2a5843293c8647dc7baa16d56d1))
16+
17+
## 1.87.0 (2025-06-16)
18+
19+
Full Changelog: [v1.86.0...v1.87.0](https://github.com/openai/openai-python/compare/v1.86.0...v1.87.0)
20+
21+
### Features
22+
23+
* **api:** add reusable prompt IDs ([36bfe6e](https://github.com/openai/openai-python/commit/36bfe6e8ae12a31624ba1a360d9260f0aeec448a))
24+
25+
26+
### Bug Fixes
27+
28+
* **client:** update service_tier on `client.beta.chat.completions` ([aa488d5](https://github.com/openai/openai-python/commit/aa488d5cf210d8640f87216538d4ff79d7181f2a))
29+
30+
31+
### Chores
32+
33+
* **internal:** codegen related update ([b1a31e5](https://github.com/openai/openai-python/commit/b1a31e5ef4387d9f82cf33f9461371651788d381))
34+
* **internal:** update conftest.py ([bba0213](https://github.com/openai/openai-python/commit/bba0213842a4c161f2235e526d50901a336eecef))
35+
* **tests:** add tests for httpx client instantiation & proxies ([bc93712](https://github.com/openai/openai-python/commit/bc9371204f457aee9ed9b6ec1b61c2084f32faf1))
36+
37+
## 1.86.0 (2025-06-10)
38+
39+
Full Changelog: [v1.85.0...v1.86.0](https://github.com/openai/openai-python/compare/v1.85.0...v1.86.0)
40+
41+
### Features
42+
43+
* **api:** Add o3-pro model IDs ([d8dd80b](https://github.com/openai/openai-python/commit/d8dd80b1b4e6c73687d7acb6c3f62f0bf4b8282c))
44+
345
## 1.85.0 (2025-06-09)
446

547
Full Changelog: [v1.84.0...v1.85.0](https://github.com/openai/openai-python/compare/v1.84.0...v1.85.0)

api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ from openai.types.fine_tuning.checkpoints import (
293293
Methods:
294294

295295
- <code title="post /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fine_tuning.checkpoints.permissions.<a href="./src/openai/resources/fine_tuning/checkpoints/permissions.py">create</a>(fine_tuned_model_checkpoint, \*\*<a href="src/openai/types/fine_tuning/checkpoints/permission_create_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/checkpoints/permission_create_response.py">SyncPage[PermissionCreateResponse]</a></code>
296-
- <code title="get /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fine_tuning.checkpoints.permissions.<a href="./src/openai/resources/fine_tuning/checkpoints/permissions.py">retrieve</a>(fine_tuned_model_checkpoint, \*\*<a href="src/openai/types/fine_tuning/checkpoints/permission_retrieve_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/checkpoints/permission_retrieve_response.py">PermissionRetrieveResponse</a></code>
296+
- <code title="get /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fine_tuning.checkpoints.permissions.<a href="./src/openai/resources/fine_tuning/checkpoints/permissions.py">retrieve</a>(fine_tuned_model_checkpoint, \*\*<a href="src/openai/types/fine_tuning/checkpoints/permission_retrieve_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/checkpoints/permission_retrieve_response.py">SyncCursorPage[PermissionRetrieveResponse]</a></code>
297297
- <code title="delete /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}">client.fine_tuning.checkpoints.permissions.<a href="./src/openai/resources/fine_tuning/checkpoints/permissions.py">delete</a>(permission_id, \*, fine_tuned_model_checkpoint) -> <a href="./src/openai/types/fine_tuning/checkpoints/permission_delete_response.py">PermissionDeleteResponse</a></code>
298298

299299
## Alpha
@@ -750,6 +750,7 @@ from openai.types.responses import (
750750
ResponseOutputRefusal,
751751
ResponseOutputText,
752752
ResponseOutputTextAnnotationAddedEvent,
753+
ResponsePrompt,
753754
ResponseQueuedEvent,
754755
ResponseReasoningDeltaEvent,
755756
ResponseReasoningDoneEvent,

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "openai"
3-
version = "1.85.0"
3+
version = "1.88.0"
44
description = "The official Python library for the openai API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -70,6 +70,7 @@ dev-dependencies = [
7070
"types-pyaudio > 0",
7171
"trio >=0.22.2",
7272
"nest_asyncio==1.6.0",
73+
"pytest-xdist>=3.6.1",
7374
]
7475

7576
[tool.rye.scripts]
@@ -141,7 +142,7 @@ replacement = '[\1](https://github.com/openai/openai-python/tree/main/\g<2>)'
141142

142143
[tool.pytest.ini_options]
143144
testpaths = ["tests"]
144-
addopts = "--tb=short"
145+
addopts = "--tb=short -n auto"
145146
xfail_strict = true
146147
asyncio_mode = "auto"
147148
asyncio_default_fixture_loop_scope = "session"

requirements-dev.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ exceptiongroup==1.2.2
5454
# via anyio
5555
# via pytest
5656
# via trio
57+
execnet==2.1.1
58+
# via pytest-xdist
5759
executing==2.1.0
5860
# via inline-snapshot
5961
filelock==3.12.4
@@ -129,7 +131,9 @@ pyjwt==2.8.0
129131
pyright==1.1.399
130132
pytest==8.3.3
131133
# via pytest-asyncio
134+
# via pytest-xdist
132135
pytest-asyncio==0.24.0
136+
pytest-xdist==3.7.0
133137
python-dateutil==2.8.2
134138
# via pandas
135139
# via time-machine

src/openai/_base_client.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,14 @@ def _process_response(
10881088

10891089
origin = get_origin(cast_to) or cast_to
10901090

1091-
if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse):
1091+
if (
1092+
inspect.isclass(origin)
1093+
and issubclass(origin, BaseAPIResponse)
1094+
# we only want to actually return the custom BaseAPIResponse class if we're
1095+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
1096+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
1097+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
1098+
):
10921099
if not issubclass(origin, APIResponse):
10931100
raise TypeError(f"API Response types must subclass {APIResponse}; Received {origin}")
10941101

@@ -1606,7 +1613,14 @@ async def _process_response(
16061613

16071614
origin = get_origin(cast_to) or cast_to
16081615

1609-
if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse):
1616+
if (
1617+
inspect.isclass(origin)
1618+
and issubclass(origin, BaseAPIResponse)
1619+
# we only want to actually return the custom BaseAPIResponse class if we're
1620+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
1621+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
1622+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
1623+
):
16101624
if not issubclass(origin, AsyncAPIResponse):
16111625
raise TypeError(f"API Response types must subclass {AsyncAPIResponse}; Received {origin}")
16121626

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

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def parse(
8181
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
8282
reasoning_effort: Optional[ReasoningEffort] | NotGiven = NOT_GIVEN,
8383
seed: Optional[int] | NotGiven = NOT_GIVEN,
84-
service_tier: Optional[Literal["auto", "default", "flex"]] | NotGiven = NOT_GIVEN,
84+
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] | NotGiven = NOT_GIVEN,
8585
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
8686
store: Optional[bool] | NotGiven = NOT_GIVEN,
8787
stream_options: Optional[ChatCompletionStreamOptionsParam] | NotGiven = NOT_GIVEN,
@@ -228,7 +228,7 @@ def stream(
228228
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
229229
reasoning_effort: Optional[ReasoningEffort] | NotGiven = NOT_GIVEN,
230230
seed: Optional[int] | NotGiven = NOT_GIVEN,
231-
service_tier: Optional[Literal["auto", "default", "flex"]] | NotGiven = NOT_GIVEN,
231+
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] | NotGiven = NOT_GIVEN,
232232
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
233233
store: Optional[bool] | NotGiven = NOT_GIVEN,
234234
stream_options: Optional[ChatCompletionStreamOptionsParam] | NotGiven = NOT_GIVEN,
@@ -360,7 +360,7 @@ async def parse(
360360
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
361361
reasoning_effort: Optional[ReasoningEffort] | NotGiven = NOT_GIVEN,
362362
seed: Optional[int] | NotGiven = NOT_GIVEN,
363-
service_tier: Optional[Literal["auto", "default", "flex"]] | NotGiven = NOT_GIVEN,
363+
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] | NotGiven = NOT_GIVEN,
364364
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
365365
store: Optional[bool] | NotGiven = NOT_GIVEN,
366366
stream_options: Optional[ChatCompletionStreamOptionsParam] | NotGiven = NOT_GIVEN,
@@ -507,7 +507,7 @@ def stream(
507507
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
508508
reasoning_effort: Optional[ReasoningEffort] | NotGiven = NOT_GIVEN,
509509
seed: Optional[int] | NotGiven = NOT_GIVEN,
510-
service_tier: Optional[Literal["auto", "default", "flex"]] | NotGiven = NOT_GIVEN,
510+
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] | NotGiven = NOT_GIVEN,
511511
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
512512
store: Optional[bool] | NotGiven = NOT_GIVEN,
513513
stream_options: Optional[ChatCompletionStreamOptionsParam] | NotGiven = NOT_GIVEN,

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def create(
9595
reasoning_effort: Optional[ReasoningEffort] | NotGiven = NOT_GIVEN,
9696
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
9797
seed: Optional[int] | NotGiven = NOT_GIVEN,
98-
service_tier: Optional[Literal["auto", "default", "flex"]] | NotGiven = NOT_GIVEN,
98+
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] | NotGiven = NOT_GIVEN,
9999
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
100100
store: Optional[bool] | NotGiven = NOT_GIVEN,
101101
stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN,
@@ -365,7 +365,7 @@ def create(
365365
reasoning_effort: Optional[ReasoningEffort] | NotGiven = NOT_GIVEN,
366366
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
367367
seed: Optional[int] | NotGiven = NOT_GIVEN,
368-
service_tier: Optional[Literal["auto", "default", "flex"]] | NotGiven = NOT_GIVEN,
368+
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] | NotGiven = NOT_GIVEN,
369369
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
370370
store: Optional[bool] | NotGiven = NOT_GIVEN,
371371
stream_options: Optional[ChatCompletionStreamOptionsParam] | NotGiven = NOT_GIVEN,
@@ -634,7 +634,7 @@ def create(
634634
reasoning_effort: Optional[ReasoningEffort] | NotGiven = NOT_GIVEN,
635635
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
636636
seed: Optional[int] | NotGiven = NOT_GIVEN,
637-
service_tier: Optional[Literal["auto", "default", "flex"]] | NotGiven = NOT_GIVEN,
637+
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] | NotGiven = NOT_GIVEN,
638638
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
639639
store: Optional[bool] | NotGiven = NOT_GIVEN,
640640
stream_options: Optional[ChatCompletionStreamOptionsParam] | NotGiven = NOT_GIVEN,
@@ -902,7 +902,7 @@ def create(
902902
reasoning_effort: Optional[ReasoningEffort] | NotGiven = NOT_GIVEN,
903903
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
904904
seed: Optional[int] | NotGiven = NOT_GIVEN,
905-
service_tier: Optional[Literal["auto", "default", "flex"]] | NotGiven = NOT_GIVEN,
905+
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] | NotGiven = NOT_GIVEN,
906906
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
907907
store: Optional[bool] | NotGiven = NOT_GIVEN,
908908
stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
@@ -1198,7 +1198,7 @@ async def create(
11981198
reasoning_effort: Optional[ReasoningEffort] | NotGiven = NOT_GIVEN,
11991199
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
12001200
seed: Optional[int] | NotGiven = NOT_GIVEN,
1201-
service_tier: Optional[Literal["auto", "default", "flex"]] | NotGiven = NOT_GIVEN,
1201+
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] | NotGiven = NOT_GIVEN,
12021202
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
12031203
store: Optional[bool] | NotGiven = NOT_GIVEN,
12041204
stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN,
@@ -1468,7 +1468,7 @@ async def create(
14681468
reasoning_effort: Optional[ReasoningEffort] | NotGiven = NOT_GIVEN,
14691469
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
14701470
seed: Optional[int] | NotGiven = NOT_GIVEN,
1471-
service_tier: Optional[Literal["auto", "default", "flex"]] | NotGiven = NOT_GIVEN,
1471+
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] | NotGiven = NOT_GIVEN,
14721472
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
14731473
store: Optional[bool] | NotGiven = NOT_GIVEN,
14741474
stream_options: Optional[ChatCompletionStreamOptionsParam] | NotGiven = NOT_GIVEN,
@@ -1737,7 +1737,7 @@ async def create(
17371737
reasoning_effort: Optional[ReasoningEffort] | NotGiven = NOT_GIVEN,
17381738
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
17391739
seed: Optional[int] | NotGiven = NOT_GIVEN,
1740-
service_tier: Optional[Literal["auto", "default", "flex"]] | NotGiven = NOT_GIVEN,
1740+
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] | NotGiven = NOT_GIVEN,
17411741
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
17421742
store: Optional[bool] | NotGiven = NOT_GIVEN,
17431743
stream_options: Optional[ChatCompletionStreamOptionsParam] | NotGiven = NOT_GIVEN,
@@ -2005,7 +2005,7 @@ async def create(
20052005
reasoning_effort: Optional[ReasoningEffort] | NotGiven = NOT_GIVEN,
20062006
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
20072007
seed: Optional[int] | NotGiven = NOT_GIVEN,
2008-
service_tier: Optional[Literal["auto", "default", "flex"]] | NotGiven = NOT_GIVEN,
2008+
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] | NotGiven = NOT_GIVEN,
20092009
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
20102010
store: Optional[bool] | NotGiven = NOT_GIVEN,
20112011
stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,

src/openai/resources/fine_tuning/checkpoints/permissions.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
from .... import _legacy_response
1111
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
12-
from ...._utils import maybe_transform, async_maybe_transform
12+
from ...._utils import maybe_transform
1313
from ...._compat import cached_property
1414
from ...._resource import SyncAPIResource, AsyncAPIResource
1515
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
16-
from ....pagination import SyncPage, AsyncPage
16+
from ....pagination import SyncPage, AsyncPage, SyncCursorPage, AsyncCursorPage
1717
from ...._base_client import AsyncPaginator, make_request_options
1818
from ....types.fine_tuning.checkpoints import permission_create_params, permission_retrieve_params
1919
from ....types.fine_tuning.checkpoints.permission_create_response import PermissionCreateResponse
@@ -101,7 +101,7 @@ def retrieve(
101101
extra_query: Query | None = None,
102102
extra_body: Body | None = None,
103103
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
104-
) -> PermissionRetrieveResponse:
104+
) -> SyncCursorPage[PermissionRetrieveResponse]:
105105
"""
106106
**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
107107
@@ -129,8 +129,9 @@ def retrieve(
129129
raise ValueError(
130130
f"Expected a non-empty value for `fine_tuned_model_checkpoint` but received {fine_tuned_model_checkpoint!r}"
131131
)
132-
return self._get(
132+
return self._get_api_list(
133133
f"/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions",
134+
page=SyncCursorPage[PermissionRetrieveResponse],
134135
options=make_request_options(
135136
extra_headers=extra_headers,
136137
extra_query=extra_query,
@@ -146,7 +147,7 @@ def retrieve(
146147
permission_retrieve_params.PermissionRetrieveParams,
147148
),
148149
),
149-
cast_to=PermissionRetrieveResponse,
150+
model=PermissionRetrieveResponse,
150151
)
151152

152153
def delete(
@@ -255,7 +256,7 @@ def create(
255256
method="post",
256257
)
257258

258-
async def retrieve(
259+
def retrieve(
259260
self,
260261
fine_tuned_model_checkpoint: str,
261262
*,
@@ -269,7 +270,7 @@ async def retrieve(
269270
extra_query: Query | None = None,
270271
extra_body: Body | None = None,
271272
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
272-
) -> PermissionRetrieveResponse:
273+
) -> AsyncPaginator[PermissionRetrieveResponse, AsyncCursorPage[PermissionRetrieveResponse]]:
273274
"""
274275
**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
275276
@@ -297,14 +298,15 @@ async def retrieve(
297298
raise ValueError(
298299
f"Expected a non-empty value for `fine_tuned_model_checkpoint` but received {fine_tuned_model_checkpoint!r}"
299300
)
300-
return await self._get(
301+
return self._get_api_list(
301302
f"/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions",
303+
page=AsyncCursorPage[PermissionRetrieveResponse],
302304
options=make_request_options(
303305
extra_headers=extra_headers,
304306
extra_query=extra_query,
305307
extra_body=extra_body,
306308
timeout=timeout,
307-
query=await async_maybe_transform(
309+
query=maybe_transform(
308310
{
309311
"after": after,
310312
"limit": limit,
@@ -314,7 +316,7 @@ async def retrieve(
314316
permission_retrieve_params.PermissionRetrieveParams,
315317
),
316318
),
317-
cast_to=PermissionRetrieveResponse,
319+
model=PermissionRetrieveResponse,
318320
)
319321

320322
async def delete(

0 commit comments

Comments
 (0)