System-1 Routers & HTTP/3 QUIC

GAP decouples optional System-1 neural decision models (@receptron/laya, TypeSafe Jev, Google gemini-decision-1) from the deterministic runtime, and delivers dual-stack HTTP/2 + native HTTP/3 over QUIC with 0-RTT disabled against replay attacks.

What you'll learn

  • Why GAP ships in BASELINE_FALLBACK routing mode rather than uncalibrated neural weights (G-S1).
  • Configure optional [router] decision providers with egress allowlists and secret redaction.
  • Enable native HTTP/3 QUIC (RFC 9114) with fail-closed prod TLS verification.
On this page

System-1 Decision Routing & Gate G-S1

Small neural routers only help if they beat fast lexical+structural ranking cleanly. Evaluated via routebench on held-out and debiased splits (docs/decisions/G-S1.md):

RouteBench Measured Accuracy and Latency (G-S1)
Router ImplementationHeld-Out / Test Top-1Debiased Top-1p95 LatencyDefault Shipping Mode
Baseline (BM25 + Structural)97.22% / 95.24%Measured baseline0.887 msEnabled (Default)
laya-candle:f32 (zero-shot)Below G-S1 gate14.29%73.85 msOpt-in via [router] (INV-17)
toml gap.toml — Optional [router] Config
[router]
# disabled | laya_candle | laya_ort | http_sidecar | receptron_laya | jev | gemini_decision_1
provider = "gemini_decision_1"
endpoint = "https://generativelanguage.googleapis.com"
model = "gemini-decision-1"
api_key_secret = "env://GEMINI_API_KEY"
timeout_ms = 400

Dual-Stack HTTP/2 + HTTP/3 over QUIC (OPS-005, ADR-026)

Configured cleanly in gap.toml, gap-transport serves HTTPS/TCP (HTTP/1.1 + HTTP/2 with Alt-Svc: h3=":8443"; ma=86400) and UDP QUIC (quinn + h3, TLS 1.3 ALPN h3) on the same runtime:

toml gap.toml — Dual-Stack HTTP/2 + HTTP/3
profile = "prod"

[server]
listen = "0.0.0.0:8443"
http3_listen = "0.0.0.0:8443"
tls_cert_secret = "file:///etc/gap/cert.pem"
tls_key_secret = "file:///etc/gap/key.pem"
  • Replay Immunity: max_early_data_size = 0 disables QUIC TLS 1.3 0-RTT early data everywhere so replayed packets can never trigger mutations twice.
  • Fail-Closed prod Guard: Booting with profile = "prod" and http3_listen without explicit tls_cert_secret / tls_key_secret refuses to start; under profile = "dev", omitting TLS secrets generates an ephemeral self-signed TLS 1.3 certificate automatically.
  • Measured Local Benchmark: 5,013.1 req/s over multiplexed QUIC (1.626 ms p50 / 2.364 ms p95 / 0 errors) alongside 1,063.6 req/s TCP HTTP/1.1+2 (11.544 ms p95).
Dual-Stack Transport Throughput (HTTP/3 QUIC vs TCP HTTP/1.1+2) Measured against the compiled release binary (bench/results/ga_local/report.json)
HTTP/3 QUIC (h3, 0-RTT off) 5,013.1 req/s (2.364 ms p95)
TCP HTTP/1.1 + HTTP/2 1,063.6 req/s (11.544 ms p95)

Visual bar comparison (min-width clamped for clarity on log-scale ratios).

Dual-stack local load test summary (bench/results/ga_local/report.json)
Protocol TransportSustained Throughputp50 / p95 LatencyErrors / 0-RTT Policy
UDP HTTP/3 QUIC (h3)5,013.1 req/s1.626 ms / 2.364 ms0 errors · 0-RTT disabled
TCP HTTP/1.1 + HTTP/21,063.6 req/sMeasured TCP / 11.544 ms0 errors · Alt-Svc h3 advertised