fix(daemon): increase default API timeout to 120s for heartbeat reliability#1979
Open
AnwarPy wants to merge 7 commits intomultica-ai:mainfrom
Open
fix(daemon): increase default API timeout to 120s for heartbeat reliability#1979AnwarPy wants to merge 7 commits intomultica-ai:mainfrom
AnwarPy wants to merge 7 commits intomultica-ai:mainfrom
Conversation
|
Someone is attempting to deploy a commit to the IndexLabs Team on Vercel. A member of the Team first needs to authorize it. |
added 5 commits
May 2, 2026 00:52
…a-ai#1637) Issue: server /api/daemon/heartbeat takes 12-24s, exceeding the hardcoded 30s HTTP client timeout in NewClient(). Changes: - config.go: DefaultAPITimeout=60s, Config.APITimeout field, Overrides.APITimeout, env var MULTICA_DAEMON_API_TIMEOUT - client.go: SetTimeout(d) setter method - daemon.go: Apply timeout in New() after SetVersion() - client_test.go: TestClient_SetTimeout unit test Rebased on main v0.2.22 (374f62b).
…bility Issue: The heartbeat endpoint can take 12-24s under load, and with network variance sometimes exceeds 60s. The original 30s default caused frequent 'context deadline exceeded' errors. Changes: - config.go: DefaultAPITimeout increased from 60s to 120s - daemon.go: Add debug logging to confirm timeout is applied Users can override via MULTICA_DAEMON_API_TIMEOUT env var. Fixes multica-ai#1637
When the daemon is started with a minimal PATH (e.g., from a service
manager or Electron app), exec.LookPath("hermes") fails even though
the binary exists in common user locations.
Probes these fallback paths when MULTICA_HERMES_PATH is not set:
1. ~/.local/bin/hermes
2. ~/hermes-agent/.venv/bin/hermes
Fixes model discovery failure for Hermes Agent provider.
The hermes acp handshake (initialize + session/new) takes ~8s under normal load. The previous 12s deadline was cutting it close, especially when the system is under load or the LLM provider is slow to respond. Bump to 20s to give ample headroom while still failing fast enough to not block the UI indefinitely.
The ModelPicker and ModelDropdown components were gated behind runtimeOnline, which meant any runtime that appeared offline would silently show 'No models available' instead of attempting discovery. The daemon may still be running and reachable via heartbeat even when the UI marks it offline (transient heartbeat delay, cache staleness). Change: always fire the model discovery query when a runtimeId exists. A failed discovery will surface as an error instead of an empty list.
c9c65b4 to
326e228
Compare
added 2 commits
May 2, 2026 04:49
- apps/web/components.json: rtl: true - apps/web/app/layout.tsx: lang=ar dir=rtl - apps/desktop/src/renderer/index.html: lang=ar dir=rtl - server/internal/middleware/csp.go: connect-src * wss: (allow LAN) Note: Arabic i18n translations not yet added — RTL direction only.
- globals.css: row-reverse for resizable panels, force sidebar visibility - issue-detail.tsx: ensure sidebar defaultLayout >= 20% (was collapsed) - Dockerfile.web.rtl: helper Dockerfile for RTL builds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The daemon heartbeat endpoint (
POST /api/daemon/heartbeat) can take 12-24 seconds under normal load, and with network variance sometimes exceeds 60 seconds. The original hardcoded 30-second HTTP client timeout inNewClient()caused frequentcontext deadline exceedederrors, leading to unnecessary heartbeat failures.Changes
DefaultAPITimeoutincreased from60sto120sConfig.APITimeoutfield,Overrides.APITimeout, andMULTICA_DAEMON_API_TIMEOUTenv var supportSetTimeout(d time.Duration)setter methodNew()afterSetVersion()SetTimeoutTesting
context deadline exceeded)MULTICA_DAEMON_API_TIMEOUTenv varImpact
NewClient())Fixes #1637