fix: display separately billed SQL provider credits - #282
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Shadow auto-approve: would not auto-approve because issues were found.
Fix all with cubic | Re-trigger cubic
Contributor
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Fixes CLI receipt display so separately billed SQL provider credits are shown with an outer/provider breakdown instead of a misleading zero. The change is display-only, narrowly scoped to receipt rendering, and covered by focused tests.
Re-trigger cubic
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.
Executed firecrawl/sql responses report zero outer credits because their provider calls are charged separately. The CLI currently prints only that zero, hiding the nested reported cost.
Add separatelyBilledCredits to the CLI receipt and display the combined reported cost with an explicit outer/provider breakdown. Preserve creditsUsed as the outer charge, leave nested provider receipts intact, and only recognize successful firecrawl/sql result envelopes with finite non-negative costs. Ordinary provider payloads, previews, failures, and invalid costs are excluded.
Validation: 14 receipt tests and all 48 Alexandria CLI HTTP tests passed across focused runs (the new case rerun after correcting test JSON quoting); build, typecheck and git diff --check passed. No paid live calls.
Companion Exchange receipt fix: https://github.com/firecrawl/exchange/pull/708. This display also works with existing SQL results that have a null nested receipt.
Summary by cubic
Fixes CLI receipt display so SQL provider calls billed separately no longer appear as zero total credits.
separatelyBilledCreditsto the receipt and prints a combined total with an outer/provider breakdown.creditsUsedas the outer request charge and leaves nested provider receipts unchanged.Written for commit b89b1d4. Summary will update on new commits.