Skip to content

Commit 9951a46

Browse files
release: 0.1.0-alpha.27 (#126)
* chore(tests): simplify `get_platform` test `nest_asyncio` is archived and broken on some platforms so it's not worth keeping in our test suite. * feat(api): api update * feat(api): api update * feat(api): api update * feat(api): api update * chore(internal): update pydantic dependency * feat(api): api update * chore(types): change optional parameter type from NotGiven to Omit * codegen metadata * release: 0.1.0-alpha.27 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 2643c21 commit 9951a46

File tree

69 files changed

+929
-1850
lines changed

Some content is hidden

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

69 files changed

+929
-1850
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-
".": "0.1.0-alpha.26"
2+
".": "0.1.0-alpha.27"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
configured_endpoints: 56
2-
openapi_spec_hash: 12260ab88069ff15d254606e041debfb
3-
config_hash: 6c3ad84d97bf1d0989ad2ec0cae64078
1+
configured_endpoints: 54
2+
openapi_spec_hash: f263c6c6d8d75a8f7c1e9c65188e7ef2
3+
config_hash: 04312af86542d1127f09d3f3cbe5bb50

CHANGELOG.md

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

3+
## 0.1.0-alpha.27 (2025-09-19)
4+
5+
Full Changelog: [v0.1.0-alpha.26...v0.1.0-alpha.27](https://github.com/cleanlab/codex-python/compare/v0.1.0-alpha.26...v0.1.0-alpha.27)
6+
7+
### Features
8+
9+
* **api:** api update ([7075aca](https://github.com/cleanlab/codex-python/commit/7075aca8381929be65bd7d0310a501620bbede90))
10+
* **api:** api update ([54beb02](https://github.com/cleanlab/codex-python/commit/54beb025117a30e6b0e56986bde48457e6539d01))
11+
* **api:** api update ([16ec26b](https://github.com/cleanlab/codex-python/commit/16ec26b53edf9724bf78f1267a641eb711bdc3e5))
12+
* **api:** api update ([9a65cae](https://github.com/cleanlab/codex-python/commit/9a65cae3b351709a98eb4bc8f695e91f397c4994))
13+
* **api:** api update ([7ccf252](https://github.com/cleanlab/codex-python/commit/7ccf252ba391da0a565e0fd1dd33cc9223a1eb9a))
14+
15+
16+
### Chores
17+
18+
* **internal:** update pydantic dependency ([2c0bd75](https://github.com/cleanlab/codex-python/commit/2c0bd7546c46ad96707d948d34f60df28c701697))
19+
* **tests:** simplify `get_platform` test ([1c03b05](https://github.com/cleanlab/codex-python/commit/1c03b059628ef850cde4760950bc4e7a4d830015))
20+
* **types:** change optional parameter type from NotGiven to Omit ([5cd7ee0](https://github.com/cleanlab/codex-python/commit/5cd7ee0987fe4e29292e3e9c738fe2bd5945d008))
21+
322
## 0.1.0-alpha.26 (2025-09-05)
423

524
Full Changelog: [v0.1.0-alpha.25...v0.1.0-alpha.26](https://github.com/cleanlab/codex-python/compare/v0.1.0-alpha.25...v0.1.0-alpha.26)

api.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -252,16 +252,3 @@ Methods:
252252
- <code title="patch /api/projects/{project_id}/remediations/{remediation_id}/pause">client.projects.remediations.<a href="./src/codex/resources/projects/remediations.py">pause</a>(remediation_id, \*, project_id) -> <a href="./src/codex/types/projects/remediation_pause_response.py">RemediationPauseResponse</a></code>
253253
- <code title="patch /api/projects/{project_id}/remediations/{remediation_id}/publish">client.projects.remediations.<a href="./src/codex/resources/projects/remediations.py">publish</a>(remediation_id, \*, project_id) -> <a href="./src/codex/types/projects/remediation_publish_response.py">RemediationPublishResponse</a></code>
254254
- <code title="patch /api/projects/{project_id}/remediations/{remediation_id}/unpause">client.projects.remediations.<a href="./src/codex/resources/projects/remediations.py">unpause</a>(remediation_id, \*, project_id) -> <a href="./src/codex/types/projects/remediation_unpause_response.py">RemediationUnpauseResponse</a></code>
255-
256-
# Tlm
257-
258-
Types:
259-
260-
```python
261-
from codex.types import TlmPromptResponse, TlmScoreResponse
262-
```
263-
264-
Methods:
265-
266-
- <code title="post /api/tlm/prompt">client.tlm.<a href="./src/codex/resources/tlm.py">prompt</a>(\*\*<a href="src/codex/types/tlm_prompt_params.py">params</a>) -> <a href="./src/codex/types/tlm_prompt_response.py">TlmPromptResponse</a></code>
267-
- <code title="post /api/tlm/score">client.tlm.<a href="./src/codex/resources/tlm.py">score</a>(\*\*<a href="src/codex/types/tlm_score_params.py">params</a>) -> <a href="./src/codex/types/tlm_score_response.py">TlmScoreResponse</a></code>

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "codex-sdk"
3-
version = "0.1.0-alpha.26"
3+
version = "0.1.0-alpha.27"
44
description = "Internal SDK used within cleanlab-codex package. Refer to https://pypi.org/project/cleanlab-codex/ instead."
55
dynamic = ["readme"]
66
license = "MIT"
@@ -56,7 +56,6 @@ dev-dependencies = [
5656
"dirty-equals>=0.6.0",
5757
"importlib-metadata>=6.7.0",
5858
"rich>=13.7.1",
59-
"nest_asyncio==1.6.0",
6059
"pytest-xdist>=3.6.1",
6160
]
6261

requirements-dev.lock

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ multidict==6.4.4
7575
mypy==1.14.1
7676
mypy-extensions==1.0.0
7777
# via mypy
78-
nest-asyncio==1.6.0
7978
nodeenv==1.8.0
8079
# via pyright
8180
nox==2023.4.22
@@ -89,9 +88,9 @@ pluggy==1.5.0
8988
propcache==0.3.1
9089
# via aiohttp
9190
# via yarl
92-
pydantic==2.10.3
91+
pydantic==2.11.9
9392
# via codex-sdk
94-
pydantic-core==2.27.1
93+
pydantic-core==2.33.2
9594
# via pydantic
9695
pygments==2.18.0
9796
# via rich
@@ -127,6 +126,9 @@ typing-extensions==4.12.2
127126
# via pydantic
128127
# via pydantic-core
129128
# via pyright
129+
# via typing-inspection
130+
typing-inspection==0.4.1
131+
# via pydantic
130132
virtualenv==20.24.5
131133
# via nox
132134
yarl==1.20.0

requirements.lock

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ multidict==6.4.4
5555
propcache==0.3.1
5656
# via aiohttp
5757
# via yarl
58-
pydantic==2.10.3
58+
pydantic==2.11.9
5959
# via codex-sdk
60-
pydantic-core==2.27.1
60+
pydantic-core==2.33.2
6161
# via pydantic
6262
sniffio==1.3.0
6363
# via anyio
@@ -68,5 +68,8 @@ typing-extensions==4.12.2
6868
# via multidict
6969
# via pydantic
7070
# via pydantic-core
71+
# via typing-inspection
72+
typing-inspection==0.4.1
73+
# via pydantic
7174
yarl==1.20.0
7275
# via aiohttp

src/codex/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import typing as _t
44

55
from . import types
6-
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
6+
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
77
from ._utils import file_from_path
88
from ._client import (
99
ENVIRONMENTS,
@@ -49,7 +49,9 @@
4949
"ProxiesTypes",
5050
"NotGiven",
5151
"NOT_GIVEN",
52+
"not_given",
5253
"Omit",
54+
"omit",
5355
"CodexError",
5456
"APIError",
5557
"APIStatusError",

src/codex/_base_client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
from ._qs import Querystring
4343
from ._files import to_httpx_files, async_to_httpx_files
4444
from ._types import (
45-
NOT_GIVEN,
4645
Body,
4746
Omit,
4847
Query,
@@ -57,6 +56,7 @@
5756
RequestOptions,
5857
HttpxRequestFiles,
5958
ModelBuilderProtocol,
59+
not_given,
6060
)
6161
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
6262
from ._compat import PYDANTIC_V1, model_copy, model_dump
@@ -145,9 +145,9 @@ def __init__(
145145
def __init__(
146146
self,
147147
*,
148-
url: URL | NotGiven = NOT_GIVEN,
149-
json: Body | NotGiven = NOT_GIVEN,
150-
params: Query | NotGiven = NOT_GIVEN,
148+
url: URL | NotGiven = not_given,
149+
json: Body | NotGiven = not_given,
150+
params: Query | NotGiven = not_given,
151151
) -> None:
152152
self.url = url
153153
self.json = json
@@ -595,7 +595,7 @@ def _maybe_override_cast_to(self, cast_to: type[ResponseT], options: FinalReques
595595
# we internally support defining a temporary header to override the
596596
# default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response`
597597
# see _response.py for implementation details
598-
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, NOT_GIVEN)
598+
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given)
599599
if is_given(override_cast_to):
600600
options.headers = headers
601601
return cast(Type[ResponseT], override_cast_to)
@@ -825,7 +825,7 @@ def __init__(
825825
version: str,
826826
base_url: str | URL,
827827
max_retries: int = DEFAULT_MAX_RETRIES,
828-
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
828+
timeout: float | Timeout | None | NotGiven = not_given,
829829
http_client: httpx.Client | None = None,
830830
custom_headers: Mapping[str, str] | None = None,
831831
custom_query: Mapping[str, object] | None = None,
@@ -1356,7 +1356,7 @@ def __init__(
13561356
base_url: str | URL,
13571357
_strict_response_validation: bool,
13581358
max_retries: int = DEFAULT_MAX_RETRIES,
1359-
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
1359+
timeout: float | Timeout | None | NotGiven = not_given,
13601360
http_client: httpx.AsyncClient | None = None,
13611361
custom_headers: Mapping[str, str] | None = None,
13621362
custom_query: Mapping[str, object] | None = None,
@@ -1818,8 +1818,8 @@ def make_request_options(
18181818
extra_query: Query | None = None,
18191819
extra_body: Body | None = None,
18201820
idempotency_key: str | None = None,
1821-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1822-
post_parser: PostParser | NotGiven = NOT_GIVEN,
1821+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
1822+
post_parser: PostParser | NotGiven = not_given,
18231823
) -> RequestOptions:
18241824
"""Create a dict of type RequestOptions without keys of NotGiven values."""
18251825
options: RequestOptions = {}

src/codex/_client.py

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33
from __future__ import annotations
44

55
import os
6-
from typing import Any, Dict, Union, Mapping, cast
6+
from typing import Any, Dict, Mapping, cast
77
from typing_extensions import Self, Literal, override
88

99
import httpx
1010

1111
from . import _exceptions
1212
from ._qs import Querystring
1313
from ._types import (
14-
NOT_GIVEN,
1514
Omit,
1615
Headers,
1716
Timeout,
1817
NotGiven,
1918
Transport,
2019
ProxiesTypes,
2120
RequestOptions,
21+
not_given,
2222
)
2323
from ._utils import is_given, get_async_library
2424
from ._version import __version__
25-
from .resources import tlm, health
25+
from .resources import health
2626
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
2727
from ._exceptions import APIStatusError
2828
from ._base_client import (
@@ -58,7 +58,6 @@ class Codex(SyncAPIClient):
5858
organizations: organizations.OrganizationsResource
5959
users: users.UsersResource
6060
projects: projects.ProjectsResource
61-
tlm: tlm.TlmResource
6261
with_raw_response: CodexWithRawResponse
6362
with_streaming_response: CodexWithStreamedResponse
6463

@@ -75,9 +74,9 @@ def __init__(
7574
auth_token: str | None = None,
7675
api_key: str | None = None,
7776
access_key: str | None = None,
78-
environment: Literal["production", "staging", "local"] | NotGiven = NOT_GIVEN,
79-
base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN,
80-
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
77+
environment: Literal["production", "staging", "local"] | NotGiven = not_given,
78+
base_url: str | httpx.URL | None | NotGiven = not_given,
79+
timeout: float | Timeout | None | NotGiven = not_given,
8180
max_retries: int = DEFAULT_MAX_RETRIES,
8281
default_headers: Mapping[str, str] | None = None,
8382
default_query: Mapping[str, object] | None = None,
@@ -143,7 +142,6 @@ def __init__(
143142
self.organizations = organizations.OrganizationsResource(self)
144143
self.users = users.UsersResource(self)
145144
self.projects = projects.ProjectsResource(self)
146-
self.tlm = tlm.TlmResource(self)
147145
self.with_raw_response = CodexWithRawResponse(self)
148146
self.with_streaming_response = CodexWithStreamedResponse(self)
149147

@@ -216,9 +214,9 @@ def copy(
216214
access_key: str | None = None,
217215
environment: Literal["production", "staging", "local"] | None = None,
218216
base_url: str | httpx.URL | None = None,
219-
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
217+
timeout: float | Timeout | None | NotGiven = not_given,
220218
http_client: httpx.Client | None = None,
221-
max_retries: int | NotGiven = NOT_GIVEN,
219+
max_retries: int | NotGiven = not_given,
222220
default_headers: Mapping[str, str] | None = None,
223221
set_default_headers: Mapping[str, str] | None = None,
224222
default_query: Mapping[str, object] | None = None,
@@ -304,7 +302,6 @@ class AsyncCodex(AsyncAPIClient):
304302
organizations: organizations.AsyncOrganizationsResource
305303
users: users.AsyncUsersResource
306304
projects: projects.AsyncProjectsResource
307-
tlm: tlm.AsyncTlmResource
308305
with_raw_response: AsyncCodexWithRawResponse
309306
with_streaming_response: AsyncCodexWithStreamedResponse
310307

@@ -321,9 +318,9 @@ def __init__(
321318
auth_token: str | None = None,
322319
api_key: str | None = None,
323320
access_key: str | None = None,
324-
environment: Literal["production", "staging", "local"] | NotGiven = NOT_GIVEN,
325-
base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN,
326-
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
321+
environment: Literal["production", "staging", "local"] | NotGiven = not_given,
322+
base_url: str | httpx.URL | None | NotGiven = not_given,
323+
timeout: float | Timeout | None | NotGiven = not_given,
327324
max_retries: int = DEFAULT_MAX_RETRIES,
328325
default_headers: Mapping[str, str] | None = None,
329326
default_query: Mapping[str, object] | None = None,
@@ -389,7 +386,6 @@ def __init__(
389386
self.organizations = organizations.AsyncOrganizationsResource(self)
390387
self.users = users.AsyncUsersResource(self)
391388
self.projects = projects.AsyncProjectsResource(self)
392-
self.tlm = tlm.AsyncTlmResource(self)
393389
self.with_raw_response = AsyncCodexWithRawResponse(self)
394390
self.with_streaming_response = AsyncCodexWithStreamedResponse(self)
395391

@@ -462,9 +458,9 @@ def copy(
462458
access_key: str | None = None,
463459
environment: Literal["production", "staging", "local"] | None = None,
464460
base_url: str | httpx.URL | None = None,
465-
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
461+
timeout: float | Timeout | None | NotGiven = not_given,
466462
http_client: httpx.AsyncClient | None = None,
467-
max_retries: int | NotGiven = NOT_GIVEN,
463+
max_retries: int | NotGiven = not_given,
468464
default_headers: Mapping[str, str] | None = None,
469465
set_default_headers: Mapping[str, str] | None = None,
470466
default_query: Mapping[str, object] | None = None,
@@ -551,7 +547,6 @@ def __init__(self, client: Codex) -> None:
551547
self.organizations = organizations.OrganizationsResourceWithRawResponse(client.organizations)
552548
self.users = users.UsersResourceWithRawResponse(client.users)
553549
self.projects = projects.ProjectsResourceWithRawResponse(client.projects)
554-
self.tlm = tlm.TlmResourceWithRawResponse(client.tlm)
555550

556551

557552
class AsyncCodexWithRawResponse:
@@ -560,7 +555,6 @@ def __init__(self, client: AsyncCodex) -> None:
560555
self.organizations = organizations.AsyncOrganizationsResourceWithRawResponse(client.organizations)
561556
self.users = users.AsyncUsersResourceWithRawResponse(client.users)
562557
self.projects = projects.AsyncProjectsResourceWithRawResponse(client.projects)
563-
self.tlm = tlm.AsyncTlmResourceWithRawResponse(client.tlm)
564558

565559

566560
class CodexWithStreamedResponse:
@@ -569,7 +563,6 @@ def __init__(self, client: Codex) -> None:
569563
self.organizations = organizations.OrganizationsResourceWithStreamingResponse(client.organizations)
570564
self.users = users.UsersResourceWithStreamingResponse(client.users)
571565
self.projects = projects.ProjectsResourceWithStreamingResponse(client.projects)
572-
self.tlm = tlm.TlmResourceWithStreamingResponse(client.tlm)
573566

574567

575568
class AsyncCodexWithStreamedResponse:
@@ -578,7 +571,6 @@ def __init__(self, client: AsyncCodex) -> None:
578571
self.organizations = organizations.AsyncOrganizationsResourceWithStreamingResponse(client.organizations)
579572
self.users = users.AsyncUsersResourceWithStreamingResponse(client.users)
580573
self.projects = projects.AsyncProjectsResourceWithStreamingResponse(client.projects)
581-
self.tlm = tlm.AsyncTlmResourceWithStreamingResponse(client.tlm)
582574

583575

584576
Client = Codex

0 commit comments

Comments
 (0)