Skip to content

Commit 13e0f24

Browse files
committed
Remove incompatible with copilot responses service_tier field
Some clients, like RooCode may send `service_tier` to `/responses` endpoint, but Copilot do not support this field and returns error
1 parent 3cdc32c commit 13e0f24

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
@@ -336,10 +336,13 @@ export const createResponses = async (
336336
"X-Initiator": initiator,
337337
}
338338

339+
// Remove service_tier from payload as it's not supported by the responses endpoint
340+
const { service_tier, ...cleanPayload } = payload
341+
339342
const response = await fetch(`${copilotBaseUrl(state)}/responses`, {
340343
method: "POST",
341344
headers,
342-
body: JSON.stringify(payload),
345+
body: JSON.stringify(cleanPayload),
343346
})
344347

345348
if (!response.ok) {

0 commit comments

Comments
 (0)