Skip to content

Releases

light-tokenmeter 1.2.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 23:32
f6e4454

Added

  • tool_call on usage events (server, tool, response_bytes), sent by an MCP gateway such as
    Keystone's for each tool call it forwards, stored in Postgres and ClickHouse as tool_server,
    tool_name and response_bytes. A tool_call must name both a server (up to 64 characters)
    and a tool (up to 128).

Image: coyl/light-tokenmeter:1.2.0 (linux/amd64, linux/arm64), signed with cosign; see Verifying a release.

light-tokenmeter 1.1.0

Choose a tag to compare

@github-actions github-actions released this 24 Oct 13:18
f0cc31a

Tools for people and AI assistants; the service and its APIs are unchanged apart from the
version in /healthz.

Added

  • The tokenmeter CLI: usage summary|top|by-meta|export with totals in USD and windows that
    the server caps fetched in parts, token new|hash for TOKENMETER_TOKENS, event send,
    health, contexts with the token from an environment variable, a 0600 file or the system
    keychain, -o json|csv, exit codes by error class and completion for bash, zsh and fish.
    Released as archives with a signed checksums.txt, the coyl/tokenmeter-cli image and a
    Homebrew formula (published once the tap token is set).
  • tokenmeter mcp: a read-only MCP server for AI assistants over stdio or streamable HTTP
    (--listen, bearer token) with usage_summary, top_spenders, cost_per_action,
    usage_by_meta, health and a usage_report prompt. It refuses a token that can write.
  • pkg/client, a Go client for the gRPC API.
  • /healthz reports the service's version.

Image: coyl/light-tokenmeter:1.1.0 (linux/amd64, linux/arm64), signed with cosign; see Verifying a release.

light-tokenmeter 1.0.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 17:38
9127bdf

The first stable release, together with Keystone. The Model Switchboard. (KTMS) 1.0 and
ktms-admin 1.0. From here on, what API stability lists changes
incompatibly only in a new major version. Upgrade from 0.1.x in one step.

Added

  • cache_read_tokens and cache_write_tokens on usage events (usage.v1 fields 17 and 18) and
    summed in summary and by-meta rows: the input tokens read from and written to the vendor's
    prompt cache, which vendors bill apart from plain input. They are part of tokens_input.
    Stored in Postgres and ClickHouse; events from older callers carry 0.
  • Authentication: bearer tokens with write and read scopes, configured as SHA-256 hashes in
    TOKENMETER_TOKENS or TOKENMETER_TOKENS_FILE, several at once for rotation. Refusals are
    401/403 over HTTP and UNAUTHENTICATED/PERMISSION_DENIED over gRPC. Without tokens the
    service runs open and warns at startup. gRPC health is registered; reflection needs a token.
  • Prometheus metrics on METRICS_ADDR (:9091): events, requests and their duration, storage
    errors, ClickHouse copying, outbox size and age, and tokenmeter_build_info. The README lists
    them with suggested alerts.
  • README "API stability" and "Versions and upgrades": what 1.x keeps compatible, one-step and
    rolling upgrades, no downgrades.
  • An upgrade test (scripts/upgrade-test.sh) from the previous release and the oldest of the
    same major, with Postgres and ClickHouse, on every pull request and before each release.
  • buf lint, buf breaking and a generated-code check on every pull request; govulncheck on
    every pull request and release.
  • Releases: vX.Y.Z tags, a GitHub Release with this changelog's section, and multi-arch images
    signed with cosign, with SBOM and provenance (see SECURITY.md).

Changed

  • ClickHouse no longer loses events. Events reach it through a Postgres outbox written in the same
    statement as the event, copied in leased batches under a deduplication token, so a full buffer,
    a ClickHouse outage or a crash neither drops nor double-counts them. The service starts and
    stays ready without ClickHouse, and reads fall back to Postgres when it fails.
  • The first start with an empty ClickHouse copies the last 90 days of Postgres history to it;
    reports stay on Postgres until that is done.
  • Validation before the freeze: error_class up to 256 characters (longer used to fail with a
    500), meta up to 16 KiB of keys and values with no empty keys, requests up to 16 MiB (413 request_too_large over HTTP), and occurred_at between 1900 and 2262-04-10; the zero time means
    unset.
  • HTTP batch errors name the bad event as invalid event at index N, like gRPC.
  • Summary rows leave out status unless grouped by it, like the other grouping fields.
  • Relicensed under Apache 2.0.

Security

  • The startup log no longer contains the Postgres password: it named the whole DATABASE_URL.
  • clickhouse-go v2.49.0 with ch-go v0.74.0, fixing GO-2025-3603 in the ClickHouse protocol reader.

Image: coyl/light-tokenmeter:1.0.0 (linux/amd64, linux/arm64), signed with cosign; see Verifying a release.