diff options
| author | Mohamed Hegazy <mhegazy@anthropic.com> | 2026-10-28 10:32:00 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-10-28 10:32:00 +0000 |
| commit | aa67609219635b7cac03bea3f22aed16381bc274 (patch) | |
| tree | 18f104a362c16cafb57ccaf5732029507655a9c3 /plugins/security-guidance/hooks/security_reminder_hook.py | |
| parent | f8c5e7a1dcb71b10cb74586224b5401f3de5db28 (diff) | |
security-guidance: treat a blank ANTHROPIC_BASE_URL as unsetfix/sg-blank-base-url
A set but empty value left the request URL as /v1/messages, so urllib raised and
every Stop, push and single-shot commit review failed. The SDK and Claude Code read a
blank value as the default endpoint; the plugin now does too.
Diffstat (limited to 'plugins/security-guidance/hooks/security_reminder_hook.py')
| -rwxr-xr-x | plugins/security-guidance/hooks/security_reminder_hook.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/security-guidance/hooks/security_reminder_hook.py b/plugins/security-guidance/hooks/security_reminder_hook.py index 3efe344e..88ed70c3 100755 --- a/plugins/security-guidance/hooks/security_reminder_hook.py +++ b/plugins/security-guidance/hooks/security_reminder_hook.py @@ -1385,7 +1385,7 @@ def _review_failure_reason(status): _RACE_TIMED_OUT. """ gateway = (", or an LLM gateway may need its key in ANTHROPIC_CUSTOM_HEADERS" - if os.environ.get("ANTHROPIC_BASE_URL") else "") + if os.environ.get("ANTHROPIC_BASE_URL", "").strip() else "") if status == _RACE_TIMED_OUT: return ("timeout", "the review did not finish in time", "") if llm._is_3p_provider(): |
