Skip to content

Add native Go pricing package - #658

Merged
Kludex merged 8 commits into
mainfrom
codex/add-go-package
Aug 31, 2026
Merged

Add native Go pricing package#658
Kludex merged 8 commits into
mainfrom
codex/add-go-package

Conversation

@Kludex

@Kludex Kludex commented Aug 31, 2026

Copy link
Copy Markdown
Member

Adds a nested Go module at packages/go with embedded generated pricing data, model/provider matching, usage extraction, tiered and conditional pricing, and forward-compatible warnings. The shared 1,577-response dataset verifies parity with the Python and JavaScript implementations, and CI now formats, lints, race-tests, and covers the Go package.

Closes #407.

AI Disclaimer

This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.

Review in cubic

@macroscopeapp

macroscopeapp Bot commented Aug 31, 2026

Copy link
Copy Markdown

Macroscope skipped reviewing this pull request. Per-review cost limit exceeded (workspace setting).

This review would cost an estimated $27.33, which exceeds your per-review limit of $10.00.

The top 3 files driving up this estimate:

File Diff Size Estimate
packages/go/internal/data/prices.json 464.24KB $23.21
packages/go/data_units.go 19.94KB $1.00
packages/go/types.go 12.19KB $0.61

Tip

To get this pull request reviewed, you can:

  1. Comment @macroscope-app on this PR to request a manual review (monthly spend limits still apply).
  2. Exclude the file(s) above from review by adding a pattern to your .macroscope/ignore.md — note that creating this file replaces Macroscope's built-in default ignores rather than extending them.
  3. Raise your cost limit in your workspace billing settings.

Turn off this reminder going forward

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

Copy link
Copy Markdown

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 27 files

Not reviewed (too large): packages/go/internal/data/prices.json (~1 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/go/calculator.go
Comment thread packages/go/calculator.go
Comment thread packages/go/types.go
Comment thread packages/go/types.go
Comment thread packages/go/calculator.go Outdated
Comment thread packages/go/price.go Outdated
Comment thread packages/go/price.go
Comment thread packages/go/dataset_test.go
Comment thread .github/workflows/ci.yml Outdated
Comment thread packages/go/dataset_test.go Outdated

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

Copy link
Copy Markdown

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 17 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/go/extract.go
Comment thread packages/go/extract.go
Comment thread packages/go/calculator.go Outdated
@Kludex

Kludex commented Aug 31, 2026

Copy link
Copy Markdown
Member Author

@macroscope-app review please

@macroscopeapp

macroscopeapp Bot commented Aug 31, 2026

Copy link
Copy Markdown

Manual reviews triggered for commit 92a7cf5:

All prior checks · these links stay valid even if you push more commits.

@macroscopeapp

macroscopeapp Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review started; results will be posted as checks.

Comment thread packages/go/README.md
Comment thread packages/go/price.go
Comment thread packages/go/price.go
Comment thread packages/go/types.go
Comment thread packages/go/internal/data/prices.json Outdated
Comment thread packages/go/extract.go Outdated
Comment thread packages/go/calculator.go
Comment thread packages/go/internal/data/prices.json Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 31, 2026

Copy link
Copy Markdown

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces a substantial production-facing Go pricing and usage-extraction module, including new runtime logic, embedded data, and billing-related calculations, rather than a bounded maintenance change. It also modifies Macroscope configuration and has unresolved medium/high findings concerning pricing accuracy, overflow handling, provider matching, and download behavior.

Not approved because:

  • automatic approval is not enabled for this workspace
  • 8 blocking correctness issues found at or above your repo's Minimum Blocking Severity

Enable approvability here. Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

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

Copy link
Copy Markdown

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 2 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread .github/workflows/ci.yml Outdated

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

Copy link
Copy Markdown

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 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread packages/go/api_test.go Outdated
@Kludex
Kludex merged commit 00b022d into main Aug 31, 2026
19 checks passed
@Kludex
Kludex deleted the codex/add-go-package branch August 31, 2026 08:36
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.

Add Go package support for native LLM cost calculation in Go agents

1 participant