AI Bridge
ProfessionalTransparent HTTP bridge between developer AI clients and providers, capturing prompts, token usage, tool calls, and lifecycle events for auditing and cost control.
Overview
A lightweight AI gateway written in Go that sits between developer tools (Codex, Claude Code, Cursor) and providers like OpenAI and Anthropic. Routes requests transparently while capturing detailed usage and observability data for auditing, cost tracking, and operational insight.
Key Outcomes
- Full request interception with token usage, prompt, and tool invocation logging
- Streaming and passthrough support preserving native client compatibility
- Prometheus metrics for request volume, latency, in-flight traffic, and token consumption
- Production-ready architecture designed for Postgres persistence and edge deployment
Implementation Notes
Built in Go with OpenAI-compatible and Anthropic-compatible endpoints. Includes a runnable SQLite-backed example service for local testing. The architecture supports verified user identity, Cloudflare edge protection, and scalable container deployment for production environments.