Fix #524: prevent retired models from inheriting reseller pricing - #527
Fix #524: prevent retired models from inheriting reseller pricing#527willwashburn wants to merge 7 commits into
Conversation
|
Warning Review limit reached
Next review available in: 56 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe change protects retired first-party models from reseller pricing, loads ledger-local pricing overrides, and reports unpriced turns and models in summaries. It adds model catalog maintenance, regression tests, changelog notes, and updated CLI fixtures. ChangesPricing and unpriced usage
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39617925da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
All reported issues were addressed across 11 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 13 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/relayburn-sdk/src/query_verbs/summary/mod.rs">
<violation number="1" location="crates/relayburn-sdk/src/query_verbs/summary/mod.rs:624">
P2: Human `summary --bucket` output still silently presents unpriced buckets as `$0`. Include an unpriced-turn indicator or warning in the time-series renderer when `bucket.unpriced_turns > 0`, matching the grouped-summary warning.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Line 8: Update the changelog entry to state that protected first-party models,
including codex-auto-review, are treated as unpriced rather than inheriting any
reseller tariff, regardless of cache-rate completeness; retain the explicit
models.dev.json pricing override and keep the wording concise and impact-first.
In `@tests/fixtures/cli-golden/snapshots/summary.stderr.txt`:
- Around line 1-2: Update the warning text generated by load_pricing_for_ledger
to reference the active ledger home rather than RELAYBURN_HOME, instructing
users to add the override at the resolved ledger directory’s models.dev.json
path. Refresh the affected CLI golden snapshot accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 73ff9e44-46b4-402a-b1e7-40b0b1855380
📒 Files selected for processing (19)
CHANGELOG.mdcrates/relayburn-cli/src/commands/summary/json.rscrates/relayburn-cli/src/commands/summary/mod.rscrates/relayburn-sdk/data/primary-model-ids.jsoncrates/relayburn-sdk/src/analyze/pricing.rscrates/relayburn-sdk/src/query_verbs/compare.rscrates/relayburn-sdk/src/query_verbs/flow.rscrates/relayburn-sdk/src/query_verbs/hotspots.rscrates/relayburn-sdk/src/query_verbs/mod.rscrates/relayburn-sdk/src/query_verbs/overhead.rscrates/relayburn-sdk/src/query_verbs/sessions.rscrates/relayburn-sdk/src/query_verbs/summary/mod.rscrates/relayburn-sdk/src/query_verbs/tests.rsscripts/update-pricing.mjstests/fixtures/cli-golden/snapshots/state-status-json.stdout.txttests/fixtures/cli-golden/snapshots/state-status.stdout.txttests/fixtures/cli-golden/snapshots/summary-json.stdout.txttests/fixtures/cli-golden/snapshots/summary.stderr.txttests/fixtures/cli-golden/snapshots/summary.stdout.txt
Retired first-party models now report as unpriced when their authoritative provider removes them from the bundled snapshot. Reseller tariffs are accepted only for model IDs that have never appeared under a primary pricing provider.
The bundled append-only ownership catalog is seeded from the pre-refresh and current snapshots. Pricing refreshes union retained, outgoing, and incoming primary-provider IDs, while a Rust synchronization test rejects snapshot changes that omit a current primary model from the catalog. The internal codex-auto-review alias is protected from future direct reseller entries.
Every production query verb loads the authoritative models.dev.json override adjacent to the active ledger. This makes $RELAYBURN_HOME/models.dev.json effective for the CLI and preserves custom ledger homes for embedders. User overrides can explicitly restore rates for retired models.
The honest unpriced path covers all 29 retired-primary reseller fallbacks without changing reseller-exclusive models. Grouped summaries expose unpriced turns and models, summary buckets expose unpricedTurns, and compare retains its existing per-cell turns versus pricedTurns signal.
Golden summary output reports gpt-5-codex at zero cost with explicit unpricedTurns and unpricedModels fields and a human warning. Current Claude first-party rows remain unchanged. Two stale state-status snapshots now match the existing schema version 6.
Fixes #524
Fixes #509
🤖 Generated with Claude Code.