Skip to content

Commit ab60d7a

Browse files
feat(api): workload identity in audit logs, additional_tools item in responses, fix ActionSearch.query to be optional.
1 parent 09ece2e commit ab60d7a

24 files changed

Lines changed: 402 additions & 8 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 262
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-afacc4343d0efc074c8c5667eb83570642c8b9acaa7792ca8e075c6d18ef9f3a.yml
3-
openapi_spec_hash: a62a557c61532681963fd21e748b0eb4
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-2a971ccbb946726988e96654eaecceb6d9b5ad27f5793c0064b864f5686d4fc1.yml
3+
openapi_spec_hash: a712e4ee68f829570b3f5b267afa5a05
44
config_hash: bb69d8d0771dbac4a84fc6dca11e3ceb

src/openai/lib/_parsing/_responses.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def parse_response(
103103
or output.type == "web_search_call"
104104
or output.type == "tool_search_call"
105105
or output.type == "tool_search_output"
106+
or output.type == "additional_tools"
106107
or output.type == "reasoning"
107108
or output.type == "compaction"
108109
or output.type == "mcp_call"

src/openai/resources/admin/organization/audit_logs.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ def list(
9191
"tunnel.created",
9292
"tunnel.updated",
9393
"tunnel.deleted",
94+
"workload_identity_provider.created",
95+
"workload_identity_provider.updated",
96+
"workload_identity_provider.deleted",
97+
"workload_identity_provider_mapping.created",
98+
"workload_identity_provider_mapping.updated",
99+
"workload_identity_provider_mapping.deleted",
94100
"role.created",
95101
"role.updated",
96102
"role.deleted",
@@ -256,6 +262,12 @@ def list(
256262
"tunnel.created",
257263
"tunnel.updated",
258264
"tunnel.deleted",
265+
"workload_identity_provider.created",
266+
"workload_identity_provider.updated",
267+
"workload_identity_provider.deleted",
268+
"workload_identity_provider_mapping.created",
269+
"workload_identity_provider_mapping.updated",
270+
"workload_identity_provider_mapping.deleted",
259271
"role.created",
260272
"role.updated",
261273
"role.deleted",

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

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,14 @@ def create(
419419
prompt caching, which keeps cached prefixes active for longer, up to a maximum
420420
of 24 hours.
421421
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
422+
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
423+
424+
For older models that support both `in_memory` and `24h`, the default depends on
425+
your organization's data retention policy:
426+
427+
- Organizations without ZDR enabled default to `24h`.
428+
- Organizations with ZDR enabled default to `in_memory` when
429+
`prompt_cache_retention` is not specified.
422430
423431
reasoning_effort: Constrains effort on reasoning for
424432
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
@@ -735,6 +743,14 @@ def create(
735743
prompt caching, which keeps cached prefixes active for longer, up to a maximum
736744
of 24 hours.
737745
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
746+
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
747+
748+
For older models that support both `in_memory` and `24h`, the default depends on
749+
your organization's data retention policy:
750+
751+
- Organizations without ZDR enabled default to `24h`.
752+
- Organizations with ZDR enabled default to `in_memory` when
753+
`prompt_cache_retention` is not specified.
738754
739755
reasoning_effort: Constrains effort on reasoning for
740756
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
@@ -1042,6 +1058,14 @@ def create(
10421058
prompt caching, which keeps cached prefixes active for longer, up to a maximum
10431059
of 24 hours.
10441060
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
1061+
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
1062+
1063+
For older models that support both `in_memory` and `24h`, the default depends on
1064+
your organization's data retention policy:
1065+
1066+
- Organizations without ZDR enabled default to `24h`.
1067+
- Organizations with ZDR enabled default to `in_memory` when
1068+
`prompt_cache_retention` is not specified.
10451069
10461070
reasoning_effort: Constrains effort on reasoning for
10471071
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
@@ -1943,6 +1967,14 @@ async def create(
19431967
prompt caching, which keeps cached prefixes active for longer, up to a maximum
19441968
of 24 hours.
19451969
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
1970+
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
1971+
1972+
For older models that support both `in_memory` and `24h`, the default depends on
1973+
your organization's data retention policy:
1974+
1975+
- Organizations without ZDR enabled default to `24h`.
1976+
- Organizations with ZDR enabled default to `in_memory` when
1977+
`prompt_cache_retention` is not specified.
19461978
19471979
reasoning_effort: Constrains effort on reasoning for
19481980
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
@@ -2259,6 +2291,14 @@ async def create(
22592291
prompt caching, which keeps cached prefixes active for longer, up to a maximum
22602292
of 24 hours.
22612293
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
2294+
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
2295+
2296+
For older models that support both `in_memory` and `24h`, the default depends on
2297+
your organization's data retention policy:
2298+
2299+
- Organizations without ZDR enabled default to `24h`.
2300+
- Organizations with ZDR enabled default to `in_memory` when
2301+
`prompt_cache_retention` is not specified.
22622302
22632303
reasoning_effort: Constrains effort on reasoning for
22642304
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
@@ -2566,6 +2606,14 @@ async def create(
25662606
prompt caching, which keeps cached prefixes active for longer, up to a maximum
25672607
of 24 hours.
25682608
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
2609+
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
2610+
2611+
For older models that support both `in_memory` and `24h`, the default depends on
2612+
your organization's data retention policy:
2613+
2614+
- Organizations without ZDR enabled default to `24h`.
2615+
- Organizations with ZDR enabled default to `in_memory` when
2616+
`prompt_cache_retention` is not specified.
25692617
25702618
reasoning_effort: Constrains effort on reasoning for
25712619
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently

src/openai/resources/responses/input_tokens.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def count(
5151
instructions: Optional[str] | Omit = omit,
5252
model: Optional[str] | Omit = omit,
5353
parallel_tool_calls: Optional[bool] | Omit = omit,
54+
personality: Union[str, Literal["friendly", "pragmatic"]] | Omit = omit,
5455
previous_response_id: Optional[str] | Omit = omit,
5556
reasoning: Optional[Reasoning] | Omit = omit,
5657
text: Optional[input_token_count_params.Text] | Omit = omit,
@@ -91,6 +92,10 @@ def count(
9192
9293
parallel_tool_calls: Whether to allow the model to run tool calls in parallel.
9394
95+
personality: A model-owned style preset to apply to this request. Omit this parameter to use
96+
the model's default style. Supported values may expand over time. Values must be
97+
at most 64 characters.
98+
9499
previous_response_id: The unique ID of the previous response to the model. Use this to create
95100
multi-turn conversations. Learn more about
96101
[conversation state](https://platform.openai.com/docs/guides/conversation-state).
@@ -133,6 +138,7 @@ def count(
133138
"instructions": instructions,
134139
"model": model,
135140
"parallel_tool_calls": parallel_tool_calls,
141+
"personality": personality,
136142
"previous_response_id": previous_response_id,
137143
"reasoning": reasoning,
138144
"text": text,
@@ -181,6 +187,7 @@ async def count(
181187
instructions: Optional[str] | Omit = omit,
182188
model: Optional[str] | Omit = omit,
183189
parallel_tool_calls: Optional[bool] | Omit = omit,
190+
personality: Union[str, Literal["friendly", "pragmatic"]] | Omit = omit,
184191
previous_response_id: Optional[str] | Omit = omit,
185192
reasoning: Optional[Reasoning] | Omit = omit,
186193
text: Optional[input_token_count_params.Text] | Omit = omit,
@@ -221,6 +228,10 @@ async def count(
221228
222229
parallel_tool_calls: Whether to allow the model to run tool calls in parallel.
223230
231+
personality: A model-owned style preset to apply to this request. Omit this parameter to use
232+
the model's default style. Supported values may expand over time. Values must be
233+
at most 64 characters.
234+
224235
previous_response_id: The unique ID of the previous response to the model. Use this to create
225236
multi-turn conversations. Learn more about
226237
[conversation state](https://platform.openai.com/docs/guides/conversation-state).
@@ -263,6 +274,7 @@ async def count(
263274
"instructions": instructions,
264275
"model": model,
265276
"parallel_tool_calls": parallel_tool_calls,
277+
"personality": personality,
266278
"previous_response_id": previous_response_id,
267279
"reasoning": reasoning,
268280
"text": text,

src/openai/resources/responses/responses.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,14 @@ def create(
268268
prompt caching, which keeps cached prefixes active for longer, up to a maximum
269269
of 24 hours.
270270
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
271+
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
272+
273+
For older models that support both `in_memory` and `24h`, the default depends on
274+
your organization's data retention policy:
275+
276+
- Organizations without ZDR enabled default to `24h`.
277+
- Organizations with ZDR enabled default to `in_memory` when
278+
`prompt_cache_retention` is not specified.
271279
272280
reasoning: **gpt-5 and o-series models only**
273281
@@ -525,6 +533,14 @@ def create(
525533
prompt caching, which keeps cached prefixes active for longer, up to a maximum
526534
of 24 hours.
527535
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
536+
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
537+
538+
For older models that support both `in_memory` and `24h`, the default depends on
539+
your organization's data retention policy:
540+
541+
- Organizations without ZDR enabled default to `24h`.
542+
- Organizations with ZDR enabled default to `in_memory` when
543+
`prompt_cache_retention` is not specified.
528544
529545
reasoning: **gpt-5 and o-series models only**
530546
@@ -775,6 +791,14 @@ def create(
775791
prompt caching, which keeps cached prefixes active for longer, up to a maximum
776792
of 24 hours.
777793
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
794+
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
795+
796+
For older models that support both `in_memory` and `24h`, the default depends on
797+
your organization's data retention policy:
798+
799+
- Organizations without ZDR enabled default to `24h`.
800+
- Organizations with ZDR enabled default to `in_memory` when
801+
`prompt_cache_retention` is not specified.
778802
779803
reasoning: **gpt-5 and o-series models only**
780804
@@ -1974,6 +1998,14 @@ async def create(
19741998
prompt caching, which keeps cached prefixes active for longer, up to a maximum
19751999
of 24 hours.
19762000
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
2001+
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
2002+
2003+
For older models that support both `in_memory` and `24h`, the default depends on
2004+
your organization's data retention policy:
2005+
2006+
- Organizations without ZDR enabled default to `24h`.
2007+
- Organizations with ZDR enabled default to `in_memory` when
2008+
`prompt_cache_retention` is not specified.
19772009
19782010
reasoning: **gpt-5 and o-series models only**
19792011
@@ -2231,6 +2263,14 @@ async def create(
22312263
prompt caching, which keeps cached prefixes active for longer, up to a maximum
22322264
of 24 hours.
22332265
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
2266+
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
2267+
2268+
For older models that support both `in_memory` and `24h`, the default depends on
2269+
your organization's data retention policy:
2270+
2271+
- Organizations without ZDR enabled default to `24h`.
2272+
- Organizations with ZDR enabled default to `in_memory` when
2273+
`prompt_cache_retention` is not specified.
22342274
22352275
reasoning: **gpt-5 and o-series models only**
22362276
@@ -2481,6 +2521,14 @@ async def create(
24812521
prompt caching, which keeps cached prefixes active for longer, up to a maximum
24822522
of 24 hours.
24832523
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
2524+
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
2525+
2526+
For older models that support both `in_memory` and `24h`, the default depends on
2527+
your organization's data retention policy:
2528+
2529+
- Organizations without ZDR enabled default to `24h`.
2530+
- Organizations with ZDR enabled default to `in_memory` when
2531+
`prompt_cache_retention` is not specified.
24842532
24852533
reasoning: **gpt-5 and o-series models only**
24862534

src/openai/types/admin/organization/audit_log_list_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ class AuditLogListParams(TypedDict, total=False):
8181
"tunnel.created",
8282
"tunnel.updated",
8383
"tunnel.deleted",
84+
"workload_identity_provider.created",
85+
"workload_identity_provider.updated",
86+
"workload_identity_provider.deleted",
87+
"workload_identity_provider_mapping.created",
88+
"workload_identity_provider_mapping.updated",
89+
"workload_identity_provider_mapping.deleted",
8490
"role.created",
8591
"role.updated",
8692
"role.deleted",

0 commit comments

Comments
 (0)