Skip to content

Commit 0206188

Browse files
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.
1 parent 9cc2478 commit 0206188

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 147
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

src/resources/responses/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Types:
77
- <code><a href="./src/resources/responses/responses.ts">ComputerAction</a></code>
88
- <code><a href="./src/resources/responses/responses.ts">ComputerActionList</a></code>
99
- <code><a href="./src/resources/responses/responses.ts">ComputerTool</a></code>
10-
- <code><a href="./src/resources/responses/responses.ts">ComputerUseTool</a></code>
10+
- <code><a href="./src/resources/responses/responses.ts">ComputerUsePreviewTool</a></code>
1111
- <code><a href="./src/resources/responses/responses.ts">ContainerAuto</a></code>
1212
- <code><a href="./src/resources/responses/responses.ts">ContainerNetworkPolicyAllowlist</a></code>
1313
- <code><a href="./src/resources/responses/responses.ts">ContainerNetworkPolicyDisabled</a></code>

src/resources/responses/responses.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,17 @@ export type ComputerActionList = Array<ComputerAction>;
493493
* [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
494494
*/
495495
export interface ComputerTool {
496+
/**
497+
* The type of the computer tool. Always `computer`.
498+
*/
499+
type: 'computer';
500+
}
501+
502+
/**
503+
* A tool that controls a virtual computer. Learn more about the
504+
* [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
505+
*/
506+
export interface ComputerUsePreviewTool {
496507
/**
497508
* The height of the computer display.
498509
*/
@@ -514,17 +525,6 @@ export interface ComputerTool {
514525
type: 'computer_use_preview';
515526
}
516527

517-
/**
518-
* A tool that controls a virtual computer. Learn more about the
519-
* [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
520-
*/
521-
export interface ComputerUseTool {
522-
/**
523-
* The type of the computer tool. Always `computer`.
524-
*/
525-
type: 'computer';
526-
}
527-
528528
export interface ContainerAuto {
529529
/**
530530
* Automatically creates a container for this request
@@ -6638,8 +6638,8 @@ export interface SkillReference {
66386638
export type Tool =
66396639
| FunctionTool
66406640
| FileSearchTool
6641-
| ComputerUseTool
66426641
| ComputerTool
6642+
| ComputerUsePreviewTool
66436643
| WebSearchTool
66446644
| Tool.Mcp
66456645
| Tool.CodeInterpreter
@@ -7798,7 +7798,7 @@ export declare namespace Responses {
77987798
type ComputerAction as ComputerAction,
77997799
type ComputerActionList as ComputerActionList,
78007800
type ComputerTool as ComputerTool,
7801-
type ComputerUseTool as ComputerUseTool,
7801+
type ComputerUsePreviewTool as ComputerUsePreviewTool,
78027802
type ContainerAuto as ContainerAuto,
78037803
type ContainerNetworkPolicyAllowlist as ContainerNetworkPolicyAllowlist,
78047804
type ContainerNetworkPolicyDisabled as ContainerNetworkPolicyDisabled,

0 commit comments

Comments
 (0)