Skip to content

CI-1865: Expose dataset compute cost in the SDK - #227

Merged
sminot merged 3 commits into
mainfrom
claude/dataset-cost-estimate-sdk-9f9f6a
Sep 4, 2026
Merged

CI-1865: Expose dataset compute cost in the SDK#227
sminot merged 3 commits into
mainfrom
claude/dataset-cost-estimate-sdk-9f9f6a

Conversation

@sminot

@sminot sminot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Adds ExecutionService.get_cost to retrieve the compute cost of the analysis that produced a dataset, along with a cost property on the DataPortalDataset SDK class.

The endpoint was already present in cirro_api_client, so no dependency bump is needed. The response carries the total alongside a breakdown by task and by task status group, and an is_estimate flag.

Not caching the property, since the cost of a running analysis changes as tasks complete.

🤖 Generated with Claude Code

Add ExecutionService.get_cost, wrapping the existing
/projects/{project}/execution/{dataset}/cost endpoint, and a
DataPortalDataset.cost property over it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sminot sminot changed the title Expose dataset compute cost in the SDK CI-1865: Expose dataset compute cost in the SDK Sep 4, 2026
@sminot
sminot requested a review from nathanthorpe September 4, 2026 12:55
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sminot
sminot force-pushed the claude/dataset-cost-estimate-sdk-9f9f6a branch from eb2a33f to 2b17cee Compare September 4, 2026 12:56
Comment thread cirro/sdk/dataset.py Outdated
`cirro_api_client.v1.models.CostResponse` -- `total_cost` alongside a
breakdown by task (`tasks`) and by task status group (`groups`).

Not cached: the cost of a running analysis grows as tasks complete, and

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_estimate doesn't change depending on the settled billing data.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sminot
sminot merged commit 3364e5f into main Sep 4, 2026
9 checks passed
@sminot
sminot deleted the claude/dataset-cost-estimate-sdk-9f9f6a branch September 4, 2026 15:22
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants