Skip to content

Commit 15afa21

Browse files
release: 2.26.0 (#2932)
* feat(api): The GA ComputerTool now uses the CompuerTool class. The 'computer_use_preview' tool is moved to ComputerUsePreview This fixes naming of the old computer_use_preview, which previously took the ComputerTool name. There is a newly GAed `computer` tool now available, which will use the ComputerTool name. This may be a breaking change for users of the preview tool. * release: 2.26.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 9b1bb6e commit 15afa21

15 files changed

+75
-67
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-
".": "2.25.0"
2+
".": "2.26.0"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 148
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-9c802d45a9bf2a896b5fd22ac22bba185e8a145bd40ed242df9bb87a05e954eb.yml
33
openapi_spec_hash: 97984ed69285e660b7d5c810c69ed449
4-
config_hash: acb0b1eb5d7284bfedaddb29f7f5a691
4+
config_hash: 8240b8a7a7fc145a45b93bda435612d6

CHANGELOG.md

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

3+
## 2.26.0 (2026-03-05)
4+
5+
Full Changelog: [v2.25.0...v2.26.0](https://github.com/openai/openai-python/compare/v2.25.0...v2.26.0)
6+
7+
### Features
8+
9+
* **api:** The GA ComputerTool now uses the CompuerTool class. The 'computer_use_preview' tool is moved to ComputerUsePreview ([78f5b3c](https://github.com/openai/openai-python/commit/78f5b3c287b71ed6fbeb71fb6b5c0366db704cd2))
10+
311
## 2.25.0 (2026-03-05)
412

513
Full Changelog: [v2.24.0...v2.25.0](https://github.com/openai/openai-python/compare/v2.24.0...v2.25.0)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "openai"
3-
version = "2.25.0"
3+
version = "2.26.0"
44
description = "The official Python library for the openai API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/openai/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "openai"
4-
__version__ = "2.25.0" # x-release-please-version
4+
__version__ = "2.26.0" # x-release-please-version

src/openai/resources/responses/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ from openai.types.responses import (
99
ComputerAction,
1010
ComputerActionList,
1111
ComputerTool,
12-
ComputerUseTool,
12+
ComputerUsePreviewTool,
1313
ContainerAuto,
1414
ContainerNetworkPolicyAllowlist,
1515
ContainerNetworkPolicyDisabled,

src/openai/types/responses/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
from .apply_patch_tool import ApplyPatchTool as ApplyPatchTool
3434
from .file_search_tool import FileSearchTool as FileSearchTool
3535
from .tool_search_tool import ToolSearchTool as ToolSearchTool
36-
from .computer_use_tool import ComputerUseTool as ComputerUseTool
3736
from .custom_tool_param import CustomToolParam as CustomToolParam
3837
from .local_environment import LocalEnvironment as LocalEnvironment
3938
from .local_skill_param import LocalSkillParam as LocalSkillParam
@@ -83,7 +82,6 @@
8382
from .responses_client_event import ResponsesClientEvent as ResponsesClientEvent
8483
from .responses_server_event import ResponsesServerEvent as ResponsesServerEvent
8584
from .tool_search_tool_param import ToolSearchToolParam as ToolSearchToolParam
86-
from .computer_use_tool_param import ComputerUseToolParam as ComputerUseToolParam
8785
from .local_environment_param import LocalEnvironmentParam as LocalEnvironmentParam
8886
from .response_compact_params import ResponseCompactParams as ResponseCompactParams
8987
from .response_output_message import ResponseOutputMessage as ResponseOutputMessage
@@ -100,6 +98,7 @@
10098
from .response_retrieve_params import ResponseRetrieveParams as ResponseRetrieveParams
10199
from .response_text_done_event import ResponseTextDoneEvent as ResponseTextDoneEvent
102100
from .tool_choice_custom_param import ToolChoiceCustomParam as ToolChoiceCustomParam
101+
from .computer_use_preview_tool import ComputerUsePreviewTool as ComputerUsePreviewTool
103102
from .container_reference_param import ContainerReferenceParam as ContainerReferenceParam
104103
from .function_shell_tool_param import FunctionShellToolParam as FunctionShellToolParam
105104
from .inline_skill_source_param import InlineSkillSourceParam as InlineSkillSourceParam
@@ -145,6 +144,7 @@
145144
from .response_compaction_item_param import ResponseCompactionItemParam as ResponseCompactionItemParam
146145
from .response_file_search_tool_call import ResponseFileSearchToolCall as ResponseFileSearchToolCall
147146
from .response_mcp_call_failed_event import ResponseMcpCallFailedEvent as ResponseMcpCallFailedEvent
147+
from .computer_use_preview_tool_param import ComputerUsePreviewToolParam as ComputerUsePreviewToolParam
148148
from .response_custom_tool_call_param import ResponseCustomToolCallParam as ResponseCustomToolCallParam
149149
from .response_output_item_done_event import ResponseOutputItemDoneEvent as ResponseOutputItemDoneEvent
150150
from .response_content_part_done_event import ResponseContentPartDoneEvent as ResponseContentPartDoneEvent

src/openai/types/responses/computer_tool.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,5 @@ class ComputerTool(BaseModel):
1313
Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1414
"""
1515

16-
display_height: int
17-
"""The height of the computer display."""
18-
19-
display_width: int
20-
"""The width of the computer display."""
21-
22-
environment: Literal["windows", "mac", "linux", "ubuntu", "browser"]
23-
"""The type of computer environment to control."""
24-
25-
type: Literal["computer_use_preview"]
26-
"""The type of the computer use tool. Always `computer_use_preview`."""
16+
type: Literal["computer"]
17+
"""The type of the computer tool. Always `computer`."""

src/openai/types/responses/computer_tool_param.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,5 @@ class ComputerToolParam(TypedDict, total=False):
1313
Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1414
"""
1515

16-
display_height: Required[int]
17-
"""The height of the computer display."""
18-
19-
display_width: Required[int]
20-
"""The width of the computer display."""
21-
22-
environment: Required[Literal["windows", "mac", "linux", "ubuntu", "browser"]]
23-
"""The type of computer environment to control."""
24-
25-
type: Required[Literal["computer_use_preview"]]
26-
"""The type of the computer use tool. Always `computer_use_preview`."""
16+
type: Required[Literal["computer"]]
17+
"""The type of the computer tool. Always `computer`."""
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing_extensions import Literal
4+
5+
from ..._models import BaseModel
6+
7+
__all__ = ["ComputerUsePreviewTool"]
8+
9+
10+
class ComputerUsePreviewTool(BaseModel):
11+
"""A tool that controls a virtual computer.
12+
13+
Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
14+
"""
15+
16+
display_height: int
17+
"""The height of the computer display."""
18+
19+
display_width: int
20+
"""The width of the computer display."""
21+
22+
environment: Literal["windows", "mac", "linux", "ubuntu", "browser"]
23+
"""The type of computer environment to control."""
24+
25+
type: Literal["computer_use_preview"]
26+
"""The type of the computer use tool. Always `computer_use_preview`."""

0 commit comments

Comments
 (0)