-
Notifications
You must be signed in to change notification settings - Fork 723
Support Anthropic-compatible base URL override #336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
octo-patch
wants to merge
2
commits into
frankbria:main
from
octo-patch:octopatch/minimax-provider-recvoLiru6kgr0
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: frankbria/ralph-claude-code
Length of output: 197
🏁 Script executed:
Repository: frankbria/ralph-claude-code
Length of output: 3100
🌐 Web query:
Claude Code CLI --anthropic-base-url option supported flag base url documentation💡 Result:
Claude Code CLI does not provide a command-line flag named --anthropic-base-url [1][2]. Instead, custom API endpoints are configured exclusively via the ANTHROPIC_BASE_URL environment variable [3][4][5]. You can set this variable in your shell for a single session, as a persistent environment variable, or within the Claude Code settings file [4][5][6]. Configuration Methods: 1. Shell Environment (Temporary): export ANTHROPIC_BASE_URL=https://your-gateway.example.com export ANTHROPIC_AUTH_TOKEN=your-gateway-key 2. Settings File (Persistent): You can define the variable in your ~/.claude/settings.json file using an env block: { "env": { "ANTHROPIC_BASE_URL": "https://your-gateway.example.com", "ANTHROPIC_AUTH_TOKEN": "your-gateway-key" } } Key Details: - Purpose: ANTHROPIC_BASE_URL is used to point the CLI toward LLM gateways, corporate proxies, or local mock servers [4][5][6]. - Authentication: When using a custom base URL, you typically use ANTHROPIC_AUTH_TOKEN to provide the necessary authorization credentials instead of the standard ANTHROPIC_API_KEY [4][7]. - Priority: If both a shell export and a settings-file entry are present, the settings-file value generally takes precedence [4]. You can verify which URL is being used by running the /status command within the Claude Code CLI [4].
Citations:
Use
ANTHROPIC_BASE_URLinstead of--anthropic-base-urlClaude CLI doesn’t expose a
--anthropic-base-urlflag; custom endpoints need to be passed viaANTHROPIC_BASE_URLin the process environment (or settings file), otherwise custom-provider runs will fail at startup.🤖 Prompt for AI Agents