About this project

llm-router-gate is a Python CLI and SDK designed for developers who need precise visibility into single-shot LLM API calls. It routes requests to Anthropic, OpenRouter, or local llama.cpp servers, streaming responses while exposing the full HTTP layer — including headers, raw SSE events, and final payloads. It provides token counts and cost estimates with provenance, helping users compare providers, debug empty responses, or validate prompt costs before deployment. The tool deliberately avoids chat history, retries, or system prompts, functioning like 'curl -v' for LLMs plus a built-in calculator. It supports tri-state reasoning toggles, distinguishes between answer and reasoning channels in streaming output, and reports token usage from authoritative server fields or fallback heuristics. Security note: it logs all headers including API keys — redact before sharing. Requires Python ≥3.14 and uses uv for dependency management. Ideal for debugging, benchmarking, or validating LLM behavior across backends without abstraction layers.