Skip to content

Back to featured project

HiveMind

Open-source contributor / Aug 2026 – Present[1]

Model routing with bounded retries and ordered fallbacks for an open-source multi-agent runtime, with every attempt traced and streamed state restored after reconnects.[2][3]

HiveMind: how a request survives a failing modelModel routing sends a request to the first model in an ordered fallback list. The first model streams text, reasoning, and attachment events as separate SSE event types, then stalls. Rate limits, 5xx responses, timeouts, and connection errors are retried; an invalid 4xx fails fast. Retries are bounded and every attempt is traced with a structured log and an OpenTelemetry counter. When retries run out, the request moves to the next model in order, which answers. After a reconnect, the client draft is reconciled with persisted PostgreSQL messages, and stored reasoning is not passed into later model context. Model IDs and the attempt bound follow the router configuration in PR #92: max_attempts_per_model 2 here, default 1, maximum 5.ClientNext.js, SSEModel routeropenai/gpt-4o-mini → openai/gpt-4o1openai/gpt-4o-mini · attempt 1 of 2textreasoningattachmentstimeout2Retryrate limits (429) · 5xxtimeouts (408/409) · connectionFail fastother 4xx3Bounded retriesattempt 2 of 2 · 5xxeach attempt: structured log + OpenTelemetry counter4attempts exhausted: next model in orderopenai/gpt-4o · attempt 1 of 2streams text, reasoning, attachmentsok5After a reconnectclient draftPostgreSQL messagesreconciled, state restoredstored reasoninglater model context6Config from PR #92: max_attempts_per_model 2 (default 1, max 5)retry_on timeout · rate_limit · server_error · connection

Results

  • 3

    merged PRs: model fallback, reasoning persistence, multimodal attachments[4]

  • 4

    retryable failure classes (rate limits, 5xx, timeouts, connection errors); invalid 4xx fail fast[2]

  • 1.1K

    GitHub stars on the runtime[1]

Stack

  • Python
  • Spring Boot
  • PostgreSQL
  • Next.js
  • SSE
  • OpenTelemetry

Status:Write-up in progress, October 2026

Sources

  1. [1]Resume (Oct 2026): Open-Source Contributor, HiveMind, role line
  2. [2]Resume (Oct 2026): Open-Source Contributor, HiveMind, bullet 2
  3. [3]Resume (Oct 2026): Open-Source Contributor, HiveMind, bullet 3
  4. [4]Resume (Oct 2026): Open-Source Contributor, HiveMind, bullet 1
  5. [5]Confirmed by Jeremy Yao on 2026-10-25