Skip to content

fix: display separately billed SQL provider credits - #282

Merged
developersdigest merged 2 commits into
mainfrom
fix/sql-nested-credit-display
Sep 25, 2026
Merged

developersdigest merged 2 commits into
mainfrom
fix/sql-nested-credit-display

Conversation

@developersdigest

@developersdigest developersdigest commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

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.

  • Adds separatelyBilledCredits to the receipt and prints a combined total with an outer/provider breakdown.
  • Keeps creditsUsed as the outer request charge and leaves nested provider receipts unchanged.
  • Only successful firecrawl/sql result envelopes with finite non-negative costs are counted; other payloads, failures, and invalid costs are ignored, while valid costs are retained when mixed with invalid ones.

Written for commit b89b1d4. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Comment thread src/utils/receipt.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@developersdigest
developersdigest merged commit 8d70e38 into main Sep 25, 2026
8 checks passed
@developersdigest
developersdigest deleted the fix/sql-nested-credit-display branch September 25, 2026 22:37
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.

1 participant