Skip to content

Comments

feat: Add Custom Anthropic Model Option Support#104

Open
ibrahimsn98 wants to merge 2 commits intoKeygraphHQ:mainfrom
ibrahimsn98:main
Open

feat: Add Custom Anthropic Model Option Support#104
ibrahimsn98 wants to merge 2 commits intoKeygraphHQ:mainfrom
ibrahimsn98:main

Conversation

@ibrahimsn98
Copy link

Add Configurable Claude Model via Environment Variable

Problem

The Claude model was hardcoded to claude-sonnet-4-5-20250929 in src/ai/claude-executor.ts. Users with custom Anthropic-compatible endpoints
(proxies, API gateways, or alternative deployments) had no way to specify a different model name, even when their endpoint required it.

Solution

Introduce the ANTHROPIC_MODEL environment variable that allows users to override the default model. This works seamlessly with the existing
ANTHROPIC_BASE_URL support, enabling full customization of both the endpoint and the model.

Changes

File Change
src/ai/claude-executor.ts Use process.env.ANTHROPIC_MODEL with fallback to default model
docker-compose.yml Pass ANTHROPIC_MODEL environment variable to worker container
.env.example Add "Option 3" documentation for custom endpoint + model configuration
README.md Add "Custom Anthropic Endpoint" section with usage instructions

Usage

# In .env
ANTHROPIC_API_KEY=your-api-key
ANTHROPIC_BASE_URL=https://your-custom-endpoint.com  # Optional
ANTHROPIC_MODEL=claude-sonnet-4-5-20250929              # Optional

# Run
./shannon start URL=https://example.com REPO=/path/to/repo

If ANTHROPIC_MODEL is not set, the default claude-sonnet-4-5-20250929 is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant