[PR #104] feat: Add Custom Anthropic Model Option Support #120

Open
opened 2026-02-27 08:09:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/KeygraphHQ/shannon/pull/104
Author: @ibrahimsn98
Created: 2/9/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (2)

  • 3b3081f Add ANTHROPIC_MODEL env variable
  • 3b9b93d Update README.md to add Custom ANTHROPIC model

📊 Changes

4 files changed (+31 additions, -1 deletions)

View changed files

📝 .env.example (+8 -0)
📝 README.md (+21 -0)
📝 docker-compose.yml (+1 -0)
📝 src/ai/claude-executor.ts (+1 -1)

📄 Description

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.

---

<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
## 📋 Pull Request Information **Original PR:** https://github.com/KeygraphHQ/shannon/pull/104 **Author:** [@ibrahimsn98](https://github.com/ibrahimsn98) **Created:** 2/9/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`3b3081f`](https://github.com/KeygraphHQ/shannon/commit/3b3081fed7dda4289fb33811ea6add755bd4b8bd) Add ANTHROPIC_MODEL env variable - [`3b9b93d`](https://github.com/KeygraphHQ/shannon/commit/3b9b93d06699e832f2685cdb5d86dd8399b89da7) Update README.md to add Custom ANTHROPIC model ### 📊 Changes **4 files changed** (+31 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+8 -0) 📝 `README.md` (+21 -0) 📝 `docker-compose.yml` (+1 -0) 📝 `src/ai/claude-executor.ts` (+1 -1) </details> ### 📄 Description ## 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 ```bash # 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shannon-KeygraphHQ#120
No description provided.