chore: bump firmware + faster LLM failover
Repo State / repo-state (pull_request) Failing after 1m14s
Repo State / repo-state (push) Failing after 1m10s
Validate Zacus refactor / validate (push) Failing after 13m51s

Bump ESP32_ZACUS to 82759ee (voice-activated two-phase capture, mic
diag). Gateway: drop the local-LLM (granite) timeout 70s -> 8s so a
cold/hung local model fails over to the remote backend fast instead of
stalling the whole turn past the firmware's reply timeout.
This commit was merged in pull request #165.
This commit is contained in:
clement
2026-06-17 14:41:02 +02:00
parent 27ab75fded
commit 0764c873a7
2 changed files with 8 additions and 5 deletions
+7 -4
View File
@@ -241,10 +241,13 @@ async def _chat_reply(http: httpx.AsyncClient, persona: str, history: list[dict]
"""
messages = [{"role": "system", "content": persona + _PHONE_STYLE}] + history
backends = [
# 70 s tolerates a ~47 s cold (re)load with margin; the keep-warm task
# keeps it ~2 s in normal operation. Total turn (STT ~10 s + this + say
# ~2 s) stays under the firmware's 90 s turn_client timeout.
("local", settings.local_chat_url, settings.local_chat_model, 70.0),
# 8 s: a healthy warm granite answers in ~2 s, so 8 s gives margin while
# failing over FAST when the local server is cold, hung, or deadlocked.
# Waiting the full cold-load (~47 s) here would blow the turn budget —
# the player hears only the filler and the reply never lands in time.
# The keep-warm task is responsible for keeping granite warm; if it is
# unreachable we want the remote fallback immediately, not a 70 s stall.
("local", settings.local_chat_url, settings.local_chat_model, 8.0),
("ailiance", settings.ailiance_tts_url, settings.ailiance_chat_model, 12.0),
]
last_exc: Exception | None = None