Repository navigation
Price Cursor Grok and Composer list-price estimates - #5240
Chipagosfinest wants to merge 10 commits into
Conversation
Estimate omitted totalCents for Grok via models.dev xai (bundled fallback) and Composer via Cursor published rates without overriding vendor cents. Co-authored-by: Cursor <cursoragent@cursor.com>
|
🦞👀 ClawSweeper review completeClawSweeper finished reviewing this revision. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR adds Grok and Composer list-price estimates for Cursor events whose reported cost is missing. Example: A composer-2.5 event omits totalCents and contains 100 input, 200 cached-read, and 50 output tokens.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR adds useful model coverage absent from main, and no definite implementation defect was found; the repository policy also prohibits automatic closure. Reviewed head: Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherCursor usage events from dashboard requests or local JSON enter the daily report builder, which preserves reported costs and estimates omitted costs before returning model and daily spend totals. flowchart TD
A[Cursor dashboard events] --> C[Daily report builder]
B[Local Cursor JSON] --> C
C --> D[Reported cost state]
D --> E[Existing Codex and Claude pricing]
E --> F[xAI catalog and bundled model rates]
D --> G[Daily and model spend reports]
F --> G
Technical reviewBest possible solution: If the owner accepts the expanded model coverage, retain the focused provider-local rates and existing shared cost arithmetic with clearly labeled list-price estimates. Do we have a high-confidence way to reproduce the issue? Current-main routing lacks xAI and Composer fallback prices, and the supplied red tests show the resulting nil costs; no target code was executed during this read-only review. Is this the best way to solve the issue? The implementation reuses shared provider pricing and token arithmetic while keeping bundled rows local to Cursor, making it a focused approach if the owner accepts the added coverage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a26ca57b5186. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed December 1, 2026, 5:50 PM ET / 22:50 UTC. |
Move the new suite out of CursorUsageEventsFetcherTests and drop redundant nil coalescing so SwiftLint type_body_length and redundant_nil_coalescing stay clean. Co-authored-by: Cursor <cursoragent@cursor.com>
Store non-optional model costs in the bundled-rate assertion map so Swift can type-check the approxEqual helpers on CI. Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid Dictionary(uniqueKeysWithValues:) inference failures on Xcode 27 by reading model breakdowns directly. Co-authored-by: Cursor <cursoragent@cursor.com>
Annotate the Grok models.dev xai lookup as provider-specific by design so the cross-provider cluster gatekeeper accepts the Cursor estimate path. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Verify public Grok and Composer list prices, cover the exact 200K prompt boundary in both pricing routes, and preserve released Codex cache compatibility. Remove committed proof artifacts and document the estimate boundary.
Regenerate the parser hash from the combined source and retain cache migration coverage for both parent hashes, preserving native rows and scan checkpoints.
Summary
totalCentsevents for Grok (grok-4.5/grok-4.6/grok-4.7) through models.devxaiwith bundled public list-price fallback.composer-2.5,composer-2.5-fast) uses Cursor published list prices (models.dev has no composer entry); vendor-suppliedtotalCentsincluding zero is never overridden..github/pr-proof/cursor-grok-composer-estimate-*.Test plan
totalCentsforgrok-4.6/composer-2.5yieldedcostUSD == nil(.github/pr-proof/cursor-grok-composer-estimate-before-summary.txt)CODEXBAR_CORE_ONLY_TESTS=1 swift test --filter CursorUsageEventsFetcherTests→ 36 tests passed (CLT-only local harness; full Xcode unavailable on this agent host)swiftformaton touched Swift filesswiftlint --strict/make checkneed full Xcode (SourceKit/actool); please rely on CIMade with Cursor