openai-codex 0.167.2__tar.gz → 0.168.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {openai_codex-0.167.2 → openai_codex-0.168.0}/PKG-INFO +2 -2
  2. {openai_codex-0.167.2 → openai_codex-0.168.0}/pyproject.toml +3 -3
  3. {openai_codex-0.167.2 → openai_codex-0.168.0}/pyproject.toml.orig +3 -3
  4. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/generated/v2_all.py +276 -0
  5. {openai_codex-0.167.2 → openai_codex-0.168.0}/README.md +0 -0
  6. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/__init__.py +0 -0
  7. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/_approval_mode.py +0 -0
  8. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/_goal.py +0 -0
  9. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/_initialize_metadata.py +0 -0
  10. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/_inputs.py +0 -0
  11. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/_login.py +0 -0
  12. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/_message_router.py +0 -0
  13. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/_run.py +0 -0
  14. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/_runtime_requirements.py +0 -0
  15. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/_sandbox.py +0 -0
  16. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/_version.py +0 -0
  17. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/api.py +0 -0
  18. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/async_client.py +0 -0
  19. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/client.py +0 -0
  20. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/errors.py +0 -0
  21. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/generated/__init__.py +0 -0
  22. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/generated/notification_registry.py +0 -0
  23. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/models.py +0 -0
  24. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/py.typed +0 -0
  25. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/retry.py +0 -0
  26. {openai_codex-0.167.2 → openai_codex-0.168.0}/src/openai_codex/types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openai-codex
3
- Version: 0.167.2
3
+ Version: 0.168.0
4
4
  Summary: Python SDK for Codex
5
5
  Keywords: codex,sdk,llm,ai,agents
6
6
  Author: OpenAI
@@ -10,7 +10,7 @@ Classifier: Intended Audience :: Developers
10
10
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
11
11
  Requires-Dist: pydantic>=2.12
12
12
  Requires-Dist: packaging>=26.2
13
- Requires-Dist: openai-codex-cli-bin==0.167.2
13
+ Requires-Dist: openai-codex-cli-bin==0.168.0
14
14
  Requires-Python: >=3.10
15
15
  Project-URL: Homepage, https://github.com/openai/codex
16
16
  Project-URL: Repository, https://github.com/openai/codex
@@ -1,10 +1,10 @@
1
1
  [build-system]
2
- requires = ["uv_build>=0.11.19,<0.12"]
2
+ requires = ["uv_build>=0.13.0,<0.14"]
3
3
  build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "openai-codex"
7
- version = "0.167.2"
7
+ version = "0.168.0"
8
8
  description = "Python SDK for Codex"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -24,7 +24,7 @@ classifiers = [
24
24
  dependencies = [
25
25
  "pydantic>=2.12",
26
26
  "packaging>=26.2",
27
- "openai-codex-cli-bin==0.167.2",
27
+ "openai-codex-cli-bin==0.168.0",
28
28
  ]
29
29
 
30
30
  [[project.authors]]
@@ -1,10 +1,10 @@
1
1
  [build-system]
2
- requires = ["uv_build>=0.11.19,<0.12"]
2
+ requires = ["uv_build>=0.13.0,<0.14"]
3
3
  build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "openai-codex"
7
- version = "0.167.2"
7
+ version = "0.168.0"
8
8
  description = "Python SDK for Codex"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -16,7 +16,7 @@ classifiers = [
16
16
  "Intended Audience :: Developers",
17
17
  "Topic :: Software Development :: Libraries :: Python Modules",
18
18
  ]
19
- dependencies = ["pydantic>=2.12", "packaging>=26.2", "openai-codex-cli-bin==0.167.2"]
19
+ dependencies = ["pydantic>=2.12", "packaging>=26.2", "openai-codex-cli-bin==0.168.0"]
20
20
 
21
21
  [project.urls]
22
22
  Homepage = "https://github.com/openai/codex"
@@ -426,6 +426,11 @@ class AutoReviewRequirements(BaseModel):
426
426
  required_on_models: Annotated[list[str] | None, Field(alias="requiredOnModels")] = None
427
427
 
428
428
 
429
+ class BedrockProviderId(Enum):
430
+ amazon_bedrock = "amazon-bedrock"
431
+ amazon_bedrock_runtime = "amazon-bedrock-runtime"
432
+
433
+
429
434
  class BrowserUseAccessApprovalLifetime(Enum):
430
435
  turn = "turn"
431
436
  thread = "thread"
@@ -1800,6 +1805,37 @@ class FuzzyFileSearchSessionUpdatedNotification(BaseModel):
1800
1805
  session_id: Annotated[str, Field(alias="sessionId")]
1801
1806
 
1802
1807
 
1808
+ class NoneGatewayAuth(BaseModel):
1809
+ model_config = ConfigDict(
1810
+ populate_by_name=True,
1811
+ )
1812
+ mode: Annotated[Literal["none"], Field(title="NoneGatewayAuthMode")]
1813
+
1814
+
1815
+ class EnvironmentVariableGatewayAuth(BaseModel):
1816
+ model_config = ConfigDict(
1817
+ populate_by_name=True,
1818
+ )
1819
+ env_key: Annotated[str, Field(alias="envKey")]
1820
+ mode: Annotated[
1821
+ Literal["environmentVariable"], Field(title="EnvironmentVariableGatewayAuthMode")
1822
+ ]
1823
+
1824
+
1825
+ class ExternallyConfiguredGatewayAuth(BaseModel):
1826
+ model_config = ConfigDict(
1827
+ populate_by_name=True,
1828
+ )
1829
+ env_key: Annotated[str | None, Field(alias="envKey")] = None
1830
+ mode: Annotated[Literal["externallyConfigured"], Field(title="ModeGatewayAuthMode")]
1831
+
1832
+
1833
+ class GatewayAuth(
1834
+ RootModel[NoneGatewayAuth | EnvironmentVariableGatewayAuth | ExternallyConfiguredGatewayAuth]
1835
+ ):
1836
+ root: NoneGatewayAuth | EnvironmentVariableGatewayAuth | ExternallyConfiguredGatewayAuth
1837
+
1838
+
1803
1839
  class GatewayOAuthCancelResponse(BaseModel):
1804
1840
  model_config = ConfigDict(
1805
1841
  populate_by_name=True,
@@ -1819,6 +1855,10 @@ class GatewayOAuthStatus(Enum):
1819
1855
  failed = "failed"
1820
1856
 
1821
1857
 
1858
+ class GcpProviderId(RootModel[Literal["gcp"]]):
1859
+ root: Literal["gcp"]
1860
+
1861
+
1822
1862
  class GetAccountParams(BaseModel):
1823
1863
  model_config = ConfigDict(
1824
1864
  populate_by_name=True,
@@ -2854,6 +2894,12 @@ class ModelProviderError(
2854
2894
  ]
2855
2895
 
2856
2896
 
2897
+ class ModelProviderListParams(BaseModel):
2898
+ model_config = ConfigDict(
2899
+ populate_by_name=True,
2900
+ )
2901
+
2902
+
2857
2903
  class ModelRerouteReason(RootModel[Literal["highRiskCyberActivity"]]):
2858
2904
  root: Literal["highRiskCyberActivity"]
2859
2905
 
@@ -3686,6 +3732,118 @@ class ProjectSortKey(Enum):
3686
3732
  recency_at = "recencyAt"
3687
3733
 
3688
3734
 
3735
+ class OpenaiProviderSettings(BaseModel):
3736
+ model_config = ConfigDict(
3737
+ populate_by_name=True,
3738
+ )
3739
+ type: Annotated[Literal["openai"], Field(title="OpenaiProviderSettingsType")]
3740
+
3741
+
3742
+ class CustomGatewayProviderSettings(BaseModel):
3743
+ model_config = ConfigDict(
3744
+ populate_by_name=True,
3745
+ )
3746
+ auth: GatewayAuth
3747
+ type: Annotated[Literal["customGateway"], Field(title="CustomGatewayProviderSettingsType")]
3748
+
3749
+
3750
+ class BedrockProviderSettings(BaseModel):
3751
+ model_config = ConfigDict(
3752
+ populate_by_name=True,
3753
+ )
3754
+ profile: str | None = None
3755
+ region: str | None = None
3756
+ type: Annotated[Literal["bedrock"], Field(title="BedrockProviderSettingsType")]
3757
+
3758
+
3759
+ class GcpProviderSettings(BaseModel):
3760
+ model_config = ConfigDict(
3761
+ populate_by_name=True,
3762
+ )
3763
+ credential_file: Annotated[
3764
+ str | None,
3765
+ Field(
3766
+ alias="credentialFile",
3767
+ description="Path on the app-server host, without credential-file contents.",
3768
+ ),
3769
+ ] = None
3770
+ location: str | None = None
3771
+ project_id: Annotated[str | None, Field(alias="projectId")] = None
3772
+ type: Annotated[Literal["gcp"], Field(title="GcpProviderSettingsType")]
3773
+
3774
+
3775
+ class ProviderSettings(
3776
+ RootModel[
3777
+ OpenaiProviderSettings
3778
+ | CustomGatewayProviderSettings
3779
+ | BedrockProviderSettings
3780
+ | GcpProviderSettings
3781
+ ]
3782
+ ):
3783
+ root: (
3784
+ OpenaiProviderSettings
3785
+ | CustomGatewayProviderSettings
3786
+ | BedrockProviderSettings
3787
+ | GcpProviderSettings
3788
+ )
3789
+
3790
+
3791
+ class CustomGatewayProviderSettingsPatch(BaseModel):
3792
+ model_config = ConfigDict(
3793
+ extra="forbid",
3794
+ populate_by_name=True,
3795
+ )
3796
+ base_url: Annotated[str | None, Field(alias="baseUrl")] = None
3797
+ env_key: Annotated[str | None, Field(alias="envKey")] = None
3798
+ name: str | None = None
3799
+ provider_id: Annotated[
3800
+ str | None,
3801
+ Field(
3802
+ alias="providerId",
3803
+ description="Omit or pass null to allocate a new custom provider ID.",
3804
+ ),
3805
+ ] = None
3806
+ type: Annotated[Literal["customGateway"], Field(title="CustomGatewayProviderSettingsPatchType")]
3807
+
3808
+
3809
+ class BedrockProviderSettingsPatch(BaseModel):
3810
+ model_config = ConfigDict(
3811
+ extra="forbid",
3812
+ populate_by_name=True,
3813
+ )
3814
+ profile: str | None = None
3815
+ provider_id: Annotated[BedrockProviderId, Field(alias="providerId")]
3816
+ region: str | None = None
3817
+ type: Annotated[Literal["bedrock"], Field(title="BedrockProviderSettingsPatchType")]
3818
+
3819
+
3820
+ class GcpProviderSettingsPatch(BaseModel):
3821
+ model_config = ConfigDict(
3822
+ extra="forbid",
3823
+ populate_by_name=True,
3824
+ )
3825
+ credential_file: Annotated[str | None, Field(alias="credentialFile")] = None
3826
+ location: str | None = None
3827
+ project_id: Annotated[str | None, Field(alias="projectId")] = None
3828
+ provider_id: Annotated[GcpProviderId, Field(alias="providerId")]
3829
+ type: Annotated[Literal["gcp"], Field(title="GcpProviderSettingsPatchType")]
3830
+
3831
+
3832
+ class ProviderSettingsPatch(
3833
+ RootModel[
3834
+ CustomGatewayProviderSettingsPatch | BedrockProviderSettingsPatch | GcpProviderSettingsPatch
3835
+ ]
3836
+ ):
3837
+ root: Annotated[
3838
+ CustomGatewayProviderSettingsPatch
3839
+ | BedrockProviderSettingsPatch
3840
+ | GcpProviderSettingsPatch,
3841
+ Field(
3842
+ description="Omitted patch fields preserve their values. Explicit null clears a nullable field."
3843
+ ),
3844
+ ]
3845
+
3846
+
3689
3847
  class RateLimitReachedType(Enum):
3690
3848
  rate_limit_reached = "rate_limit_reached"
3691
3849
  workspace_owner_credits_depleted = "workspace_owner_credits_depleted"
@@ -5801,6 +5959,12 @@ class ContextCompactionThreadItem(BaseModel):
5801
5959
  type: Annotated[Literal["contextCompaction"], Field(title="ContextCompactionThreadItemType")]
5802
5960
 
5803
5961
 
5962
+ class ThreadItemOutputDeferral(BaseModel):
5963
+ model_config = ConfigDict(
5964
+ populate_by_name=True,
5965
+ )
5966
+
5967
+
5804
5968
  class ItemThreadItemsListAnchor(BaseModel):
5805
5969
  model_config = ConfigDict(
5806
5970
  populate_by_name=True,
@@ -5833,6 +5997,13 @@ class ThreadItemsListParams(BaseModel):
5833
5997
  description="Opaque continuation cursor or an exclusive item anchor in the requested visible turn. An item anchor requires a non-empty `turnId`; ascending (the default) returns items after it, and descending returns items before it. Continue with the returned string cursor."
5834
5998
  ),
5835
5999
  ] = None
6000
+ defer_output: Annotated[
6001
+ ThreadItemOutputDeferral | None,
6002
+ Field(
6003
+ alias="deferOutput",
6004
+ description="For a single turn, choose which saved outputs to fetch separately by item ID.",
6005
+ ),
6006
+ ] = None
5836
6007
  limit: Annotated[int | None, Field(description="Optional item page size.", ge=0)] = None
5837
6008
  sort_direction: Annotated[
5838
6009
  SortDirection | None,
@@ -6923,6 +7094,11 @@ class WebSearchMode(Enum):
6923
7094
  live = "live"
6924
7095
 
6925
7096
 
7097
+ class WebSearchProvider(Enum):
7098
+ standalone = "standalone"
7099
+ search_mcp = "search_mcp"
7100
+
7101
+
6926
7102
  class WebSearchToolConfig(BaseModel):
6927
7103
  model_config = ConfigDict(
6928
7104
  extra="forbid",
@@ -7800,6 +7976,15 @@ class AccountGatewayOAuthCancelRequest(BaseModel):
7800
7976
  params: Annotated[None, Field(None)] = None
7801
7977
 
7802
7978
 
7979
+ class ModelProviderListRequest(BaseModel):
7980
+ model_config = ConfigDict(
7981
+ populate_by_name=True,
7982
+ )
7983
+ id: RequestId
7984
+ method: Annotated[Literal["modelProvider/list"], Field(title="ModelProvider/listRequestMethod")]
7985
+ params: ModelProviderListParams
7986
+
7987
+
7803
7988
  class ModelProviderCapabilitiesReadRequest(BaseModel):
7804
7989
  model_config = ConfigDict(
7805
7990
  populate_by_name=True,
@@ -9025,6 +9210,13 @@ class McpResourceReadParams(BaseModel):
9025
9210
  model_config = ConfigDict(
9026
9211
  populate_by_name=True,
9027
9212
  )
9213
+ field_meta: Annotated[
9214
+ dict[str, Any] | None,
9215
+ Field(
9216
+ alias="_meta",
9217
+ description="Additional MCP request metadata. Account and turn routing keys are reserved.",
9218
+ ),
9219
+ ] = None
9028
9220
  connector_id: Annotated[str | None, Field(alias="connectorId")] = None
9029
9221
  origin_call_id: Annotated[
9030
9222
  str | None,
@@ -9234,6 +9426,37 @@ class ModelListResponse(BaseModel):
9234
9426
  ] = None
9235
9427
 
9236
9428
 
9429
+ class ModelProviderConfigWriteParams(BaseModel):
9430
+ model_config = ConfigDict(
9431
+ extra="forbid",
9432
+ populate_by_name=True,
9433
+ )
9434
+ settings: ProviderSettingsPatch
9435
+
9436
+
9437
+ class ModelProviderSummary(BaseModel):
9438
+ model_config = ConfigDict(
9439
+ populate_by_name=True,
9440
+ )
9441
+ base_url: Annotated[
9442
+ str | None,
9443
+ Field(
9444
+ alias="baseUrl",
9445
+ description="Null when the endpoint is absent or cannot be safely displayed.",
9446
+ ),
9447
+ ] = None
9448
+ can_edit: Annotated[
9449
+ bool,
9450
+ Field(
9451
+ alias="canEdit",
9452
+ description="Whether a supported configuration field can be edited in the active user layer.",
9453
+ ),
9454
+ ]
9455
+ id: str
9456
+ name: str
9457
+ settings: ProviderSettings
9458
+
9459
+
9237
9460
  class NewThreadModelDefaults(BaseModel):
9238
9461
  model_config = ConfigDict(
9239
9462
  populate_by_name=True,
@@ -10659,6 +10882,13 @@ class ThreadListParams(BaseModel):
10659
10882
  description="Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned."
10660
10883
  ),
10661
10884
  ] = None
10885
+ current_account_only: Annotated[
10886
+ bool | None,
10887
+ Field(
10888
+ alias="currentAccountOnly",
10889
+ description="Show local history visible to the current ChatGPT account. Defaults to false.",
10890
+ ),
10891
+ ] = None
10662
10892
  cursor: Annotated[
10663
10893
  str | None, Field(description="Opaque pagination cursor returned by a previous call.")
10664
10894
  ] = None
@@ -11284,6 +11514,18 @@ class ReviewStartRequest(BaseModel):
11284
11514
  params: ReviewStartParams
11285
11515
 
11286
11516
 
11517
+ class ModelProviderConfigWriteRequest(BaseModel):
11518
+ model_config = ConfigDict(
11519
+ populate_by_name=True,
11520
+ )
11521
+ id: RequestId
11522
+ method: Annotated[
11523
+ Literal["modelProvider/config/write"],
11524
+ Field(title="ModelProvider/config/writeRequestMethod"),
11525
+ ]
11526
+ params: ModelProviderConfigWriteParams
11527
+
11528
+
11287
11529
  class McpServerStatusListRequest(BaseModel):
11288
11530
  model_config = ConfigDict(
11289
11531
  populate_by_name=True,
@@ -11378,6 +11620,12 @@ class Config(BaseModel):
11378
11620
  ),
11379
11621
  ] = None
11380
11622
  browser_use: BrowserUseConfig | None = None
11623
+ client_search_provider: Annotated[
11624
+ WebSearchProvider | None,
11625
+ Field(
11626
+ description="Effective tools.client_search_provider hint. Model-selected providers take precedence."
11627
+ ),
11628
+ ] = None
11381
11629
  compact_prompt: str | None = None
11382
11630
  computer_use: ComputerUseConfig | None = None
11383
11631
  desktop: dict[str, Any] | None = None
@@ -11649,6 +11897,22 @@ class ListMcpServerStatusResponse(BaseModel):
11649
11897
  ] = None
11650
11898
 
11651
11899
 
11900
+ class ModelProviderConfigWriteResponse(BaseModel):
11901
+ model_config = ConfigDict(
11902
+ populate_by_name=True,
11903
+ )
11904
+ provider: ModelProviderSummary
11905
+
11906
+
11907
+ class ModelProviderListResponse(BaseModel):
11908
+ model_config = ConfigDict(
11909
+ populate_by_name=True,
11910
+ )
11911
+ can_change_default: Annotated[bool, Field(alias="canChangeDefault")]
11912
+ data: list[ModelProviderSummary]
11913
+ default_provider_id: Annotated[str, Field(alias="defaultProviderId")]
11914
+
11915
+
11652
11916
  class ModelsRequirements(BaseModel):
11653
11917
  model_config = ConfigDict(
11654
11918
  populate_by_name=True,
@@ -12560,6 +12824,14 @@ class ItemCompletedNotification(BaseModel):
12560
12824
  description="Unix timestamp (in milliseconds) when this item lifecycle completed.",
12561
12825
  ),
12562
12826
  ]
12827
+ content_token_count: Annotated[
12828
+ int | None,
12829
+ Field(
12830
+ alias="contentTokenCount",
12831
+ description="Native content tokens for the completed assistant message, including a sampled footer. Null when unavailable. Completion telemetry is not part of the stored thread item.",
12832
+ ge=0,
12833
+ ),
12834
+ ] = None
12563
12835
  item: ThreadItem
12564
12836
  thread_id: Annotated[str, Field(alias="threadId")]
12565
12837
  turn_id: Annotated[str, Field(alias="turnId")]
@@ -13354,6 +13626,8 @@ class ClientRequest(
13354
13626
  | AccountGatewayOAuthReadRequest
13355
13627
  | AccountGatewayOAuthLoginRequest
13356
13628
  | AccountGatewayOAuthCancelRequest
13629
+ | ModelProviderListRequest
13630
+ | ModelProviderConfigWriteRequest
13357
13631
  | ModelProviderCapabilitiesReadRequest
13358
13632
  | ExperimentalFeatureListRequest
13359
13633
  | PermissionProfileListRequest
@@ -13463,6 +13737,8 @@ class ClientRequest(
13463
13737
  | AccountGatewayOAuthReadRequest
13464
13738
  | AccountGatewayOAuthLoginRequest
13465
13739
  | AccountGatewayOAuthCancelRequest
13740
+ | ModelProviderListRequest
13741
+ | ModelProviderConfigWriteRequest
13466
13742
  | ModelProviderCapabilitiesReadRequest
13467
13743
  | ExperimentalFeatureListRequest
13468
13744
  | PermissionProfileListRequest
File without changes