release(0.13.11): vendor-extractor fields on v3 /track#69
Merged
Conversation
The 0.13.9 vendor-specific extractors (Cohere v2 tool_calls, Mistral num_cached_tokens, Gemini thoughtsTokenCount, Anthropic 4.5+ extended-thinking, Bedrock Mistral/Llama finish_reason) extract cache_read_tokens, cache_write_tokens, reasoning_tokens, finish_reason, and tool_names into wire_event. The legacy /track/batch path serializes the event as-is, so those fields ride through correctly. The v3 single-event path builds an explicit payload dict via _build_v3_track_payload. Pre-fix that mapper didn't opt the five fields in, so v3 /track events landed on the backend with all five columns = None — the migration-220 wireup received empty values and the dashboard's reasoning/cache metrics returned zero for every LLM call on the v3 path. Fix: forward non-None values for the five keys, matching the existing opt-in pattern for agent_id / environment / agent_type / attempt_index / is_retry. Backend defaults to None on missing keys, so a legacy event that lands on the v3 path without these fields still parses cleanly. Verified: pytest tests/test_v3_wire_contract.py + test_extractors.py + test_runtime.py + test_runtime_branches.py = 146 passed, 1 skipped, 0 regression. ruff + mypy clean.
Bump version 0.13.10 -> 0.13.11. Prepends the v3.25 / 0.13.11 changelog entry to __version__.py and extends the inline pyproject.toml comment block for 0.13.10 / 0.13.11. The actual fix — forwarding cache_read_tokens / cache_write_tokens / reasoning_tokens / finish_reason / tool_names through _build_v3_track_payload — ships in the preceding commit eb1bb6f on this branch. No on-wire change. No SDK_MIN_VERSION bump. Backends on 1.0.0 keep working unchanged. Recommended upgrade path: 0.13.10 -> 0.13.11.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 0.13.11 — vendor-extractor fields on v3 /track
Bump version 0.13.10 -> 0.13.11. Two commits on top of
origin/master:eb1bb6f— fix(sdk): forward vendor-extractor fields through v3 /track payloadPre-fix (0.13.10) the vendor-specific extractors surfaced
cache_read_tokens,cache_write_tokens,reasoning_tokens,finish_reason, andtool_namesontowire_eventcorrectly. The legacy/track/batchpath serializes the event as-is and preserved them. The v3 single-event path builds an explicit payload dict via_build_v3_track_payload— and that mapper didn't opt the five fields in, so v3/trackevents landed on the backend with all five columns =None.Effect on the backend: migration 220 added the five columns to
cost_events, the v3/trackhandler deserialisedNonefor every column on every LLM call routed through the v3 path, and the dashboard's reasoning / cache / finish_reason metrics returned zero for every event on the v3 single-event path.Fix: append a second opt-in pass for the five vendor-extractor fields in
runtime._build_v3_track_payload, using the existingif k in wire_event and wire_event[k] is not None: payload[k] = wire_event[k]pattern that already opts inagent_id/environment/agent_type/attempt_index/is_retry. Backend defaults all five toNoneon missing keys, so legacy events that land on the v3 path without these fields still parse cleanly.7f29f4c— chore(release): 0.13.11__version__to0.13.11insrc/nullrun/__version__.py.versionto0.13.11inpyproject.toml.__version__.py.pyproject.tomlcomment block for 0.13.10 / 0.13.11.Verification
pytest tests/test_extractors.py tests/test_crewai_patch.py tests/test_runtime.py tests/test_runtime_branches.py tests/test_track_batch_retry.py tests/test_track_span_context.py tests/test_v3_wire_contract.py tests/test_release_polish.py— 185 passed, 1 skipped (no regression vs 0.13.10).ruff check src/nullrun/__version__.py pyproject.toml— All checks passed!mypy src/nullrun— Success: no issues found in 34 source files.tests/test_drift_fixes_2026_07_04.pyare unchanged fromorigin/master— not a regression of this release.Wire format / API
SDK_MIN_VERSIONbump.