Proxy
The authenticated HTTP edge for chat completions, Responses, directives, sessions, and provider routing.
The proxy is the public data-plane edge. It authenticates PATs, verifies agent identity, applies admission controls, optionally assembles context, and forwards to mock or live providers.
Implemented Ledger class: shipped-local
Verified 2026-10-21Critical path is locally evidenced; hosted SLO remains open
Start with the request path
- Overview — endpoints, middleware order, headers, and failure modes.
- Authentication — bearer token, agent header, probes, and error semantics.
- Request routing — model registry, provider selection, and fallbacks.
- Idempotency and budgets — replay, admission holds, and usage accounting.
- Sessions — sticky session IDs and checkpoint behavior.
- Directives — org directive resolution and system-prompt injection.
- Rate limiting — Redis budgets and fail-closed behavior.
- Provider adapters — mock, OpenAI, Anthropic, and self-hosted.
- Provider routing and resilience — model policy, capability manifests, breakers, and fallback.
- Auth caching — bloom + LRU and the revocation gate.
- Configuration — environment variables and startup validation.
Implemented vs provisional
| Surface | Status | Boundary |
|---|---|---|
| PAT and agent validation | IMPLEMENTED | Locally tested; auth gRPC must be trusted |
| Mock/live chat completion | IMPLEMENTED | Live provider calls depend on operator keys |
| Streaming | IMPLEMENTED | Provider-dependent; Responses streaming is rejected |
| Idempotency | IMPLEMENTED | Redis-backed for non-streaming chat |
| Sessions and directives | IMPLEMENTED | PostgreSQL/Redis required for durable behavior |
| Context assembly | PROVISIONAL | Optional; fails open to directive-only |
| Budget admission | PROVISIONAL | Ledger exists; reconciliation and hosted evidence open |
Never infer
A successful mock response does not validate live provider behavior, context quality, billing correctness, or production throughput. A 501 PROVIDER_NOT_CONFIGURED means the model is not in the active registry — not that forwarding is broken.

