Skip to content

Commit cf49246

Browse files
committed
fix(responses): remove unsupported store parameter from payload
The Copilot API does not support the 'store' parameter, causing 400 errors. Filter out this parameter before sending requests to the Copilot /responses endpoint.
1 parent 528fbfa commit cf49246

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/services/copilot/create-responses.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,13 @@ export const createResponses = async (
333333

334334
const headers = copilotHeaders(state, { vision, initiator })
335335

336+
// Remove unsupported parameters before sending to Copilot API
337+
const { store, ...supportedPayload } = payload
338+
336339
const response = await fetch(`${copilotBaseUrl(state)}/responses`, {
337340
method: "POST",
338341
headers,
339-
body: JSON.stringify(payload),
342+
body: JSON.stringify(supportedPayload),
340343
})
341344

342345
if (!response.ok) {

0 commit comments

Comments
 (0)