Skip to content

fix: validate API access with the configured Claude model - #149

Open
00200200 wants to merge 1 commit into
anthropics:mainfrom
00200200:codex/security-validation-model
Open

00200200 wants to merge 1 commit into
anthropics:mainfrom
00200200:codex/security-validation-model

Conversation

@00200200

Copy link
Copy Markdown

Summary

ClaudeAPIClient.validate_api_access() used the retired claude-3-5-haiku-20241022 model for its health check, so every run could disable Claude-based false-positive filtering even when the configured analysis model was available.

This changes the health check to use self.model and adds a regression test that verifies the configured model is passed to the SDK.

Fixes #139

Validation

  • python3 -m pytest -q claudecode — 174 passed
  • python3 -m ruff check claudecode/test_claude_api_validation.py — passed
  • python3 -m py_compile claudecode/claude_api_client.py claudecode/test_claude_api_validation.py — passed
  • git diff --check — passed

The existing claudecode/claude_api_client.py has unrelated repository-wide Ruff findings; this PR does not reformat that file.

Codex assistance was used to investigate and prepare this change. No live or paid API calls were made.

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.

validate_api_access() hardcodes retired claude-3-5-haiku-20241022, silently disabling false-positive filtering

1 participant