Skip to content

Commit 2589004

Browse files
vercel-ai-sdk[bot]michaelcummings12felixarntz
authored
Backport: feat(openai): add GPT-5.4 model support (#13117)
This is an automated backport of #13115 to the release-v6.0 branch. FYI @michaelcummings12 Co-authored-by: Michael Cummings <67663935+michaelcummings12@users.noreply.github.com> Co-authored-by: Felix Arntz <flixos90@gmail.com>
1 parent d23121f commit 2589004

25 files changed

+58
-31
lines changed

.changeset/clean-peaches-fly.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@ai-sdk/gateway': patch
3+
'@ai-sdk/openai': patch
4+
---
5+
6+
feat(provider/openai): add GPT-5.4 model support

examples/ai-e2e-next/agent/openai/shell-container-agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { openai } from '@ai-sdk/openai';
22
import { ToolLoopAgent, InferAgentUIMessage } from 'ai';
33

44
export const openaiShellContainerAgent = new ToolLoopAgent({
5-
model: openai.responses('gpt-5.2'),
5+
model: openai.responses('gpt-5.4'),
66
instructions:
77
'You have access to a shell tool running in a hosted container. ' +
88
'Commands are executed server-side by OpenAI.',

examples/ai-e2e-next/agent/openai/shell-container-skills-agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const skillZip = readFileSync(
88
).toString('base64');
99

1010
export const openaiShellContainerSkillsAgent = new ToolLoopAgent({
11-
model: openai.responses('gpt-5.2'),
11+
model: openai.responses('gpt-5.4'),
1212
instructions:
1313
'You have access to a shell tool running in a hosted container. ' +
1414
'Commands are executed server-side by OpenAI. ' +

examples/ai-e2e-next/agent/openai/shell-skills-agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ async function executeShellCommand({
7575
}
7676

7777
export const openaiShellSkillsAgent = new ToolLoopAgent({
78-
model: openai.responses('gpt-5.2'),
78+
model: openai.responses('gpt-5.4'),
7979
instructions:
8080
'You have access to a shell tool that can execute commands on the local filesystem. ' +
8181
'You also have access to skills installed locally. ' +

examples/ai-functions/src/generate-text/openai/responses-shell-container-multiturn.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { run } from '../../lib/run';
44

55
run(async () => {
66
const result1 = await generateText({
7-
model: openai.responses('gpt-5.2'),
7+
model: openai.responses('gpt-5.4'),
88
tools: {
99
shell: openai.tools.shell({
1010
environment: {
@@ -18,7 +18,7 @@ run(async () => {
1818
console.log('Turn 1:', result1.text);
1919

2020
const result2 = await generateText({
21-
model: openai.responses('gpt-5.2'),
21+
model: openai.responses('gpt-5.4'),
2222
tools: {
2323
shell: openai.tools.shell({
2424
environment: {

examples/ai-functions/src/generate-text/openai/responses-shell-container-skills.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const skillZip = readFileSync('data/island-rescue-skill.zip').toString(
99

1010
run(async () => {
1111
const result = await generateText({
12-
model: openai.responses('gpt-5.2'),
12+
model: openai.responses('gpt-5.4'),
1313
tools: {
1414
shell: openai.tools.shell({
1515
environment: {

examples/ai-functions/src/generate-text/openai/responses-shell-container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { run } from '../../lib/run';
44

55
run(async () => {
66
const result = await generateText({
7-
model: openai.responses('gpt-5.2'),
7+
model: openai.responses('gpt-5.4'),
88
tools: {
99
shell: openai.tools.shell({
1010
environment: {

examples/ai-functions/src/generate-text/openai/responses-shell-local-multiturn.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { run } from '../../lib/run';
55

66
run(async () => {
77
const result1 = await generateText({
8-
model: openai.responses('gpt-5.2'),
8+
model: openai.responses('gpt-5.4'),
99
tools: {
1010
shell: openai.tools.shell({
1111
execute: async ({ action }) => {
@@ -25,7 +25,7 @@ run(async () => {
2525
console.log('Turn 1:', result1.text);
2626

2727
const result2 = await generateText({
28-
model: openai.responses('gpt-5.2'),
28+
model: openai.responses('gpt-5.4'),
2929
tools: {
3030
shell: openai.tools.shell({
3131
execute: async ({ action }) => {

examples/ai-functions/src/generate-text/openai/responses-shell-local-skills.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { run } from '../../lib/run';
66

77
run(async () => {
88
const result = await generateText({
9-
model: openai.responses('gpt-5.2'),
9+
model: openai.responses('gpt-5.4'),
1010
tools: {
1111
shell: openai.tools.shell({
1212
execute: async ({ action }) => {

examples/ai-functions/src/stream-text/openai/responses-shell-container-multiturn.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { run } from '../../lib/run';
44

55
run(async () => {
66
const result1 = await generateText({
7-
model: openai.responses('gpt-5.2'),
7+
model: openai.responses('gpt-5.4'),
88
tools: {
99
shell: openai.tools.shell({
1010
environment: {
@@ -18,7 +18,7 @@ run(async () => {
1818
console.log('Turn 1:', result1.text);
1919

2020
const result2 = streamText({
21-
model: openai.responses('gpt-5.2'),
21+
model: openai.responses('gpt-5.4'),
2222
tools: {
2323
shell: openai.tools.shell({
2424
environment: {

0 commit comments

Comments
 (0)