diff --git a/CHANGELOG.md b/CHANGELOG.md index 555a8f6..b1eed10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow [SemVer](https://semver.org). -## [Unreleased] +## [0.4.0] - 2026-09-07 ### Added diff --git a/pyproject.toml b/pyproject.toml index 3805cbe..8492734 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "lago-agent-sdk" -version = "0.3.0" +version = "0.4.0" description = "Instrument LLM clients and emit usage events to Lago." readme = "README.md" requires-python = ">=3.10" diff --git a/src/lago_agent_sdk/__init__.py b/src/lago_agent_sdk/__init__.py index c3548e7..8afe314 100644 --- a/src/lago_agent_sdk/__init__.py +++ b/src/lago_agent_sdk/__init__.py @@ -35,4 +35,4 @@ "compute_cost", "TOKEN_BILLED_PROVIDERS", ] -__version__ = "0.2.0" +__version__ = "0.4.0" diff --git a/src/lago_agent_sdk/token_semantics.py b/src/lago_agent_sdk/token_semantics.py index 97f9ea7..acae9b7 100644 --- a/src/lago_agent_sdk/token_semantics.py +++ b/src/lago_agent_sdk/token_semantics.py @@ -153,10 +153,10 @@ # reported input_tokens unchanged (18825) with cached_tokens 18810 INSIDE it, # total = input + output exactly (06b_real_cache_control_warm.json); reasoning # came back inside output (128 of 169, total = input + output, - # 07_real_reasoning.json). cache_write is inferred from the same normalization - # rather than measured — every observed write reported cache_write_tokens: 0 - # while the warm read proved the cache existed, and the arithmetic keeps the - # write inside input — re-verify the day a nonzero write appears in a capture. + # 07_real_reasoning.json). cache_write follows the same convention, confirmed + # by measurement on 2026-09-07: an OpenAI-served cold write reported + # input_tokens_details.cache_write_tokens 4490 INSIDE input_tokens 4493, with + # total = input + output — so the write stays inside input here too. # # Router's OTHER surface, `/v1/messages` (stamped "ramp_router_messages" by the # Anthropic adapter), is deliberately ABSENT. It keeps Anthropic's additive diff --git a/uv.lock b/uv.lock index ac9ffde..f13d31c 100644 --- a/uv.lock +++ b/uv.lock @@ -784,7 +784,7 @@ wheels = [ [[package]] name = "lago-agent-sdk" -version = "0.3.0" +version = "0.4.0" source = { editable = "." } dependencies = [ { name = "requests" },