Skip to content

Wire HedgedLLM hedge decisions into SynapseKit Live #1083

Open

Description

@AmitoVrito

Follow-up to #1082 (HedgedLLM, p99 tail-latency request hedging).

The underlying primary/secondary LLM calls already get llm.generate spans via synapsekit.observe, so they show up on the run dashboard. What is not yet surfaced is the hedge decision itself — which is the whole value of the feature:

  • when a hedge was triggered (primary exceeded hedge_delay or failed early)
  • who won (primary / secondary) and the first-token latency delta
  • running HedgingStats (hedge_rate, hedge_win_rate)

Per the house rule that every new feature publishes to the EventBus so the glass box reflects it, emit a hedge.* event from HedgedLLM (return-value-based, so publish directly via from ..live.bus import bus guarded by bus.enabled, same pattern as observe/runtime._publish_live and Dream's dream.run). Add a 🪂 (or similar) icon + story() branch in live/dashboard.html.

Scope: additive, no behavioural change to hedging. No text/prompt content in the event payload (metrics + winner only).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions