SYSTEM ARCHITECTURE
Architecture, Security & API Reference
Hono.js proxy pipeline, circuit breaker lifecycle, and endpoints.
Core Subsystems
• RouteEngine: Deterministic candidate evaluator with LKGP, headroom, cache-affinity, and cost sorting.
• CircuitBreaker: 3-state state machine (CLOSED, OPEN, HALF_OPEN) with cooldown lockout.
• PromptCompressor: LexiPack multi-language rules and whitespace compaction saving 30-55% tokens.
• AdminStore: AES-256-GCM keystore and SHA-256 virtual key manager.
Key API Endpoints
POST /v1/chat/completions — OpenAI-compatible chat proxyPOST /v1/messages — Anthropic Messages API proxyGET /v1/models — Dynamic model catalog with pricing metadataPOST /v1/router/explain — Dry-run route explainability simulatorPOST /v1/mcp — Built-in Model Context Protocol serverGET /health/live — Liveness probe and provider connectivity