From 0209c3eacf7ced565820511d122e2d2ecdb3bba2 Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Mon, 18 May 2026 13:50:41 +0200 Subject: [PATCH] feat(minimax): add Group ID support to fix rate limit quota MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pass GroupId query param to Minimax T2A v2 API — required for paid plan quota allocation. Without it, Minimax defaults to (0/0 used). - shared/schema.ts: groupId field on minimaxConfig table - server/migrate.ts: ADD COLUMN IF NOT EXISTS group_id - server/routes/reels.ts: fetch and pass groupId alongside apiKey - server/services/ffmpeg.ts: minimax_group_id in request interface/body - ffmpeg-service/main.py: GroupId in URL, threaded through all call sites - client/src/pages/settings.tsx: Group ID input in Minimax settings card --- client/src/pages/settings.tsx | 26 +++++++++++++++++++++++++- ffmpeg-service/main.py | 16 +++++++++++----- server/migrate.ts | 6 ++++++ server/routes/reels.ts | 12 ++++++++++-- server/services/ffmpeg.ts | 9 ++++++++- shared/schema.ts | 1 + 6 files changed, 61 insertions(+), 9 deletions(-) diff --git a/client/src/pages/settings.tsx b/client/src/pages/settings.tsx index b0e1640..8791986 100644 --- a/client/src/pages/settings.tsx +++ b/client/src/pages/settings.tsx @@ -31,6 +31,7 @@ export default function Settings() { const [ffmpegApiKey, setFfmpegApiKey] = useState(""); const [externalApiKey, setExternalApiKey] = useState(""); const [minimaxApiKey, setMinimaxApiKey] = useState(""); + const [minimaxGroupId, setMinimaxGroupId] = useState(""); const { toast } = useToast(); const { data: session } = useQuery<{ id: string; username: string; role: string }>({ @@ -264,6 +265,7 @@ export default function Settings() { const hasExistingExternalApiConfig = !!(externalApiConfig as any)?.configured; const hasExistingMinimaxConfig = !!(minimaxConfig as any)?.apiKey; + const hasExistingMinimaxGroupId = !!(minimaxConfig as any)?.groupId; const saveMinimaxMutation = useMutation({ mutationFn: () => { @@ -271,11 +273,15 @@ export default function Settings() { if (minimaxApiKey && minimaxApiKey.trim() !== "") { payload.apiKey = minimaxApiKey; } + if (minimaxGroupId && minimaxGroupId.trim() !== "") { + payload.groupId = minimaxGroupId; + } return apiRequest('POST', '/api/minimax/config', payload); }, onSuccess: () => { queryClient.invalidateQueries({ queryKey: ['/api/minimax/config'] }); setMinimaxApiKey(""); + setMinimaxGroupId(""); toast({ title: "Configuration sauvegardée", description: "Votre clé API Minimax a été enregistrée", @@ -680,6 +686,24 @@ export default function Settings() { )}

+
+ + setMinimaxGroupId(e.target.value)} + placeholder={hasExistingMinimaxGroupId ? "••••••••••••••••" : "1234567890"} + data-testid="input-minimax-group-id" + /> +

+ {hasExistingMinimaxGroupId ? ( + ✓ Group ID configuré - Laissez vide pour conserver + ) : ( + "Requis pour les quotas corrects — trouvez-le sur platform.minimaxi.com dans votre profil" + )} +

+

Voix françaises disponibles :

@@ -693,7 +717,7 @@ export default function Settings() {