hn.today

Show HN: Log every LLM call with tokens, cost, latency, and time to first token

github.com3 points0 comments
Screenshot of Show HN: Log every LLM call with tokens, cost, latency, and time to first token

llmtee is a self-hosted Go proxy that records usage from OpenAI, Anthropic, and compatible providers such as OpenRouter, Ollama, vLLM, and Groq. Clients connect by changing their API base URL, with no code changes, while llmtee forwards responses unchanged and logs tokens, costs, latency, and time to first token. A web dashboard, CSV export, Prometheus metrics, and an MCP interface let users inspect and query activity. It is aimed at individuals and small teams seeking visibility and spending controls, rather than serving as a routing gateway with fallbacks or multi-tenant management.

Users can assign keys daily and monthly budgets; once a limit has been reached, later calls are rejected, though the request that crosses the limit can finish because its cost is known only after the response. Provider credentials are stored only as hashes, and proxy-issued keys can conceal real credentials from teammates or agents. Request and response bodies are logged by default for 30 days, but logging can be disabled or data redacted; the project sends no telemetry. Streaming is forwarded as chunks arrive, while parsing and database writes happen in the background. In a stated test, the proxy added 0.14 ms at median latency under 200 requests per second. Its key operational tradeoff is that calls fail if the proxy is unavailable; logging events may also be dropped if storage is slow or down.

Read on github.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Ggml v1.0.0

Ggml v1.0.0

ggml 1.0.0 removes deprecated public APIs and legacy DIAG_MASK operations, while adding configurable YaRN truncation and FP8 support. It also improves backend performance with quantized matrix multiplication, fused MoE operations, and new attention and scheduling paths. (github.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.