You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: reuse OpenAI client instance and add connection warmup
Cache the OpenAI client at module level keyed by (apiKey, baseURL)
to avoid creating a fresh HTTP connection pool on every LLM turn.
The client is a stateless fetch wrapper so sharing across calls is
safe. Model, thinking-mode and other settings are still read fresh
from config files each time.
Also add a mount-time warmup effect that eagerly creates the client
so the TCP+TLS connection is established while the user composes
their first prompt.
0 commit comments