Skip to content

Commit bda3c4a

Browse files
juanpfloresclaude
andcommitted
Remove free-tier plan detection
The free-plan notice handling proved harder than expected; drop it from the prompts and the post-review hook for now. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent f7e3dc5 commit bda3c4a

4 files changed

Lines changed: 5 additions & 35 deletions

File tree

‎agents/code-reviewer.md‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ If CodeRabbit CLI install or authentication fails, report the exact failure, the
1919

2020
If CodeRabbit reports a rate limit, share the exact message, stop, and offer to re-run the review once the limit resets. Waiting for the limit is part of the workflow; a manual review is not a substitute.
2121

22-
If CodeRabbit mentions that the review is going to run on the free plan, the account may be signed in without the right organization, since organization membership is what unlocks the paid plan. Pause and ask the user whether to re-authenticate with the correct organization via `coderabbit auth login --agent` and re-run, or continue with the free review. Follow the user's choice.
23-
24-
This notice often arrives as a `status` event inside the agent output while the review is already running, for example a message saying the repository will be reviewed for free and no organization will be billed. When that happens, let the review finish, include the notice in the summary, and offer to re-authenticate with the right organization and re-run if the user expected an organization review.
25-
2622
## Use When
2723

2824
- The user asks to review current changes.

‎commands/coderabbit-review.md‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ coderabbit auth status --agent
3939

4040
Only continue after `coderabbit auth status --agent` succeeds.
4141

42-
If CodeRabbit mentions that the review is going to run on the free plan, the account may be signed in without the right organization, since organization membership is what unlocks the paid plan. Pause and ask the user whether to re-authenticate with the correct organization via `coderabbit auth login --agent` and re-run, or continue with the free review. Follow the user's choice.
43-
44-
This notice often arrives as a `status` event inside the agent output while the review is already running, for example a message saying the repository will be reviewed for free and no organization will be billed. When that happens, let the review finish, include the notice in the summary, and offer to re-authenticate with the right organization and re-run if the user expected an organization review.
45-
4642
## Build Review Command
4743

4844
Default to all changes:
@@ -71,7 +67,7 @@ Before using `-c`, confirm each file exists and is relevant to the review.
7167

7268
## Present Results
7369

74-
Parse CodeRabbit agent output. Ignore routine status events in the user-facing summary, but surface plan and billing notices, such as a status message saying the review runs for free or that no organization will be billed. If the CLI returns an error, report it directly and do not substitute a manual review. If the error is an install or authentication failure, guide the user through fixing the setup step by step, then resume the review once setup succeeds. If the error is a rate limit, share the exact message, stop, and offer to re-run the review once the limit resets.
70+
Parse CodeRabbit agent output. Ignore status events in the user-facing summary. If the CLI returns an error, report it directly and do not substitute a manual review. If the error is an install or authentication failure, guide the user through fixing the setup step by step, then resume the review once setup succeeds. If the error is a rate limit, share the exact message, stop, and offer to re-run the review once the limit resets.
7571

7672
## After The Review
7773

��hooks/post-review-context.mjs‎

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ function looksClean(toolOutput) {
4141
return /(raised|found|reported)\s+0\s+issues|"issues"\s*:\s*\[\s*\]|no issues found/i.test(toolOutput);
4242
}
4343

44-
function hasFreeTierNotice(toolOutput) {
45-
if (typeof toolOutput !== "string") {
46-
return false;
47-
}
48-
return /review it for free|no organization will be billed|free (oss )?limits apply|run(ning)? on the free plan/i.test(toolOutput);
49-
}
50-
5144
function statePath(input) {
5245
const key = String(input?.conversation_id || input?.generation_id || "global").replace(/[^A-Za-z0-9_-]/g, "");
5346
return path.join(os.tmpdir(), `coderabbit-clean-review-${key || "global"}.json`);
@@ -71,13 +64,9 @@ const toolName = input?.tool_name ?? "unknown";
7164
const command = input?.tool_input?.command;
7265
const snippet = typeof command === "string" ? command.slice(0, 100) : "";
7366

74-
const FREE_TIER_NOTE =
75-
" The output also includes a notice that this review ran on the free tier and no organization was billed. Surface that notice to the user; if they expected an organization review, offer to re-authenticate with the right organization via coderabbit auth login --agent and re-run the review.";
76-
7767
if (isCodeRabbitReviewCommand(command)) {
7868
const clean = looksClean(input?.tool_output);
79-
const freeTier = hasFreeTierNotice(input?.tool_output);
80-
log(`review-complete tool=${toolName} clean=${clean} freeTier=${freeTier} cmd=${snippet}`);
69+
log(`review-complete tool=${toolName} clean=${clean} cmd=${snippet}`);
8170

8271
if (clean) {
8372
try {
@@ -86,8 +75,7 @@ if (isCodeRabbitReviewCommand(command)) {
8675
// State is best-effort; the primary injection below still happens.
8776
}
8877
emit(
89-
"The CodeRabbit review for this request is complete and came back clean, meaning the changes passed review. Present a clean-result summary: what was reviewed (files changed, lines, scope), what it was checked for (bugs, security issues, code quality risks), confirmation that the changes passed, and suggested next steps such as running tests, committing, or opening a PR. Then finish the response there; the review request is fulfilled, so a second AI or manual pass over the same diff is not needed. Linters, type checkers, and tests remain available whenever the project workflow calls for them." +
90-
(freeTier ? FREE_TIER_NOTE : ""),
78+
"The CodeRabbit review for this request is complete and came back clean, meaning the changes passed review. Present a clean-result summary: what was reviewed (files changed, lines, scope), what it was checked for (bugs, security issues, code quality risks), confirmation that the changes passed, and suggested next steps such as running tests, committing, or opening a PR. Then finish the response there; the review request is fulfilled, so a second AI or manual pass over the same diff is not needed. Linters, type checkers, and tests remain available whenever the project workflow calls for them.",
9179
);
9280
} else {
9381
try {
@@ -96,8 +84,7 @@ if (isCodeRabbitReviewCommand(command)) {
9684
// No stale clean-state to clear.
9785
}
9886
emit(
99-
"The CodeRabbit review for this request is complete. Present the parsed results grouped by severity and finish the response there; the review request is fulfilled. A second AI or manual pass over the same diff is not needed. Linters, type checkers, and tests remain available whenever the project workflow calls for them." +
100-
(freeTier ? FREE_TIER_NOTE : ""),
87+
"The CodeRabbit review for this request is complete. Present the parsed results grouped by severity and finish the response there; the review request is fulfilled. A second AI or manual pass over the same diff is not needed. Linters, type checkers, and tests remain available whenever the project workflow calls for them.",
10188
);
10289
}
10390
process.exit(0);

‎skills/code-review/SKILL.md‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,6 @@ coderabbit auth status --agent
8787

8888
Only continue after authentication succeeds.
8989

90-
If CodeRabbit mentions that the review is going to run on the free plan, the account may be signed in without the right organization, since organization membership is what unlocks the paid plan. Pause and ask the user whether to:
91-
92-
1. Re-authenticate with the correct organization via `coderabbit auth login --agent`, then re-run the review.
93-
2. Continue with the free review as is.
94-
95-
Follow the user's choice before running or continuing the review.
96-
97-
This notice often arrives as a `status` event inside the agent output while the review is already running, for example: `"This looks like a public open-source repository. CodeRabbit will review it for free, and no organization will be billed. Free OSS limits apply."` When that happens, let the review finish, include the notice in the summary, and offer to re-authenticate with the right organization and re-run if the user expected an organization review.
98-
9990
## Run Review
10091

10192
Default review:
@@ -130,7 +121,7 @@ If `AGENTS.md`, `cursor.md`, or `.coderabbit.yaml` exists in the repository root
130121

131122
- Parse agent-readable CodeRabbit output.
132123
- Collect issues and group them by severity.
133-
- Ignore routine status events in the user-facing summary, but surface plan and billing notices, such as a status message saying the review runs for free or that no organization will be billed.
124+
- Ignore status events in the user-facing summary.
134125
- If an error event or CLI failure occurs, report the exact failure and next step.
135126
- If the review fails, help the user fix the CodeRabbit setup rather than substituting a manual review.
136127
- If CodeRabbit reports a rate limit, share the exact message and stop. Offer to re-run the review once the limit resets, including any reset time the message provides. A manual review is not a substitute while waiting.

0 commit comments

Comments
 (0)