From 96be45ae66d4f506bce505ffe8df3481b073b3f0 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 17:56:19 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Bolt:=20Parallelized=20ZimaOS=20mod?= =?UTF-8?q?el=20fetches=20for=20improved=20performance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: bobdivx <6737167+bobdivx@users.noreply.github.com> --- src/lib/forge-openai-surface.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/forge-openai-surface.ts b/src/lib/forge-openai-surface.ts index 93415262..7ac832a8 100644 --- a/src/lib/forge-openai-surface.ts +++ b/src/lib/forge-openai-surface.ts @@ -118,8 +118,13 @@ export async function collectZimaOSV1ModelEntries( let lastError: string | undefined; let lastRaw: unknown = null; - for (const path of V1_MODELS_PATHS) { - const r = await fetchZimaOSJson(email, path); + // ⚡ Bolt: Parallelized sequential API fetches to reduce overall network latency. + // Impact: Reduces load time from sum of individual latencies to max latency of a single request. + const results = await Promise.all( + V1_MODELS_PATHS.map((path) => fetchZimaOSJson(email, path)) + ); + + for (const r of results) { lastStatus = r.status; lastError = r.error; lastRaw = r.data;