Commit 3d72e2a
authored
release(0.13.11): vendor-extractor fields on v3 /track (#69)
* fix(sdk): forward vendor-extractor fields through v3 /track payload
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.
* chore(release): 0.13.11 — vendor-extractor fields on v3 /track
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.1 parent 0474ee1 commit 3d72e2a
3 files changed
Lines changed: 99 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
3 | 67 | | |
4 | 68 | | |
5 | 69 | | |
| |||
694 | 758 | | |
695 | 759 | | |
696 | 760 | | |
697 | | - | |
| 761 | + | |
698 | 762 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3116 | 3116 | | |
3117 | 3117 | | |
3118 | 3118 | | |
| 3119 | + | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
3119 | 3146 | | |
3120 | 3147 | | |
3121 | 3148 | | |
| |||
0 commit comments