security-guidance: update default model refs from Opus 4.7/Sonnet 4.6 to Opus 5/Sonnet 5 - #85409
Open
petergoldstein wants to merge 1 commit into
Open
Conversation
…t 4.6 to Opus 5/Sonnet 5 The plugin's default review model was pinned to now-outdated Claude Opus 4.7 (and a Sonnet 4.6 fallback), in both the README and the hardcoded defaults in the hook code. Updates all of it to the current Opus 5 / Sonnet 5 models: - llm.py: SECURITY_REVIEW_MODEL default, dual-OR sonnet fallback legs, agentic reviewer default, and the adaptive-thinking model allowlist (legacy entries kept so pinning an older model via env var still works correctly) - _base.py: added pricing rows for claude-opus-5 / claude-sonnet-5 (legacy rows kept for the same reason) - security_reminder_hook.py: doc comment default - README.md: example env values and troubleshooting prose The Anthropic API has no perpetual "latest" model alias, so these remain fixed strings that will need bumping again at the next model generation — left a note in the README and in llm.py to make that clear for future maintainers.
This was referenced Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
security-guidanceplugin's README and hook code hardcoded references to now-outdated Claude models (Opus 4.7 as the default review model, Sonnet 4.6 as the fallback/cheaper-model example). Updates all of them to the current Opus 5 / Sonnet 5.llm.py:SECURITY_REVIEW_MODELdefault, the dual-OR sonnet fallback legs, the agentic commit-reviewer default, and the adaptive-thinking model allowlist (legacy entries kept so pinning an older model via env var still resolves correctly)._base.py: added$/Mtokpricing rows forclaude-opus-5/claude-sonnet-5used by the cost-rollup fallback (legacy rows kept for the same reason).security_reminder_hook.py: doc-comment default.README.md: exampleSECURITY_REVIEW_MODELvalues and troubleshooting prose.llm.pycalling that out for future maintainers.Test plan
python3 -m py_compileon all three modified hook modules — passesgrep'd the plugin directory to confirm no other staleopus-4-7/sonnet-4-6default references were missed (remaining hits are intentional legacy allowlist/pricing-table entries and doc-comment examples, not defaults)