From aa793088eda9dc4ed8ff47e0d455d8771c2745ea Mon Sep 17 00:00:00 2001 From: "Apple\\Apple" Date: Mon, 16 Jun 2025 00:58:47 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20fix(playground):=20send=20selected?= =?UTF-8?q?=20group=20in=20API=20payload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the Playground UI allowed users to pick a group, but the request body sent to `/pg/chat/completions` did not include this information, so the backend always fell back to the user’s default group. Changes introduced • web/src/helpers/api.js – added `group: inputs.group` to the `payload` built in `buildApiPayload`. Outcome • Selected group is now transmitted to the backend, enabling proper channel routing and pricing logic based on group ratios. • Resolves the issue where group selection appeared ineffective in the Playground. --- web/src/helpers/api.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/helpers/api.js b/web/src/helpers/api.js index aef01287..5b9c03e1 100644 --- a/web/src/helpers/api.js +++ b/web/src/helpers/api.js @@ -82,6 +82,7 @@ export const buildApiPayload = (messages, systemPrompt, inputs, parameterEnabled const payload = { model: inputs.model, + group: inputs.group, messages: processedMessages, stream: inputs.stream, };