Skip to content

⚡ Bolt: Optimize ZimaOS and Ollama model fetching#17

Open
bobdivx wants to merge 1 commit into
devfrom
jules-bolt-perf-openai-surface-6495858125349309947
Open

⚡ Bolt: Optimize ZimaOS and Ollama model fetching#17
bobdivx wants to merge 1 commit into
devfrom
jules-bolt-perf-openai-surface-6495858125349309947

Conversation

@bobdivx
Copy link
Copy Markdown
Owner

@bobdivx bobdivx commented May 6, 2026

💡 What: Refactored collectZimaOSV1ModelEntries and fetchOllamaTagNames in src/lib/forge-openai-surface.ts to execute downstream gateway API HTTP requests in parallel using Promise.all rather than sequential execution inside loops.

🎯 Why: Fetching models sequentially blocks execution until the slower or timed-out fallback endpoints resolve, slowing down the interface and overall sync process. Executing all available configured gateway fallback routes in parallel guarantees the function evaluates as fast as the single slowest response (rather than their sum).

📊 Impact: Reduces overall latency of AI model listing operations, notably speeding up AI sync processes and rendering times for AI capability lists across the application interface.

🔬 Measurement: Verify changes by checking test suites pass (pnpm check and pnpm test) and observing the execution speed inside application flows evaluating available models (e.g. Chat settings, model orchestration routes).


PR created automatically by Jules for task 6495858125349309947 started by @bobdivx

Refactors `collectZimaOSV1ModelEntries` and `fetchOllamaTagNames` to use `Promise.all` directly mapping the endpoints to `fetch` calls, improving overall latency resolving available AI models.

Co-authored-by: bobdivx <6737167+bobdivx@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
forge Ready Ready Preview, Comment May 6, 2026 7:03pm

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the collectZimaOSV1ModelEntries function to parallelize network requests using Promise.all, reducing latency by fetching multiple paths concurrently instead of sequentially. A corresponding entry was added to .jules/bolt.md to document the trade-off between network overhead and performance. I have no feedback to provide as there were no review comments to evaluate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant