Files
opencode2api/internal
sk-dev-ai 773b64bf9e feat: per-session token burn in logs, monitor rings, and usage snapshots
Every anonymous-lane session draws from one shared upstream IP bucket,
but nothing showed which conversation was draining it. Carry the
canonical ses_ ID into RequestMeta and the request_routed line, the
recent-request ring, and per-model/per-tier style usageSessions maps in
both lifetime and hourly snapshots.

The lifetime sessions map is capped at 500 entries (smallest-first
eviction): session IDs are high-cardinality and an unbounded map grows
forever. Buckets and snapshots are short-lived and stay uncapped.
2026-10-14 17:31:40 +05:30
..