Skip to content

release: 1.88.0 #2413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
lint:
Expand Down Expand Up @@ -95,11 +99,11 @@ jobs:
run: |
rye sync --all-features
- env:
- env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
rye run python examples/demo.py
- env:
- env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
rye run python examples/async_demo.py
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.87.0"
".": "1.88.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-9e41d2d5471d2c28bff0d616f4476f5b0e6c541ef4cb51bdaaef5fdf5e13c8b2.yml
openapi_spec_hash: 86f765e18d00e32cf2ce9db7ab84d946
config_hash: fd2af1d5eff0995bb7dc02ac9a34851d
config_hash: dc5515e257676a27cb1ace1784aa92b3
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 1.88.0 (2025-06-17)

Full Changelog: [v1.87.0...v1.88.0](https://github.com/openai/openai-python/compare/v1.87.0...v1.88.0)

### Features

* **api:** manual updates ([5d18a84](https://github.com/openai/openai-python/commit/5d18a8448ecbe31597e98ec7f64d7050c831901e))


### Chores

* **ci:** enable for pull requests ([542b0ce](https://github.com/openai/openai-python/commit/542b0ce98f14ccff4f9e1bcbd3a9ea5e4f846638))
* **internal:** minor formatting ([29d723d](https://github.com/openai/openai-python/commit/29d723d1f1baf2a5843293c8647dc7baa16d56d1))

## 1.87.0 (2025-06-16)

Full Changelog: [v1.86.0...v1.87.0](https://github.com/openai/openai-python/compare/v1.86.0...v1.87.0)
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ from openai.types.fine_tuning.checkpoints import (
Methods:

- <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>
- <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>
- <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>
- <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>

## Alpha
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openai"
version = "1.87.0"
version = "1.88.0"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openai"
__version__ = "1.87.0" # x-release-please-version
__version__ = "1.88.0" # x-release-please-version
22 changes: 12 additions & 10 deletions src/openai/resources/fine_tuning/checkpoints/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

from .... import _legacy_response
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._utils import maybe_transform, async_maybe_transform
from ...._utils import maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ....pagination import SyncPage, AsyncPage
from ....pagination import SyncPage, AsyncPage, SyncCursorPage, AsyncCursorPage
from ...._base_client import AsyncPaginator, make_request_options
from ....types.fine_tuning.checkpoints import permission_create_params, permission_retrieve_params
from ....types.fine_tuning.checkpoints.permission_create_response import PermissionCreateResponse
Expand Down Expand Up @@ -101,7 +101,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> PermissionRetrieveResponse:
) -> SyncCursorPage[PermissionRetrieveResponse]:
"""
**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
Expand Down Expand Up @@ -129,8 +129,9 @@ def retrieve(
raise ValueError(
f"Expected a non-empty value for `fine_tuned_model_checkpoint` but received {fine_tuned_model_checkpoint!r}"
)
return self._get(
return self._get_api_list(
f"/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions",
page=SyncCursorPage[PermissionRetrieveResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand All @@ -146,7 +147,7 @@ def retrieve(
permission_retrieve_params.PermissionRetrieveParams,
),
),
cast_to=PermissionRetrieveResponse,
model=PermissionRetrieveResponse,
)

def delete(
Expand Down Expand Up @@ -255,7 +256,7 @@ def create(
method="post",
)

async def retrieve(
def retrieve(
self,
fine_tuned_model_checkpoint: str,
*,
Expand All @@ -269,7 +270,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> PermissionRetrieveResponse:
) -> AsyncPaginator[PermissionRetrieveResponse, AsyncCursorPage[PermissionRetrieveResponse]]:
"""
**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
Expand Down Expand Up @@ -297,14 +298,15 @@ async def retrieve(
raise ValueError(
f"Expected a non-empty value for `fine_tuned_model_checkpoint` but received {fine_tuned_model_checkpoint!r}"
)
return await self._get(
return self._get_api_list(
f"/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions",
page=AsyncCursorPage[PermissionRetrieveResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
query=maybe_transform(
{
"after": after,
"limit": limit,
Expand All @@ -314,7 +316,7 @@ async def retrieve(
permission_retrieve_params.PermissionRetrieveParams,
),
),
cast_to=PermissionRetrieveResponse,
model=PermissionRetrieveResponse,
)

async def delete(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing_extensions import Literal

from ...._models import BaseModel

__all__ = ["PermissionRetrieveResponse", "Data"]
__all__ = ["PermissionRetrieveResponse"]


class Data(BaseModel):
class PermissionRetrieveResponse(BaseModel):
id: str
"""The permission identifier, which can be referenced in the API endpoints."""

Expand All @@ -20,15 +19,3 @@ class Data(BaseModel):

project_id: str
"""The project identifier that the permission is for."""


class PermissionRetrieveResponse(BaseModel):
data: List[Data]

has_more: bool

object: Literal["list"]

first_id: Optional[str] = None

last_id: Optional[str] = None
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from openai import OpenAI, AsyncOpenAI
from tests.utils import assert_matches_type
from openai.pagination import SyncPage, AsyncPage
from openai.pagination import SyncPage, AsyncPage, SyncCursorPage, AsyncCursorPage
from openai.types.fine_tuning.checkpoints import (
PermissionCreateResponse,
PermissionDeleteResponse,
Expand Down Expand Up @@ -71,7 +71,7 @@ def test_method_retrieve(self, client: OpenAI) -> None:
permission = client.fine_tuning.checkpoints.permissions.retrieve(
fine_tuned_model_checkpoint="ft-AF1WoRqd3aJAHsqc9NY7iL8F",
)
assert_matches_type(PermissionRetrieveResponse, permission, path=["response"])
assert_matches_type(SyncCursorPage[PermissionRetrieveResponse], permission, path=["response"])

@parametrize
def test_method_retrieve_with_all_params(self, client: OpenAI) -> None:
Expand All @@ -82,7 +82,7 @@ def test_method_retrieve_with_all_params(self, client: OpenAI) -> None:
order="ascending",
project_id="project_id",
)
assert_matches_type(PermissionRetrieveResponse, permission, path=["response"])
assert_matches_type(SyncCursorPage[PermissionRetrieveResponse], permission, path=["response"])

@parametrize
def test_raw_response_retrieve(self, client: OpenAI) -> None:
Expand All @@ -93,7 +93,7 @@ def test_raw_response_retrieve(self, client: OpenAI) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission = response.parse()
assert_matches_type(PermissionRetrieveResponse, permission, path=["response"])
assert_matches_type(SyncCursorPage[PermissionRetrieveResponse], permission, path=["response"])

@parametrize
def test_streaming_response_retrieve(self, client: OpenAI) -> None:
Expand All @@ -104,7 +104,7 @@ def test_streaming_response_retrieve(self, client: OpenAI) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

permission = response.parse()
assert_matches_type(PermissionRetrieveResponse, permission, path=["response"])
assert_matches_type(SyncCursorPage[PermissionRetrieveResponse], permission, path=["response"])

assert cast(Any, response.is_closed) is True

Expand Down Expand Up @@ -220,7 +220,7 @@ async def test_method_retrieve(self, async_client: AsyncOpenAI) -> None:
permission = await async_client.fine_tuning.checkpoints.permissions.retrieve(
fine_tuned_model_checkpoint="ft-AF1WoRqd3aJAHsqc9NY7iL8F",
)
assert_matches_type(PermissionRetrieveResponse, permission, path=["response"])
assert_matches_type(AsyncCursorPage[PermissionRetrieveResponse], permission, path=["response"])

@parametrize
async def test_method_retrieve_with_all_params(self, async_client: AsyncOpenAI) -> None:
Expand All @@ -231,7 +231,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncOpenAI)
order="ascending",
project_id="project_id",
)
assert_matches_type(PermissionRetrieveResponse, permission, path=["response"])
assert_matches_type(AsyncCursorPage[PermissionRetrieveResponse], permission, path=["response"])

@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncOpenAI) -> None:
Expand All @@ -242,7 +242,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncOpenAI) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission = response.parse()
assert_matches_type(PermissionRetrieveResponse, permission, path=["response"])
assert_matches_type(AsyncCursorPage[PermissionRetrieveResponse], permission, path=["response"])

@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncOpenAI) -> None:
Expand All @@ -253,7 +253,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncOpenAI) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

permission = await response.parse()
assert_matches_type(PermissionRetrieveResponse, permission, path=["response"])
assert_matches_type(AsyncCursorPage[PermissionRetrieveResponse], permission, path=["response"])

assert cast(Any, response.is_closed) is True

Expand Down