Skip to content
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.38.0"
".": "2.39.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 262
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-afacc4343d0efc074c8c5667eb83570642c8b9acaa7792ca8e075c6d18ef9f3a.yml
openapi_spec_hash: a62a557c61532681963fd21e748b0eb4
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-2a971ccbb946726988e96654eaecceb6d9b5ad27f5793c0064b864f5686d4fc1.yml
openapi_spec_hash: a712e4ee68f829570b3f5b267afa5a05
config_hash: bb69d8d0771dbac4a84fc6dca11e3ceb
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2.39.0 (2026-06-01)

Full Changelog: [v2.38.0...v2.39.0](https://github.com/openai/openai-python/compare/v2.38.0...v2.39.0)

### Features

* **api:** workload identity in audit logs, additional_tools item in responses, fix ActionSearch.query to be optional. ([ab60d7a](https://github.com/openai/openai-python/commit/ab60d7a52c310bb0490ff36b8bdc33b8d4ea725f))

## 2.38.0 (2026-05-21)

Full Changelog: [v2.37.0...v2.38.0](https://github.com/openai/openai-python/compare/v2.37.0...v2.38.0)
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 = "2.38.0"
version = "2.39.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__ = "2.38.0" # x-release-please-version
__version__ = "2.39.0" # x-release-please-version
1 change: 1 addition & 0 deletions src/openai/lib/_parsing/_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def parse_response(
or output.type == "web_search_call"
or output.type == "tool_search_call"
or output.type == "tool_search_output"
or output.type == "additional_tools"
or output.type == "reasoning"
or output.type == "compaction"
or output.type == "mcp_call"
Expand Down
12 changes: 12 additions & 0 deletions src/openai/resources/admin/organization/audit_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ def list(
"tunnel.created",
"tunnel.updated",
"tunnel.deleted",
"workload_identity_provider.created",
"workload_identity_provider.updated",
"workload_identity_provider.deleted",
"workload_identity_provider_mapping.created",
"workload_identity_provider_mapping.updated",
"workload_identity_provider_mapping.deleted",
"role.created",
"role.updated",
"role.deleted",
Expand Down Expand Up @@ -256,6 +262,12 @@ def list(
"tunnel.created",
"tunnel.updated",
"tunnel.deleted",
"workload_identity_provider.created",
"workload_identity_provider.updated",
"workload_identity_provider.deleted",
"workload_identity_provider_mapping.created",
"workload_identity_provider_mapping.updated",
"workload_identity_provider_mapping.deleted",
"role.created",
"role.updated",
"role.deleted",
Expand Down
48 changes: 48 additions & 0 deletions src/openai/resources/chat/completions/completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,14 @@ def create(
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on
your organization's data retention policy:

- Organizations without ZDR enabled default to `24h`.
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning_effort: Constrains effort on reasoning for
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
Expand Down Expand Up @@ -735,6 +743,14 @@ def create(
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on
your organization's data retention policy:

- Organizations without ZDR enabled default to `24h`.
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning_effort: Constrains effort on reasoning for
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
Expand Down Expand Up @@ -1042,6 +1058,14 @@ def create(
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on
your organization's data retention policy:

- Organizations without ZDR enabled default to `24h`.
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning_effort: Constrains effort on reasoning for
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
Expand Down Expand Up @@ -1943,6 +1967,14 @@ async def create(
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on
your organization's data retention policy:

- Organizations without ZDR enabled default to `24h`.
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning_effort: Constrains effort on reasoning for
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
Expand Down Expand Up @@ -2259,6 +2291,14 @@ async def create(
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on
your organization's data retention policy:

- Organizations without ZDR enabled default to `24h`.
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning_effort: Constrains effort on reasoning for
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
Expand Down Expand Up @@ -2566,6 +2606,14 @@ async def create(
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on
your organization's data retention policy:

- Organizations without ZDR enabled default to `24h`.
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning_effort: Constrains effort on reasoning for
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
Expand Down
12 changes: 12 additions & 0 deletions src/openai/resources/responses/input_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def count(
instructions: Optional[str] | Omit = omit,
model: Optional[str] | Omit = omit,
parallel_tool_calls: Optional[bool] | Omit = omit,
personality: Union[str, Literal["friendly", "pragmatic"]] | Omit = omit,
previous_response_id: Optional[str] | Omit = omit,
reasoning: Optional[Reasoning] | Omit = omit,
text: Optional[input_token_count_params.Text] | Omit = omit,
Expand Down Expand Up @@ -91,6 +92,10 @@ def count(

parallel_tool_calls: Whether to allow the model to run tool calls in parallel.

personality: A model-owned style preset to apply to this request. Omit this parameter to use
the model's default style. Supported values may expand over time. Values must be
at most 64 characters.

previous_response_id: The unique ID of the previous response to the model. Use this to create
multi-turn conversations. Learn more about
[conversation state](https://platform.openai.com/docs/guides/conversation-state).
Expand Down Expand Up @@ -133,6 +138,7 @@ def count(
"instructions": instructions,
"model": model,
"parallel_tool_calls": parallel_tool_calls,
"personality": personality,
"previous_response_id": previous_response_id,
"reasoning": reasoning,
"text": text,
Expand Down Expand Up @@ -181,6 +187,7 @@ async def count(
instructions: Optional[str] | Omit = omit,
model: Optional[str] | Omit = omit,
parallel_tool_calls: Optional[bool] | Omit = omit,
personality: Union[str, Literal["friendly", "pragmatic"]] | Omit = omit,
previous_response_id: Optional[str] | Omit = omit,
reasoning: Optional[Reasoning] | Omit = omit,
text: Optional[input_token_count_params.Text] | Omit = omit,
Expand Down Expand Up @@ -221,6 +228,10 @@ async def count(

parallel_tool_calls: Whether to allow the model to run tool calls in parallel.

personality: A model-owned style preset to apply to this request. Omit this parameter to use
the model's default style. Supported values may expand over time. Values must be
at most 64 characters.

previous_response_id: The unique ID of the previous response to the model. Use this to create
multi-turn conversations. Learn more about
[conversation state](https://platform.openai.com/docs/guides/conversation-state).
Expand Down Expand Up @@ -263,6 +274,7 @@ async def count(
"instructions": instructions,
"model": model,
"parallel_tool_calls": parallel_tool_calls,
"personality": personality,
"previous_response_id": previous_response_id,
"reasoning": reasoning,
"text": text,
Expand Down
48 changes: 48 additions & 0 deletions src/openai/resources/responses/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,14 @@ def create(
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on
your organization's data retention policy:

- Organizations without ZDR enabled default to `24h`.
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning: **gpt-5 and o-series models only**

Expand Down Expand Up @@ -525,6 +533,14 @@ def create(
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on
your organization's data retention policy:

- Organizations without ZDR enabled default to `24h`.
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning: **gpt-5 and o-series models only**

Expand Down Expand Up @@ -775,6 +791,14 @@ def create(
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on
your organization's data retention policy:

- Organizations without ZDR enabled default to `24h`.
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning: **gpt-5 and o-series models only**

Expand Down Expand Up @@ -1974,6 +1998,14 @@ async def create(
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on
your organization's data retention policy:

- Organizations without ZDR enabled default to `24h`.
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning: **gpt-5 and o-series models only**

Expand Down Expand Up @@ -2231,6 +2263,14 @@ async def create(
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on
your organization's data retention policy:

- Organizations without ZDR enabled default to `24h`.
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning: **gpt-5 and o-series models only**

Expand Down Expand Up @@ -2481,6 +2521,14 @@ async def create(
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
[Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on
your organization's data retention policy:

- Organizations without ZDR enabled default to `24h`.
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning: **gpt-5 and o-series models only**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ class AuditLogListParams(TypedDict, total=False):
"tunnel.created",
"tunnel.updated",
"tunnel.deleted",
"workload_identity_provider.created",
"workload_identity_provider.updated",
"workload_identity_provider.deleted",
"workload_identity_provider_mapping.created",
"workload_identity_provider_mapping.updated",
"workload_identity_provider_mapping.deleted",
"role.created",
"role.updated",
"role.deleted",
Expand Down
Loading
Loading