Skip to content

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
anthropics:mainfrom
petergoldstein:fix/security-guidance-model-refs
Open

security-guidance: update default model refs from Opus 4.7/Sonnet 4.6 to Opus 5/Sonnet 5#85409
petergoldstein wants to merge 1 commit into
anthropics:mainfrom
petergoldstein:fix/security-guidance-model-refs

Conversation

@petergoldstein

Copy link
Copy Markdown

Summary

  • The security-guidance plugin'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_MODEL default, 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 $/Mtok pricing rows for claude-opus-5 / claude-sonnet-5 used by the cost-rollup fallback (legacy rows kept for the same reason).
  • security_reminder_hook.py: doc-comment default.
  • README.md: example SECURITY_REVIEW_MODEL values and troubleshooting prose.
  • Note: the Anthropic API has no perpetual "latest" model alias, so these are fixed strings that will need bumping by hand again at the next model generation — left a comment in the README and in llm.py calling that out for future maintainers.

Test plan

  • python3 -m py_compile on all three modified hook modules — passes
  • grep'd the plugin directory to confirm no other stale opus-4-7/sonnet-4-6 default references were missed (remaining hits are intentional legacy allowlist/pricing-table entries and doc-comment examples, not defaults)
  • Manual smoke test of the Stop-hook / commit-review flow against a live API key (not run in this environment)

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant