Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/lib/forge-openai-surface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down