Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@ def _split_agent_messages(
"gen_ai.usage.cache_creation.input_tokens",
"ag.metrics.unit.tokens.cache_creation",
),
# Producer marker for how `gen_ai.usage.input_tokens` counts cached tokens. The
# OpenTelemetry contract says it includes them, which is what cost estimation
# assumes when this is absent; a producer whose count excludes them (the Agenta
# agent runner, which reports the cache buckets separately) sends false.
(
"agenta.usage.input_tokens_includes_cache",
"ag.meta.usage.input_tokens_includes_cache",
),
# Producer-reported cost. This is the aggregate total for the span's whole run
# (see the agent SDK's record_usage), so it maps to `cumulative`, not
# `incremental`: as an incremental value the tree roll-up would add it on top of
Expand Down
Loading
Loading