Add Support for Custom Anthropic API Base URL and Authentication Token #59
Open
nikhillalkota wants to merge 2 commits intoanthropics:mainfrom
Open
Add Support for Custom Anthropic API Base URL and Authentication Token #59nikhillalkota wants to merge 2 commits intoanthropics:mainfrom
nikhillalkota wants to merge 2 commits intoanthropics:mainfrom
Conversation
danielpops
reviewed
Jan 27, 2026
danielpops
left a comment
There was a problem hiding this comment.
I was going to implement something similar :) thanks for this :)
|
LGTM, can anyone help review this PR? as this repo can provide security scan for open source community code repos, and I suppose ANTHROPIC_BASE_URL is good for different community with different LLM provider. |
SamYuan1990
approved these changes
Feb 28, 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
This PR adds support for routing Claude API requests through custom proxy servers, specifically tested with LiteLLM proxy. This enables organizations to use their existing API gateway infrastructure, implement custom rate limiting, add monitoring/logging, and manage costs centrally.
Changes Made
Added two new optional inputs:
anthropic-base-url:
description: 'Custom Anthropic API base URL (e.g., for LiteLLM proxy: https://litellm.prod.example.com)'
required: false
default: ''
anthropic-auth-token:
description: 'Alternative authentication token (use instead of claude-api-key for LiteLLM)'
required: false
default: ''
These inputs are passed to the audit script via environment variables (action.yml:260-261):
Modified ClaudeAPIClient.init():
Modified FindingsFilter.init():
Enhanced authentication validation:
Modified initialize_findings_filter():
Modified validate_claude_available() (github_action_audit.py:327-329):
Added new section demonstrating LiteLLM proxy usage:
with:
comment-pr: true
anthropic-base-url: https://litellm.proxy.example.com
anthropic-auth-token: ${{ secrets.LITELLM_TOKEN }}
Updated configuration table to document both new parameters
Breaking Changes
None. All changes are backward compatible. Existing workflows using only claude-api-key continue to work unchanged.