You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The previous DEFAULT_MAX_DIFF_CHARS (400k chars / ~100k tokens) was sized
for 200k-token context models. Both Opus 4.7 and Sonnet 4.6 now expose a
1M context window, so double the default to 800k chars (~200k tokens),
which still leaves ~5x context headroom for system prompt, tools,
thinking, and output.
Also wire get_pr_data's fallback default to DEFAULT_MAX_DIFF_CHARS so
the constant is the single source of truth, refresh the action.yml and
README guidance for 1M-context defaults, and clarify the
PROMPT_TOKEN_LIMIT comment (it caps filter/validator output, not input).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,9 +111,9 @@ This action is not hardened against prompt injection attacks and should only be
111
111
| `comment-pr` | Whether to comment on PRs with findings | `true` | No |
112
112
| `upload-results` | Whether to upload results as artifacts | `true` | No |
113
113
| `exclude-directories` | Comma-separated list of directories to exclude from scanning | None | No |
114
-
| `claude-model` | Claude [model name](https://docs.anthropic.com/en/docs/about-claude/models/overview#model-names) to use. Defaults to Opus 4.7. For large PRs (>400k char diffs), consider using `claude-sonnet-4-6` (1M context). | `claude-opus-4-7` | No |
114
+
| `claude-model` | Claude [model name](https://docs.anthropic.com/en/docs/about-claude/models/overview#model-names) to use. Defaults to Opus 4.7 (1M context). For very large PRs or to reduce cost, consider `claude-sonnet-4-6` (also 1M context, faster and cheaper). | `claude-opus-4-7` | No |
115
115
| `claudecode-timeout` | Timeout for ClaudeCode analysis in minutes | `20` | No |
116
-
| `max-diff-chars` | Maximum diff characters to include in prompt. Set to `0` for agentic mode (Claude uses git commands to explore). See [Diff Size Configuration](#diff-size-configuration) below. | `400000` | No |
116
+
| `max-diff-chars` | Maximum diff characters to include in prompt. Set to `0` for agentic mode (Claude uses git commands to explore). See [Diff Size Configuration](#diff-size-configuration) below. | `800000` | No |
117
117
| `max-diff-lines` | **[DEPRECATED]** Use `max-diff-chars` instead. Converts lines to chars (line × 80). | None | No |
118
118
| `run-every-commit` | Run ClaudeCode on every commit (skips cache check). Warning: May increase false positives on PRs with many commits. **Deprecated**: Use `trigger-on-commit` instead. | `false` | No |
119
119
| `trigger-on-open` | Run review when PR is first opened | `true` | No |
@@ -146,7 +146,7 @@ The action handles PRs of any size using three review modes:
146
146
1. **Full Diff Mode** (default for small PRs)
147
147
- Entire diff embedded in prompt
148
148
- Fastest and most comprehensive
149
-
- Works for diffs up to ~400k characters
149
+
- Works for diffs up to ~800k characters
150
150
151
151
2. **Partial Diff Mode** (automatic for large PRs)
152
152
- First N files embedded in prompt
@@ -160,21 +160,20 @@ The action handles PRs of any size using three review modes:
160
160
161
161
#### Configuration
162
162
163
-
**`max-diff-chars`** - Maximum diff characters to embed (default: 400,000)
163
+
**`max-diff-chars`** - Maximum diff characters to embed (default: 800,000)
0 commit comments