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 -d
Enhanced 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.json with env.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.
Summary
AutoMaker currently does not support custom Anthropic API endpoints via the
ANTHROPIC_BASE_URLenvironment variable. This prevents users from using AutoMaker with:Root Cause
In
apps/server/src/providers/claude-provider.ts, theALLOWED_ENV_VARSallowlist explicitly filters environment variables passed to the Claude Agent SDK:The Claude Agent SDK (and underlying
@anthropic-ai/sdk) does supportANTHROPIC_BASE_URL- it's just being filtered out by AutoMaker before reaching the SDK.Proposed Solution
Minimal Fix (1 line)
Add
ANTHROPIC_BASE_URLto the allowlist:This would allow users to run AutoMaker with custom endpoints:
Enhanced Solution (Optional)
For a better UX, consider also adding:
ANTHROPIC_AUTH_TOKEN- For gateways that use different auth headersUse Cases
References
~/.claude/settings.jsonwithenv.ANTHROPIC_BASE_URL@anthropic-ai/sdkNote: Similar issues were searched before filing. This report was created with AI assistance.