Skip to content

Commit 962ace9

Browse files
committed
fix: update Responses API payload structure for JSON mode compatibility
1 parent 3998320 commit 962ace9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/core/api-client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ export class ApiClient {
6666
{ role:'system', content:[ sysTextPartResponses ]},
6767
{ role:'user', content:[ textPartResponses, imagePartResponses ]}
6868
],
69-
// Responses API uses text.format for JSON mode (Azure and new OpenAI spec)
70-
text: { format: 'json' }
69+
// Responses API: JSON mode via text.format object (e.g., { type: 'json_object' })
70+
text: { format: { type: 'json_object' } }
7171
};
7272
} else {
7373
// chat

0 commit comments

Comments
 (0)