From 9de0de34308741392d0a48ad1dc1d63473656f4d Mon Sep 17 00:00:00 2001 From: Anil Matcha Date: Wed, 22 Apr 2026 12:04:52 +0530 Subject: [PATCH] fix: correct predictions poll URL in studio muapi client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PROXY_APP_BASE ('/api/app') produced /api/app/v1/predictions/... which after the Next.js rewrite hit 127.0.0.1:8000/app/v1/... → 404. Poll now uses BASE_URL directly, consistent with how submit works. Co-Authored-By: Claude Sonnet 4.6 --- packages/studio/src/muapi.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/studio/src/muapi.js b/packages/studio/src/muapi.js index 4a008b5..fb15023 100644 --- a/packages/studio/src/muapi.js +++ b/packages/studio/src/muapi.js @@ -1,11 +1,10 @@ import { getModelById, getVideoModelById, getI2IModelById, getI2VModelById, getV2VModelById, getLipSyncModelById } from './models.js'; -const BASE_URL = 'https://api.muapi.ai'; // Legacy direct URL -const PROXY_APP_BASE = '/api/app'; +const BASE_URL = 'https://api.muapi.ai'; const PROXY_WF_BASE = '/api/workflow'; async function pollForResult(requestId, key, maxAttempts = 900, interval = 2000) { - const pollUrl = `${PROXY_APP_BASE}/v1/predictions/${requestId}/result`; + const pollUrl = `${BASE_URL}/api/v1/predictions/${requestId}/result`; for (let attempt = 1; attempt <= maxAttempts; attempt++) { await new Promise(resolve => setTimeout(resolve, interval)); try {