Skip to content

feat: improve routing latency and provider readiness#111

Open
hankbobtheresearchoor wants to merge 1 commit into
Layr-Labs:swift-providerfrom
hankbobtheresearchoor:feat/riot-routing-network-telemetry
Open

feat: improve routing latency and provider readiness#111
hankbobtheresearchoor wants to merge 1 commit into
Layr-Labs:swift-providerfrom
hankbobtheresearchoor:feat/riot-routing-network-telemetry

Conversation

@hankbobtheresearchoor
Copy link
Copy Markdown
Contributor

Summary

  • Add a coordinator routing replay simulator to compare current cost model, round-robin, least-active, least-metric, and random-near-tie strategies.
  • Add provider-reported network quality (rtt_ms, jitter_ms, reconnects, write failures, write latency) and route away from degraded links.
  • Add Swift provider request lifecycle telemetry + capacity fidelity (active_tokens, pending/active counts, TTFT/total timings).
  • Tighten first-response retry deadline to keep TTFT under target: default 4s, adaptive by route cost, capped at 15s.
  • Dispatch coordinator-driven load_model prewarm hints to cold standby Swift providers so redundant nodes are ready if the primary is not.

Why

Goal is OpenRouter-facing sub-5s TTFT even when a selected provider is cold/unhealthy. Swift gets ~3s cold and ~300ms warm, so the coordinator should be the timing authority: quickly retry before writing the HTTP response, penalize bad paths, and keep standby providers warming.

Tests

  • cd coordinator && go test ./...
  • cd provider-swift && swift test --filter 'NetworkQuality|BatchSchedulerTelemetry|ProtocolTests|CoordinatorClient'
  • cd provider-swift && swift build -c release

Note: full swift test hits an existing live MLX/metallib environment failure (Failed to load the default metallib) in live integration tests; focused non-live suites and release build pass.

- Add routing replay simulator for strategy comparison
- Add provider network quality heartbeats and routing penalties
- Add Swift provider lifecycle telemetry and capacity fidelity
- Tighten first-response deadlines for faster invisible retries
- Prewarm standby Swift providers for redundant ready nodes
@vercel
Copy link
Copy Markdown

vercel Bot commented May 1, 2026

@hankbobtheresearchoor is attempting to deploy a commit to the EigenLabs Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant