Engineering Changelog

RSS Feed
benchmark
source: artifacts/proxy_bench.json

Atomic spend-guard proxy benchmarks and crash-recovery leases

Local HTTP proxy benchmarks measured 7.004ms median overhead (16.001ms p95) and zero overspend across 25 parallel requests at a $0.05 daily cap.

Noethekx exposes drop-in OpenAI, Anthropic, and Gemini gateway endpoints at https://nothekx.com/api/v1 using two-phase Firestore spend reservation.

Measured gateway behavior

  • Sequential overhead over local loopback HTTP (100 sequential HTTP requests): 7.004ms median overhead, 16.001ms p95 overhead, 130.62MB process RSS.
  • 25-parallel spend-cap race under a $0.05 daily cap with optimistic concurrency contention: 4 allowed requests, 21 blocked requests with HTTP 402 CAP_EXCEEDED, and zero leaked reservations.
  • Crash-recovery leases in active_reservations expire after 5 minutes when a worker crashes before reconciliation.

Verify locally

bash
node scripts/bench_proxy.mjs
sdk-example.ts
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://nothekx.com/api/v1',
  apiKey: process.env.NOETHEKX_KEY ?? 'nk_live_your_key_here',
});

Verified Reference Facts

7.004ms median overhead16.001ms p95 overhead25.565ms p99 overhead130.62MB RSS100 sequential HTTP requests25 parallel requests$0.05 daily cap4 allowed requests21 blocked requests9 OCC aborts5 call loop threshold5 minutesmaxAttempts 1525 requests$0.10 lifetime cap4000 chars256 output tokens
ship_note
source: src/lib/security/ssrf.ts, src/lib/proxy/upstream.ts

DNS-pinned SSRF webhook delivery and zero-storage passthrough header

Outbound webhooks pin validated DNS records with a 5s timeout and 16KB response cap, while proxy passthrough keeps upstream keys in request memory.

Webhook delivery validates HTTPS targets against IPv4 and IPv6 private, loopback, metadata, and IPv4-mapped ranges before opening a TLS socket pinned to the resolved address.

Requests supplying x-upstream-api-key execute spend-guard reservation, loop detection, and reconciliation without persisting the upstream key to Firestore or logs.

curl
curl -X POST https://nothekx.com/api/v1/chat/completions \
  -H "Authorization: Bearer nk_live_your_key_here" \
  -H "x-upstream-api-key: sk-your-key-placeholder" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"ping"}]}'

Verified Reference Facts

5s timeout16KB response cap