Migration from computer-use-preview
To migrate from the legacy preview integration, update the model, tool definition, and action handler:
| Preview integration | GA integration | |
|---|---|---|
| Model | computer-use-preview | gpt-5.6-sol |
| Tool name | tools: [\{ type: "computer_use_preview" \}] | tools: [\{ type: "computer" \}] |
| Actions | One action on each computer_call | A batched actions[] array on each computer_call |
| Truncation | truncation: "auto" required | truncation not necessary |
Show a legacy preview request
Legacy preview request
javascript
import OpenAI from "openai";
const client = new OpenAI();
const response = await client.responses.create({
model: "computer-use-preview",
tools: [
{
type: "computer_use_preview",
display_width: 1024,
display_height: 768,
environment: "browser",
},
],
input: "Check whether the Filters panel is open.",
truncation: "auto",
});python
from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model="computer-use-preview",
tools=[
{
"type": "computer_use_preview",
"display_width": 1024,
"display_height": 768,
"environment": "browser",
}
],
input="Check whether the Filters panel is open.",
truncation="auto",
)go
package main
import (
"context"
"fmt"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/responses"
)
func main() {
client := openai.NewClient()
response, err := client.Responses.New(context.Background(), responses.ResponseNewParams{
Model: "computer-use-preview",
Tools: []responses.ToolUnionParam{responses.ToolParamOfComputerUsePreview(768, 1024, responses.ComputerUsePreviewToolEnvironmentBrowser)},
Input: responses.ResponseNewParamsInputUnion{OfString: openai.String("Check whether the Filters panel is open.")},
Truncation: responses.ResponseNewParamsTruncationAuto,
})
if err != nil {
panic(err)
}
fmt.Println(response.Output)
}java
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.core.JsonValue;
import com.openai.models.responses.ResponseCreateParams;
import java.util.List;
import java.util.Map;
ResponseCreateParams params =
ResponseCreateParams.builder()
.model("computer-use-preview")
.input("Check whether the Filters panel is open.")
.truncation(ResponseCreateParams.Truncation.AUTO)
.putAdditionalBodyProperty(
"tools",
JsonValue.from(
List.of(
Map.of(
"type",
"computer_use_preview",
"display_width",
1024,
"display_height",
768,
"environment",
"browser"))))
.build();
client.responses().create(params).output().forEach(System.out::println);ruby
require "openai"
client = OpenAI::Client.new
response = client.responses.create(
model: "computer-use-preview",
input: "Check whether the Filters panel is open.",
truncation: :auto,
tools: [{
type: :computer_use_preview,
display_width: 1024,
display_height: 768,
environment: :browser
}]
)
puts(response.output)Keep the preview path only to maintain older integrations. For a new integration, follow the computer use guide. Your application still supplies the environment and executes the actions.