feat: add MBE health check proxy endpoint

- Added /api/v1/mbe/health proxy in Studio proxy (port 8888)
- Frontend now uses proxy endpoint instead of direct mbeUrl
- Works for both localhost and external access (once proxy is deployed)
- MBE health response: {status: 'healthy', model: 'e4b', layers: 42}
This commit is contained in:
2026-10-22 23:52:23 +08:00
parent a429aca344
commit 951a2964f3
6 changed files with 23 additions and 4 deletions

View File

@@ -879,9 +879,9 @@ async function testMbe() {
testingMbe.value = true
mbeInfo.value = null
try {
// MarkBaseServer only exposes /health (returns plain text "OK")
// Always use /health regardless of hostname
const healthUrl = `${mbeUrl.value.replace(/\/$/, '')}/health`
// Use Studio proxy to reach MBE (works both locally and remotely)
const base = getApiBase()
const healthUrl = `${base.replace(/\/$/, '')}/api/v1/mbe/health`
const resp = await fetch(healthUrl, { signal: AbortSignal.timeout(5000) })
if (!resp.ok) throw new Error(`HTTP ${resp.status}`)