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_FALLBACKrouting 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-closedprodTLS 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):
| Router Implementation | Held-Out / Test Top-1 | Debiased Top-1 | p95 Latency | Default Shipping Mode |
|---|---|---|---|---|
| Baseline (BM25 + Structural) | 97.22% / 95.24% | Measured baseline | 0.887 ms | Enabled (Default) |
laya-candle:f32 (zero-shot) | Below G-S1 gate | 14.29% | 73.85 ms | Opt-in via [router] (INV-17) |
[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:
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 = 0disables QUIC TLS 1.30-RTTearly data everywhere so replayed packets can never trigger mutations twice. - Fail-Closed
prodGuard: Booting withprofile = "prod"andhttp3_listenwithout explicittls_cert_secret/tls_key_secretrefuses to start; underprofile = "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 /
0errors) alongside 1,063.6 req/s TCP HTTP/1.1+2 (11.544 msp95).
HTTP/3 QUIC (h3, 0-RTT off)
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).
| Protocol Transport | Sustained Throughput | p50 / p95 Latency | Errors / 0-RTT Policy |
|---|---|---|---|
UDP HTTP/3 QUIC (h3) | 5,013.1 req/s | 1.626 ms / 2.364 ms | 0 errors · 0-RTT disabled |
| TCP HTTP/1.1 + HTTP/2 | 1,063.6 req/s | Measured TCP / 11.544 ms | 0 errors · Alt-Svc h3 advertised |