cost subcommand - #267
Draft
Cedric / ViaDézo1er (viadezo1er) wants to merge 8 commits into
Draft
Conversation
Contributor
|
Latest downloadable build artifacts for this PR commit
Available artifact names
|
Cedric / ViaDézo1er (viadezo1er)
force-pushed
the
cedric/cost-subcommand
branch
3 times, most recently
from
July 21, 2026 01:33
d81f21a to
0c40707
Compare
Cedric / ViaDézo1er (viadezo1er)
force-pushed
the
cedric/cost-subcommand
branch
3 times, most recently
from
July 28, 2026 21:58
06c7af9 to
5863065
Compare
multiple group-by work sort by time when grouped by day/hour sort by the dimension (eg user) in the output data when grouped by user
Cedric / ViaDézo1er (viadezo1er)
force-pushed
the
cedric/cost-subcommand
branch
from
August 12, 2026 22:35
5863065 to
7ca6946
Compare
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.
STACKED BARS for
bt cost --group-by user --group-by hoursay the cost is only for tokens not for storage cost
create a skill to teach the agent to use btql to see the data however they want, because we're not able to think of all the ways customers will want to use our data
TODO
repeated --group-by
too few abscissa legends in images
legends too small in images
don't separate the cost depending on the source unless a flag is passed, otherwise
bt cost --group-by usershows the same user multiple times. maybe only sort depending on active/passive (eg coding agent vs topics)?i think there is a massive undercounting, i almost don't appear
caching?
Rebased on
cedric/prune-profilesto dogfood.#274 will be merged before this pr.
bt cost logs:bt cost logs --json|jq:{ "project": "cedric-traces", "org": "BT Staging", "currency": "USD", "since": "2026-07-14T01:35:29Z", "until": "2026-07-21T01:35:29Z", "excludes_scorers": false, "pricing_file": null, "rows": [ { "model": "claude-opus-4-8", "purpose": null, "candidate_spans": 430, "cost": 48.40370225, "braintrust_cost": 48.40370225, "file_cost": null, "braintrust_priced_spans": 430, "file_priced_spans": 0, "unpriced_token_spans": 0, "no_usage_spans": 0, "coverage": "full" }, { "model": "zai-org/GLM-5.2", "purpose": null, "candidate_spans": 2539, "cost": 45.48671468, "braintrust_cost": 45.48671468, "file_cost": null, "braintrust_priced_spans": 2267, "file_priced_spans": 0, "unpriced_token_spans": 0, "no_usage_spans": 272, "coverage": "full" }, { "model": "gpt-5.5", "purpose": null, "candidate_spans": 714, "cost": 32.5653, "braintrust_cost": 32.5653, "file_cost": null, "braintrust_priced_spans": 705, "file_priced_spans": 0, "unpriced_token_spans": 0, "no_usage_spans": 9, "coverage": "full" }, { "model": "gpt-5.6-sol", "purpose": null, "candidate_spans": 752, "cost": 14.96779075, "braintrust_cost": 14.96779075, "file_cost": null, "braintrust_priced_spans": 741, "file_priced_spans": 0, "unpriced_token_spans": 0, "no_usage_spans": 11, "coverage": "full" }, { "model": "claude-haiku-4-5-20251001", "purpose": null, "candidate_spans": 50, "cost": 0.33857415, "braintrust_cost": 0.33857415, "file_cost": null, "braintrust_priced_spans": 50, "file_priced_spans": 0, "unpriced_token_spans": 0, "no_usage_spans": 0, "coverage": "full" }, { "model": null, "purpose": null, "candidate_spans": 4, "cost": null, "braintrust_cost": null, "file_cost": null, "braintrust_priced_spans": 0, "file_priced_spans": 0, "unpriced_token_spans": 4, "no_usage_spans": 0, "coverage": "unknown" }, { "model": "glm-5.2", "purpose": null, "candidate_spans": 1760, "cost": null, "braintrust_cost": null, "file_cost": null, "braintrust_priced_spans": 0, "file_priced_spans": 0, "unpriced_token_spans": 1749, "no_usage_spans": 11, "coverage": "unknown" } ], "totals": { "candidate_spans": 6249, "cost": 141.76208183, "braintrust_cost": 141.76208183, "file_cost": null, "braintrust_priced_spans": 4193, "file_priced_spans": 0, "unpriced_token_spans": 1753, "no_usage_spans": 303, "coverage": "partial" } }