openai-codex 0.167.2__tar.gz → 0.169.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.169.0}/PKG-INFO +2 -2
  2. {openai_codex-0.167.2 → openai_codex-0.169.0}/pyproject.toml +3 -3
  3. {openai_codex-0.167.2 → openai_codex-0.169.0}/pyproject.toml.orig +3 -3
  4. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/generated/v2_all.py +432 -4
  5. {openai_codex-0.167.2 → openai_codex-0.169.0}/README.md +0 -0
  6. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/__init__.py +0 -0
  7. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/_approval_mode.py +0 -0
  8. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/_goal.py +0 -0
  9. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/_initialize_metadata.py +0 -0
  10. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/_inputs.py +0 -0
  11. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/_login.py +0 -0
  12. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/_message_router.py +0 -0
  13. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/_run.py +0 -0
  14. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/_runtime_requirements.py +0 -0
  15. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/_sandbox.py +0 -0
  16. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/_version.py +0 -0
  17. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/api.py +0 -0
  18. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/async_client.py +0 -0
  19. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/client.py +0 -0
  20. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/errors.py +0 -0
  21. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/generated/__init__.py +0 -0
  22. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/generated/notification_registry.py +0 -0
  23. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/models.py +0 -0
  24. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/py.typed +0 -0
  25. {openai_codex-0.167.2 → openai_codex-0.169.0}/src/openai_codex/retry.py +0 -0
  26. {openai_codex-0.167.2 → openai_codex-0.169.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.169.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.169.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.169.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.169.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.169.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.169.0"]
20
20
 
21
21
  [project.urls]
22
22
  Homepage = "https://github.com/openai/codex"
@@ -52,6 +52,25 @@ class AccountRoutingOverride(Enum):
52
52
  us_cr = "us_cr"
53
53
 
54
54
 
55
+ class AccountSecuritySetupAction(BaseModel):
56
+ model_config = ConfigDict(
57
+ populate_by_name=True,
58
+ )
59
+ label: str
60
+ url: str
61
+
62
+
63
+ class AccountSecuritySetupNotice(BaseModel):
64
+ model_config = ConfigDict(
65
+ populate_by_name=True,
66
+ )
67
+ account_id: Annotated[str, Field(alias="accountId")]
68
+ action: AccountSecuritySetupAction
69
+ description: str
70
+ title: str
71
+ user_id: Annotated[str, Field(alias="userId")]
72
+
73
+
55
74
  class AccountSessionWorkspaceKind(Enum):
56
75
  personal = "personal"
57
76
  workspace = "workspace"
@@ -130,6 +149,18 @@ class AgentMessageDeltaNotification(BaseModel):
130
149
  turn_id: Annotated[str, Field(alias="turnId")]
131
150
 
132
151
 
152
+ class AgentMessageDisplay(BaseModel):
153
+ model_config = ConfigDict(
154
+ populate_by_name=True,
155
+ )
156
+ action: Annotated[
157
+ str, Field(description="Unknown actions must be left for the producing client to handle.")
158
+ ]
159
+ block_type: Annotated[str | None, Field(alias="blockType")] = None
160
+ check_trusted_contacts: Annotated[bool | None, Field(alias="checkTrustedContacts")] = None
161
+ cyber_trusted_access: Annotated[bool | None, Field(alias="cyberTrustedAccess")] = None
162
+
163
+
133
164
  class InputTextAgentMessageInputContent(BaseModel):
134
165
  model_config = ConfigDict(
135
166
  populate_by_name=True,
@@ -154,6 +185,14 @@ class AgentMessageInputContent(
154
185
  root: InputTextAgentMessageInputContent | EncryptedContentAgentMessageInputContent
155
186
 
156
187
 
188
+ class AgentMessageModeration(BaseModel):
189
+ model_config = ConfigDict(
190
+ populate_by_name=True,
191
+ )
192
+ display: AgentMessageDisplay | None = None
193
+ moderated: bool
194
+
195
+
157
196
  class AgentPath(RootModel[str]):
158
197
  root: str
159
198
 
@@ -426,6 +465,11 @@ class AutoReviewRequirements(BaseModel):
426
465
  required_on_models: Annotated[list[str] | None, Field(alias="requiredOnModels")] = None
427
466
 
428
467
 
468
+ class BedrockProviderId(Enum):
469
+ amazon_bedrock = "amazon-bedrock"
470
+ amazon_bedrock_runtime = "amazon-bedrock-runtime"
471
+
472
+
429
473
  class BrowserUseAccessApprovalLifetime(Enum):
430
474
  turn = "turn"
431
475
  thread = "thread"
@@ -1737,10 +1781,20 @@ class InputAudioFunctionCallOutputContentItem(BaseModel):
1737
1781
  model_config = ConfigDict(
1738
1782
  populate_by_name=True,
1739
1783
  )
1784
+ type: Annotated[
1785
+ Literal["input_audio"], Field(title="InputAudioFunctionCallOutputContentItemType")
1786
+ ]
1740
1787
  audio_url: str
1788
+
1789
+
1790
+ class FileIdFunctionCallOutputContentItem1(BaseModel):
1791
+ model_config = ConfigDict(
1792
+ populate_by_name=True,
1793
+ )
1741
1794
  type: Annotated[
1742
1795
  Literal["input_audio"], Field(title="InputAudioFunctionCallOutputContentItemType")
1743
1796
  ]
1797
+ file_id: str
1744
1798
 
1745
1799
 
1746
1800
  class EncryptedContentFunctionCallOutputContentItem(BaseModel):
@@ -1800,16 +1854,77 @@ class FuzzyFileSearchSessionUpdatedNotification(BaseModel):
1800
1854
  session_id: Annotated[str, Field(alias="sessionId")]
1801
1855
 
1802
1856
 
1857
+ class NoneGatewayAuth(BaseModel):
1858
+ model_config = ConfigDict(
1859
+ populate_by_name=True,
1860
+ )
1861
+ mode: Annotated[Literal["none"], Field(title="NoneGatewayAuthMode")]
1862
+
1863
+
1864
+ class EnvironmentVariableGatewayAuth(BaseModel):
1865
+ model_config = ConfigDict(
1866
+ populate_by_name=True,
1867
+ )
1868
+ env_key: Annotated[str, Field(alias="envKey")]
1869
+ mode: Annotated[
1870
+ Literal["environmentVariable"], Field(title="EnvironmentVariableGatewayAuthMode")
1871
+ ]
1872
+
1873
+
1874
+ class ExternallyConfiguredGatewayAuth(BaseModel):
1875
+ model_config = ConfigDict(
1876
+ populate_by_name=True,
1877
+ )
1878
+ env_key: Annotated[str | None, Field(alias="envKey")] = None
1879
+ mode: Annotated[Literal["externallyConfigured"], Field(title="ModeGatewayAuthMode")]
1880
+
1881
+
1882
+ class GatewayAuth(
1883
+ RootModel[NoneGatewayAuth | EnvironmentVariableGatewayAuth | ExternallyConfiguredGatewayAuth]
1884
+ ):
1885
+ root: NoneGatewayAuth | EnvironmentVariableGatewayAuth | ExternallyConfiguredGatewayAuth
1886
+
1887
+
1803
1888
  class GatewayOAuthCancelResponse(BaseModel):
1804
1889
  model_config = ConfigDict(
1805
1890
  populate_by_name=True,
1806
1891
  )
1807
1892
 
1808
1893
 
1809
- class GatewayOAuthLoginResponse(BaseModel):
1894
+ class GatewayOAuthLoginParams(BaseModel):
1895
+ model_config = ConfigDict(
1896
+ populate_by_name=True,
1897
+ )
1898
+ device_auth: Annotated[
1899
+ bool | None,
1900
+ Field(
1901
+ alias="deviceAuth",
1902
+ description="Select device authorization when the server advertises support for it.",
1903
+ ),
1904
+ ] = None
1905
+ model_provider: Annotated[
1906
+ str | None,
1907
+ Field(alias="modelProvider", description="Defaults to the current provider when omitted."),
1908
+ ] = None
1909
+
1910
+
1911
+ class GatewayOAuthPrompt(BaseModel):
1810
1912
  model_config = ConfigDict(
1811
1913
  populate_by_name=True,
1812
1914
  )
1915
+ login_id: Annotated[str, Field(alias="loginId")]
1916
+ user_code: Annotated[str, Field(alias="userCode")]
1917
+ verification_url: Annotated[str, Field(alias="verificationUrl")]
1918
+
1919
+
1920
+ class GatewayOAuthReadParams(BaseModel):
1921
+ model_config = ConfigDict(
1922
+ populate_by_name=True,
1923
+ )
1924
+ model_provider: Annotated[
1925
+ str | None,
1926
+ Field(alias="modelProvider", description="Defaults to the current provider when omitted."),
1927
+ ] = None
1813
1928
 
1814
1929
 
1815
1930
  class GatewayOAuthStatus(Enum):
@@ -1819,6 +1934,10 @@ class GatewayOAuthStatus(Enum):
1819
1934
  failed = "failed"
1820
1935
 
1821
1936
 
1937
+ class GcpProviderId(RootModel[Literal["gcp"]]):
1938
+ root: Literal["gcp"]
1939
+
1940
+
1822
1941
  class GetAccountParams(BaseModel):
1823
1942
  model_config = ConfigDict(
1824
1943
  populate_by_name=True,
@@ -1852,6 +1971,13 @@ class GetAccountRateLimitsParams(BaseModel):
1852
1971
  ] = None
1853
1972
 
1854
1973
 
1974
+ class GetAccountSecuritySetupResponse(BaseModel):
1975
+ model_config = ConfigDict(
1976
+ populate_by_name=True,
1977
+ )
1978
+ notice: AccountSecuritySetupNotice | None = None
1979
+
1980
+
1855
1981
  class GetAccountTokenUsageParams(BaseModel):
1856
1982
  model_config = ConfigDict(
1857
1983
  populate_by_name=True,
@@ -2785,6 +2911,13 @@ class ModelListParams(BaseModel):
2785
2911
  int | None,
2786
2912
  Field(description="Optional page size; defaults to a reasonable server-side value.", ge=0),
2787
2913
  ] = None
2914
+ model_provider: Annotated[
2915
+ str | None,
2916
+ Field(
2917
+ alias="modelProvider",
2918
+ description="List models for this configured provider instead of the app-server default.",
2919
+ ),
2920
+ ] = None
2788
2921
 
2789
2922
 
2790
2923
  class ModelProviderCapabilitiesReadParams(BaseModel):
@@ -2854,6 +2987,12 @@ class ModelProviderError(
2854
2987
  ]
2855
2988
 
2856
2989
 
2990
+ class ModelProviderListParams(BaseModel):
2991
+ model_config = ConfigDict(
2992
+ populate_by_name=True,
2993
+ )
2994
+
2995
+
2857
2996
  class ModelRerouteReason(RootModel[Literal["highRiskCyberActivity"]]):
2858
2997
  root: Literal["highRiskCyberActivity"]
2859
2998
 
@@ -3033,6 +3172,14 @@ class NonSteerableTurnKind(Enum):
3033
3172
  compact = "compact"
3034
3173
 
3035
3174
 
3175
+ class NullableGatewayOAuthLoginParams(RootModel[GatewayOAuthLoginParams | None]):
3176
+ root: Annotated[GatewayOAuthLoginParams | None, Field(title="Nullable_GatewayOAuthLoginParams")]
3177
+
3178
+
3179
+ class NullableGatewayOAuthReadParams(RootModel[GatewayOAuthReadParams | None]):
3180
+ root: Annotated[GatewayOAuthReadParams | None, Field(title="Nullable_GatewayOAuthReadParams")]
3181
+
3182
+
3036
3183
  class NullableGetAccountRateLimitsParams(RootModel[GetAccountRateLimitsParams | None]):
3037
3184
  root: Annotated[
3038
3185
  GetAccountRateLimitsParams | None, Field(title="Nullable_GetAccountRateLimitsParams")
@@ -3288,7 +3435,7 @@ class PluginInterface(BaseModel):
3288
3435
  list[str] | None,
3289
3436
  Field(
3290
3437
  alias="defaultPrompt",
3291
- description="Starter prompts for the plugin. Capped at 3 entries with a maximum of 128 characters per entry.",
3438
+ description="Starter prompts for the plugin. Capped at 3 entries with a maximum of 512 characters per entry.",
3292
3439
  ),
3293
3440
  ] = None
3294
3441
  developer_name: Annotated[str | None, Field(alias="developerName")] = None
@@ -3686,6 +3833,118 @@ class ProjectSortKey(Enum):
3686
3833
  recency_at = "recencyAt"
3687
3834
 
3688
3835
 
3836
+ class OpenaiProviderSettings(BaseModel):
3837
+ model_config = ConfigDict(
3838
+ populate_by_name=True,
3839
+ )
3840
+ type: Annotated[Literal["openai"], Field(title="OpenaiProviderSettingsType")]
3841
+
3842
+
3843
+ class CustomGatewayProviderSettings(BaseModel):
3844
+ model_config = ConfigDict(
3845
+ populate_by_name=True,
3846
+ )
3847
+ auth: GatewayAuth
3848
+ type: Annotated[Literal["customGateway"], Field(title="CustomGatewayProviderSettingsType")]
3849
+
3850
+
3851
+ class BedrockProviderSettings(BaseModel):
3852
+ model_config = ConfigDict(
3853
+ populate_by_name=True,
3854
+ )
3855
+ profile: str | None = None
3856
+ region: str | None = None
3857
+ type: Annotated[Literal["bedrock"], Field(title="BedrockProviderSettingsType")]
3858
+
3859
+
3860
+ class GcpProviderSettings(BaseModel):
3861
+ model_config = ConfigDict(
3862
+ populate_by_name=True,
3863
+ )
3864
+ credential_file: Annotated[
3865
+ str | None,
3866
+ Field(
3867
+ alias="credentialFile",
3868
+ description="Path on the app-server host, without credential-file contents.",
3869
+ ),
3870
+ ] = None
3871
+ location: str | None = None
3872
+ project_id: Annotated[str | None, Field(alias="projectId")] = None
3873
+ type: Annotated[Literal["gcp"], Field(title="GcpProviderSettingsType")]
3874
+
3875
+
3876
+ class ProviderSettings(
3877
+ RootModel[
3878
+ OpenaiProviderSettings
3879
+ | CustomGatewayProviderSettings
3880
+ | BedrockProviderSettings
3881
+ | GcpProviderSettings
3882
+ ]
3883
+ ):
3884
+ root: (
3885
+ OpenaiProviderSettings
3886
+ | CustomGatewayProviderSettings
3887
+ | BedrockProviderSettings
3888
+ | GcpProviderSettings
3889
+ )
3890
+
3891
+
3892
+ class CustomGatewayProviderSettingsPatch(BaseModel):
3893
+ model_config = ConfigDict(
3894
+ extra="forbid",
3895
+ populate_by_name=True,
3896
+ )
3897
+ base_url: Annotated[str | None, Field(alias="baseUrl")] = None
3898
+ env_key: Annotated[str | None, Field(alias="envKey")] = None
3899
+ name: str | None = None
3900
+ provider_id: Annotated[
3901
+ str | None,
3902
+ Field(
3903
+ alias="providerId",
3904
+ description="Omit or pass null to allocate a new custom provider ID.",
3905
+ ),
3906
+ ] = None
3907
+ type: Annotated[Literal["customGateway"], Field(title="CustomGatewayProviderSettingsPatchType")]
3908
+
3909
+
3910
+ class BedrockProviderSettingsPatch(BaseModel):
3911
+ model_config = ConfigDict(
3912
+ extra="forbid",
3913
+ populate_by_name=True,
3914
+ )
3915
+ profile: str | None = None
3916
+ provider_id: Annotated[BedrockProviderId, Field(alias="providerId")]
3917
+ region: str | None = None
3918
+ type: Annotated[Literal["bedrock"], Field(title="BedrockProviderSettingsPatchType")]
3919
+
3920
+
3921
+ class GcpProviderSettingsPatch(BaseModel):
3922
+ model_config = ConfigDict(
3923
+ extra="forbid",
3924
+ populate_by_name=True,
3925
+ )
3926
+ credential_file: Annotated[str | None, Field(alias="credentialFile")] = None
3927
+ location: str | None = None
3928
+ project_id: Annotated[str | None, Field(alias="projectId")] = None
3929
+ provider_id: Annotated[GcpProviderId, Field(alias="providerId")]
3930
+ type: Annotated[Literal["gcp"], Field(title="GcpProviderSettingsPatchType")]
3931
+
3932
+
3933
+ class ProviderSettingsPatch(
3934
+ RootModel[
3935
+ CustomGatewayProviderSettingsPatch | BedrockProviderSettingsPatch | GcpProviderSettingsPatch
3936
+ ]
3937
+ ):
3938
+ root: Annotated[
3939
+ CustomGatewayProviderSettingsPatch
3940
+ | BedrockProviderSettingsPatch
3941
+ | GcpProviderSettingsPatch,
3942
+ Field(
3943
+ description="Omitted patch fields preserve their values. Explicit null clears a nullable field."
3944
+ ),
3945
+ ]
3946
+
3947
+
3689
3948
  class RateLimitReachedType(Enum):
3690
3949
  rate_limit_reached = "rate_limit_reached"
3691
3950
  workspace_owner_credits_depleted = "workspace_owner_credits_depleted"
@@ -5801,6 +6060,12 @@ class ContextCompactionThreadItem(BaseModel):
5801
6060
  type: Annotated[Literal["contextCompaction"], Field(title="ContextCompactionThreadItemType")]
5802
6061
 
5803
6062
 
6063
+ class ThreadItemOutputDeferral(BaseModel):
6064
+ model_config = ConfigDict(
6065
+ populate_by_name=True,
6066
+ )
6067
+
6068
+
5804
6069
  class ItemThreadItemsListAnchor(BaseModel):
5805
6070
  model_config = ConfigDict(
5806
6071
  populate_by_name=True,
@@ -5833,6 +6098,13 @@ class ThreadItemsListParams(BaseModel):
5833
6098
  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
6099
  ),
5835
6100
  ] = None
6101
+ defer_output: Annotated[
6102
+ ThreadItemOutputDeferral | None,
6103
+ Field(
6104
+ alias="deferOutput",
6105
+ description="For a single turn, choose which saved outputs to fetch separately by item ID.",
6106
+ ),
6107
+ ] = None
5836
6108
  limit: Annotated[int | None, Field(description="Optional item page size.", ge=0)] = None
5837
6109
  sort_direction: Annotated[
5838
6110
  SortDirection | None,
@@ -6923,6 +7195,11 @@ class WebSearchMode(Enum):
6923
7195
  live = "live"
6924
7196
 
6925
7197
 
7198
+ class WebSearchProvider(Enum):
7199
+ standalone = "standalone"
7200
+ search_mcp = "search_mcp"
7201
+
7202
+
6926
7203
  class WebSearchToolConfig(BaseModel):
6927
7204
  model_config = ConfigDict(
6928
7205
  extra="forbid",
@@ -7773,7 +8050,7 @@ class AccountGatewayOAuthReadRequest(BaseModel):
7773
8050
  method: Annotated[
7774
8051
  Literal["account/gatewayOAuth/read"], Field(title="Account/gatewayOAuth/readRequestMethod")
7775
8052
  ]
7776
- params: Annotated[None, Field(None)] = None
8053
+ params: GatewayOAuthReadParams | None = None
7777
8054
 
7778
8055
 
7779
8056
  class AccountGatewayOAuthLoginRequest(BaseModel):
@@ -7785,7 +8062,7 @@ class AccountGatewayOAuthLoginRequest(BaseModel):
7785
8062
  Literal["account/gatewayOAuth/login"],
7786
8063
  Field(title="Account/gatewayOAuth/loginRequestMethod"),
7787
8064
  ]
7788
- params: Annotated[None, Field(None)] = None
8065
+ params: GatewayOAuthLoginParams | None = None
7789
8066
 
7790
8067
 
7791
8068
  class AccountGatewayOAuthCancelRequest(BaseModel):
@@ -7800,6 +8077,15 @@ class AccountGatewayOAuthCancelRequest(BaseModel):
7800
8077
  params: Annotated[None, Field(None)] = None
7801
8078
 
7802
8079
 
8080
+ class ModelProviderListRequest(BaseModel):
8081
+ model_config = ConfigDict(
8082
+ populate_by_name=True,
8083
+ )
8084
+ id: RequestId
8085
+ method: Annotated[Literal["modelProvider/list"], Field(title="ModelProvider/listRequestMethod")]
8086
+ params: ModelProviderListParams
8087
+
8088
+
7803
8089
  class ModelProviderCapabilitiesReadRequest(BaseModel):
7804
8090
  model_config = ConfigDict(
7805
8091
  populate_by_name=True,
@@ -7921,6 +8207,18 @@ class AccountLogoutRequest(BaseModel):
7921
8207
  params: Annotated[None, Field(None)] = None
7922
8208
 
7923
8209
 
8210
+ class AccountSecuritySetupReadRequest(BaseModel):
8211
+ model_config = ConfigDict(
8212
+ populate_by_name=True,
8213
+ )
8214
+ id: RequestId
8215
+ method: Annotated[
8216
+ Literal["account/securitySetup/read"],
8217
+ Field(title="Account/securitySetup/readRequestMethod"),
8218
+ ]
8219
+ params: Annotated[None, Field(None)] = None
8220
+
8221
+
7924
8222
  class AccountRateLimitsReadRequest(BaseModel):
7925
8223
  model_config = ConfigDict(
7926
8224
  populate_by_name=True,
@@ -8088,6 +8386,7 @@ class ActiveTurnNotSteerableCodexErrorInfo(BaseModel):
8088
8386
  class CodexErrorInfo(
8089
8387
  RootModel[
8090
8388
  CodexErrorInfoValue
8389
+ | Literal["inferenceHookDenied"]
8091
8390
  | HttpConnectionFailedCodexErrorInfo
8092
8391
  | ResponseStreamConnectionFailedCodexErrorInfo
8093
8392
  | ResponseStreamDisconnectedCodexErrorInfo
@@ -8098,6 +8397,7 @@ class CodexErrorInfo(
8098
8397
  ):
8099
8398
  root: Annotated[
8100
8399
  CodexErrorInfoValue
8400
+ | Literal["inferenceHookDenied"]
8101
8401
  | HttpConnectionFailedCodexErrorInfo
8102
8402
  | ResponseStreamConnectionFailedCodexErrorInfo
8103
8403
  | ResponseStreamDisconnectedCodexErrorInfo
@@ -8640,6 +8940,7 @@ class FunctionCallOutputContentItem(
8640
8940
  | InputImageFunctionCallOutputContentItem
8641
8941
  | FileIdFunctionCallOutputContentItem
8642
8942
  | InputAudioFunctionCallOutputContentItem
8943
+ | FileIdFunctionCallOutputContentItem1
8643
8944
  | EncryptedContentFunctionCallOutputContentItem
8644
8945
  ]
8645
8946
  ):
@@ -8648,6 +8949,7 @@ class FunctionCallOutputContentItem(
8648
8949
  | InputImageFunctionCallOutputContentItem
8649
8950
  | FileIdFunctionCallOutputContentItem
8650
8951
  | InputAudioFunctionCallOutputContentItem
8952
+ | FileIdFunctionCallOutputContentItem1
8651
8953
  | EncryptedContentFunctionCallOutputContentItem,
8652
8954
  Field(
8653
8955
  description="Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs."
@@ -8667,10 +8969,21 @@ class GatewayOAuthChangedNotification(BaseModel):
8667
8969
  ),
8668
8970
  ] = None
8669
8971
  error: str | None = None
8972
+ login_id: Annotated[
8973
+ str | None,
8974
+ Field(alias="loginId", description="Identifies the completed device login attempt."),
8975
+ ] = None
8670
8976
  provider_id: Annotated[str, Field(alias="providerId")]
8671
8977
  status: GatewayOAuthStatus
8672
8978
 
8673
8979
 
8980
+ class GatewayOAuthLoginResponse(BaseModel):
8981
+ model_config = ConfigDict(
8982
+ populate_by_name=True,
8983
+ )
8984
+ prompt: GatewayOAuthPrompt | None = None
8985
+
8986
+
8674
8987
  class GatewayOAuthReadResponse(BaseModel):
8675
8988
  model_config = ConfigDict(
8676
8989
  populate_by_name=True,
@@ -8688,6 +9001,13 @@ class GatewayOAuthReadResponse(BaseModel):
8688
9001
  GatewayOAuthStatus | None,
8689
9002
  Field(description="Null when the effective provider does not use gateway OAuth."),
8690
9003
  ] = None
9004
+ supports_device_auth: Annotated[
9005
+ bool | None,
9006
+ Field(
9007
+ alias="supportsDeviceAuth",
9008
+ description="Whether the administrator configured a device authorization endpoint.",
9009
+ ),
9010
+ ] = False
8691
9011
 
8692
9012
 
8693
9013
  class GetAccountResponse(BaseModel):
@@ -8696,6 +9016,13 @@ class GetAccountResponse(BaseModel):
8696
9016
  )
8697
9017
  account: Account | None = None
8698
9018
  requires_openai_auth: Annotated[bool, Field(alias="requiresOpenaiAuth")]
9019
+ user_id: Annotated[
9020
+ str | None,
9021
+ Field(
9022
+ alias="userId",
9023
+ description="ChatGPT user ID belonging to this account response, when available.",
9024
+ ),
9025
+ ] = None
8699
9026
 
8700
9027
 
8701
9028
  class GuardianApprovalReview(BaseModel):
@@ -9025,6 +9352,13 @@ class McpResourceReadParams(BaseModel):
9025
9352
  model_config = ConfigDict(
9026
9353
  populate_by_name=True,
9027
9354
  )
9355
+ field_meta: Annotated[
9356
+ dict[str, Any] | None,
9357
+ Field(
9358
+ alias="_meta",
9359
+ description="Additional MCP request metadata. Account and turn routing keys are reserved.",
9360
+ ),
9361
+ ] = None
9028
9362
  connector_id: Annotated[str | None, Field(alias="connectorId")] = None
9029
9363
  origin_call_id: Annotated[
9030
9364
  str | None,
@@ -9234,6 +9568,37 @@ class ModelListResponse(BaseModel):
9234
9568
  ] = None
9235
9569
 
9236
9570
 
9571
+ class ModelProviderConfigWriteParams(BaseModel):
9572
+ model_config = ConfigDict(
9573
+ extra="forbid",
9574
+ populate_by_name=True,
9575
+ )
9576
+ settings: ProviderSettingsPatch
9577
+
9578
+
9579
+ class ModelProviderSummary(BaseModel):
9580
+ model_config = ConfigDict(
9581
+ populate_by_name=True,
9582
+ )
9583
+ base_url: Annotated[
9584
+ str | None,
9585
+ Field(
9586
+ alias="baseUrl",
9587
+ description="Null when the endpoint is absent or cannot be safely displayed.",
9588
+ ),
9589
+ ] = None
9590
+ can_edit: Annotated[
9591
+ bool,
9592
+ Field(
9593
+ alias="canEdit",
9594
+ description="Whether a supported configuration field can be edited in the active user layer.",
9595
+ ),
9596
+ ]
9597
+ id: str
9598
+ name: str
9599
+ settings: ProviderSettings
9600
+
9601
+
9237
9602
  class NewThreadModelDefaults(BaseModel):
9238
9603
  model_config = ConfigDict(
9239
9604
  populate_by_name=True,
@@ -9419,6 +9784,13 @@ class QueuedSubmission(BaseModel):
9419
9784
  client_user_message_id: Annotated[str, Field(alias="clientUserMessageId")]
9420
9785
  id: str
9421
9786
  input: list[UserInput]
9787
+ responsesapi_client_metadata: Annotated[
9788
+ dict[str, Any] | None,
9789
+ Field(
9790
+ alias="responsesapiClientMetadata",
9791
+ description="Metadata retained with this input, including across reconnect and restoration.",
9792
+ ),
9793
+ ] = None
9422
9794
 
9423
9795
 
9424
9796
  class RateLimitResetCredit(BaseModel):
@@ -10450,6 +10822,7 @@ class AgentMessageThreadItem(BaseModel):
10450
10822
  delivery: AgentMessageDelivery | None = None
10451
10823
  id: str
10452
10824
  memory_citation: Annotated[MemoryCitation | None, Field(alias="memoryCitation")] = None
10825
+ moderation: AgentMessageModeration | None = None
10453
10826
  phase: MessagePhase | None = None
10454
10827
  questions: list[AsyncUserInputQuestion] | None = None
10455
10828
  started_at_ms: Annotated[
@@ -10659,6 +11032,13 @@ class ThreadListParams(BaseModel):
10659
11032
  description="Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned."
10660
11033
  ),
10661
11034
  ] = None
11035
+ current_account_only: Annotated[
11036
+ bool | None,
11037
+ Field(
11038
+ alias="currentAccountOnly",
11039
+ description="Show local history visible to the current ChatGPT account. Defaults to false.",
11040
+ ),
11041
+ ] = None
10662
11042
  cursor: Annotated[
10663
11043
  str | None, Field(description="Opaque pagination cursor returned by a previous call.")
10664
11044
  ] = None
@@ -11284,6 +11664,18 @@ class ReviewStartRequest(BaseModel):
11284
11664
  params: ReviewStartParams
11285
11665
 
11286
11666
 
11667
+ class ModelProviderConfigWriteRequest(BaseModel):
11668
+ model_config = ConfigDict(
11669
+ populate_by_name=True,
11670
+ )
11671
+ id: RequestId
11672
+ method: Annotated[
11673
+ Literal["modelProvider/config/write"],
11674
+ Field(title="ModelProvider/config/writeRequestMethod"),
11675
+ ]
11676
+ params: ModelProviderConfigWriteParams
11677
+
11678
+
11287
11679
  class McpServerStatusListRequest(BaseModel):
11288
11680
  model_config = ConfigDict(
11289
11681
  populate_by_name=True,
@@ -11378,6 +11770,12 @@ class Config(BaseModel):
11378
11770
  ),
11379
11771
  ] = None
11380
11772
  browser_use: BrowserUseConfig | None = None
11773
+ client_search_provider: Annotated[
11774
+ WebSearchProvider | None,
11775
+ Field(
11776
+ description="Effective tools.client_search_provider hint. Model-selected providers take precedence."
11777
+ ),
11778
+ ] = None
11381
11779
  compact_prompt: str | None = None
11382
11780
  computer_use: ComputerUseConfig | None = None
11383
11781
  desktop: dict[str, Any] | None = None
@@ -11649,6 +12047,22 @@ class ListMcpServerStatusResponse(BaseModel):
11649
12047
  ] = None
11650
12048
 
11651
12049
 
12050
+ class ModelProviderConfigWriteResponse(BaseModel):
12051
+ model_config = ConfigDict(
12052
+ populate_by_name=True,
12053
+ )
12054
+ provider: ModelProviderSummary
12055
+
12056
+
12057
+ class ModelProviderListResponse(BaseModel):
12058
+ model_config = ConfigDict(
12059
+ populate_by_name=True,
12060
+ )
12061
+ can_change_default: Annotated[bool, Field(alias="canChangeDefault")]
12062
+ data: list[ModelProviderSummary]
12063
+ default_provider_id: Annotated[str, Field(alias="defaultProviderId")]
12064
+
12065
+
11652
12066
  class ModelsRequirements(BaseModel):
11653
12067
  model_config = ConfigDict(
11654
12068
  populate_by_name=True,
@@ -12560,6 +12974,14 @@ class ItemCompletedNotification(BaseModel):
12560
12974
  description="Unix timestamp (in milliseconds) when this item lifecycle completed.",
12561
12975
  ),
12562
12976
  ]
12977
+ content_token_count: Annotated[
12978
+ int | None,
12979
+ Field(
12980
+ alias="contentTokenCount",
12981
+ 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.",
12982
+ ge=0,
12983
+ ),
12984
+ ] = None
12563
12985
  item: ThreadItem
12564
12986
  thread_id: Annotated[str, Field(alias="threadId")]
12565
12987
  turn_id: Annotated[str, Field(alias="turnId")]
@@ -13354,6 +13776,8 @@ class ClientRequest(
13354
13776
  | AccountGatewayOAuthReadRequest
13355
13777
  | AccountGatewayOAuthLoginRequest
13356
13778
  | AccountGatewayOAuthCancelRequest
13779
+ | ModelProviderListRequest
13780
+ | ModelProviderConfigWriteRequest
13357
13781
  | ModelProviderCapabilitiesReadRequest
13358
13782
  | ExperimentalFeatureListRequest
13359
13783
  | PermissionProfileListRequest
@@ -13368,6 +13792,7 @@ class ClientRequest(
13368
13792
  | AccountLoginStartRequest
13369
13793
  | AccountLoginCancelRequest
13370
13794
  | AccountLogoutRequest
13795
+ | AccountSecuritySetupReadRequest
13371
13796
  | AccountRateLimitsReadRequest
13372
13797
  | AccountRateLimitResetCreditConsumeRequest
13373
13798
  | AccountUsageReadRequest
@@ -13463,6 +13888,8 @@ class ClientRequest(
13463
13888
  | AccountGatewayOAuthReadRequest
13464
13889
  | AccountGatewayOAuthLoginRequest
13465
13890
  | AccountGatewayOAuthCancelRequest
13891
+ | ModelProviderListRequest
13892
+ | ModelProviderConfigWriteRequest
13466
13893
  | ModelProviderCapabilitiesReadRequest
13467
13894
  | ExperimentalFeatureListRequest
13468
13895
  | PermissionProfileListRequest
@@ -13477,6 +13904,7 @@ class ClientRequest(
13477
13904
  | AccountLoginStartRequest
13478
13905
  | AccountLoginCancelRequest
13479
13906
  | AccountLogoutRequest
13907
+ | AccountSecuritySetupReadRequest
13480
13908
  | AccountRateLimitsReadRequest
13481
13909
  | AccountRateLimitResetCreditConsumeRequest
13482
13910
  | AccountUsageReadRequest
File without changes