Probe hidden Fable quota for Claude routing#44
Conversation
|
Warning Review limit reached
Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 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: 2dbad97eed
ℹ️ 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".
| body := bytes.NewBufferString(`{"model":"` + FableModel + `","max_tokens":1,"messages":[{"role":"user","content":"."}]}`) | ||
| req, err := http.NewRequestWithContext(ctx, http.MethodPost, messagesURL, body) |
There was a problem hiding this comment.
Avoid sending real Fable messages for usage probes
When the OAuth usage endpoint omits the Fable bucket, every fresh status/score fetch falls through to this path and issues a real POST /v1/messages with max_tokens:1. For healthy accounts that request can generate a completion, incur cost, and consume the same Fable quota the router is only trying to observe; with the 2-minute usage-window TTL, dashboard/status polling or reloads can keep spending quota without user traffic. Consider making this passive/opt-in or using a non-generating signal before probing with a billable message.
Useful? React with 👍 / 👎.
| ResetAfterSeconds: window.ResetAfterSeconds, | ||
| Feature: window.Feature, | ||
| }) | ||
| if provider == accounts.ProviderClaude && hasFableWindow && window.Feature == "" { |
There was a problem hiding this comment.
Copy only account-wide windows into the Fable score
When a Claude response includes a Fable window and also opus-weekly or sonnet-weekly, those windows still have an empty Feature, so this condition copies them into the claude-fable-5 model pool. In that scenario an exhausted Opus/Sonnet weekly bucket makes ForModel("claude-fable-5") score the account as unusable even if the Fable and shared 5h/7d buckets are healthy. Restrict the copy to truly shared windows, or tag Opus/Sonnet with their own features before building model scores.
Useful? React with 👍 / 👎.
Summary
Fable wkinsrstatusclaude-fable-5with the hidden Fable weekly pool plus normal Claude session/weekly pools, without cooking non-Fable Claude models on the Fable-only bucketTests
go test ./...Root cause
Anthropic can reject Fable with
anthropic-ratelimit-unified-7d_oi-status: rejectedwhile/api/oauth/usagestill shows ordinary Claude weekly quota. The scheduler only saw the ordinary usage endpoint, so it kept selecting accounts that were exhausted for Fable.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Probe Anthropic Messages headers to detect the hidden Fable OAuth‑app weekly quota and use it for routing. Show it as “Fable wk” in
sr, and score/routeclaude-fable-5against this bucket without affecting other Claude models.New Features
/v1/messagesprobe to read header quotas and backfill theoauth-apps-weeklywindow when/api/oauth/usageomits it.srand label the window with Featureclaude-fable-5.claude-fable-5while keeping other Claude models independent.Bug Fixes
7d_oirejected as 100% used.Written for commit 2dbad97. Summary will update on new commits.