-
Notifications
You must be signed in to change notification settings - Fork 489
Labels
EnhancementImprovements to existing functionality or UI.Improvements to existing functionality or UI.
Description
Summary
AutoMaker currently does not support custom Anthropic API endpoints via the ANTHROPIC_BASE_URL environment variable. This prevents users from using AutoMaker with:
- LLM gateways (LiteLLM, Helicone, etc.)
- Anthropic-compatible providers (GLM 4.7, Minimax M2.1, Z.AI, etc.)
- Corporate proxies with custom authentication
- Self-hosted deployments with regional endpoints
Root Cause
In apps/server/src/providers/claude-provider.ts, the ALLOWED_ENV_VARS allowlist explicitly filters environment variables passed to the Claude Agent SDK:
// Line 20-29
const ALLOWED_ENV_VARS = [
'ANTHROPIC_API_KEY',
'PATH',
'HOME',
'SHELL',
'TERM',
'USER',
'LANG',
'LC_ALL',
];The Claude Agent SDK (and underlying @anthropic-ai/sdk) does support ANTHROPIC_BASE_URL - it's just being filtered out by AutoMaker before reaching the SDK.
Proposed Solution
Minimal Fix (1 line)
Add ANTHROPIC_BASE_URL to the allowlist:
const ALLOWED_ENV_VARS = [
'ANTHROPIC_API_KEY',
'ANTHROPIC_BASE_URL', // ← Add this
'PATH',
'HOME',
// ...
];This would allow users to run AutoMaker with custom endpoints:
ANTHROPIC_API_KEY=your-key \
ANTHROPIC_BASE_URL=https://your-gateway.example.com/v1 \
docker-compose up -dEnhanced Solution (Optional)
For a better UX, consider also adding:
ANTHROPIC_AUTH_TOKEN- For gateways that use different auth headers- Settings UI integration - Allow configuring the endpoint in the settings panel
Use Cases
- LLM Gateway Integration: Route through LiteLLM, Helicone, or similar for logging/caching
- Alternative Providers: Use Anthropic-compatible APIs like GLM 4.7, Minimax M2.1
- Enterprise Deployments: Corporate proxies with custom authentication
- Regional Endpoints: Self-hosted or regional API deployments
References
- Claude Code supports this via
~/.claude/settings.jsonwithenv.ANTHROPIC_BASE_URL - Claude Code LLM Gateway docs
- The Claude Agent SDK inherits this from
@anthropic-ai/sdk
Note: Similar issues were searched before filing. This report was created with AI assistance.
theghostbel, cryagent, na8r, EurythmicBeast and jmvl
Metadata
Metadata
Assignees
Labels
EnhancementImprovements to existing functionality or UI.Improvements to existing functionality or UI.