Repository navigation
Conversation
…port The V2 usage report and its filter-values endpoint gained cloud account and per-resource-type filters, and moved resource IDs to a paginated endpoint, so the SDK's billing filters had fallen behind: - Add cluster_ids and subfilters (job/MMT/deployment tags, assistant message API keys) to BillingActivityFilters and BillingApi. - Return cluster_ids and subfilter values from get_activity_filter_values, dropping resource_ids/resource_ids_truncated, which the server no longer sends. - Add get_activity_filter_resource_names for paging through resource IDs. - Stop sending limit and the pagination cursor to the CSV downloads, which ignore them, and reject tag subfilters there since the download endpoints don't apply them yet. - Fix resource type examples to the raw values the server uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The session and resource download endpoints now read the job, multi-machine job and deployment tag subfilters (grid #47735), so forward them under the same dotted keys the UI uses instead of rejecting them with a ValueError. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Note
Depends on #154 (Vendor cloud changes), which brings in the generated client methods and parameters this uses. Land that first.
Why are we doing this work?
What does this PR change?
The SDK's billing activity filters now match the V2 usage report on grid master.
lightning_code,job), notStudio/Job.Breaking changes (billing shipped in v2026.09.18)
BillingActivityFilterValues.resource_ids/resource_ids_truncatedare gone: the server reserved those fields, so they were always empty. UseOrganization.get_activity_filter_resource_names.get_session_activity/get_resource_activityno longer takecursor, and ignorefilters.limit. Both download endpoints return the whole report and never read either, so they never had any effect.Verification
billing_service_get_usage_report_v2parameters, and parsed real generated response models through the new_from_apimethods.What else should a reviewer know?
get_session_activity/get_resource_activityforward tag subfilters under the same dotted query keys the UI sends (subfilters.job.tagIds,subfilters.multiMachineJob.matchAllTags, ...).— Claude Opus 5.5, via /create-pr; text not reviewed