From 9e23f6d9edee0708524d95cebf59dade71d50acc Mon Sep 17 00:00:00 2001 From: Lina Tawfik Date: Thu, 22 May 2025 07:17:18 -0700 Subject: [PATCH 1/2] feat: rename anthropic_model input to model with backward compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add new 'model' input parameter as the preferred way to specify the model - Keep 'anthropic_model' for backward compatibility with deprecation notice - Use expression syntax to prioritize 'model' over 'anthropic_model' - Update README documentation to reflect the change This allows existing workflows to continue working while encouraging migration to the cleaner 'model' parameter name. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- README.md | 3 ++- action.yml | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e3fab91..abf402d 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,8 @@ jobs: | `direct_prompt` | Direct prompt for Claude to execute automatically without needing a trigger (for automated workflows) | No | - | | `timeout_minutes` | Timeout in minutes for execution | No | `30` | | `github_token` | GitHub token for Claude to operate with. **Only include this if you're connecting a custom GitHub app of your own!** | No | - | -| `anthropic_model` | Model to use (provider-specific format required for Bedrock/Vertex) | No | `claude-3-7-sonnet-20250219` | +| `model` | Model to use (provider-specific format required for Bedrock/Vertex) | No | - | +| `anthropic_model` | **DEPRECATED**: Use `model` instead. Kept for backward compatibility. | No | `claude-3-7-sonnet-20250219` | | `use_bedrock` | Use Amazon Bedrock with OIDC authentication instead of direct Anthropic API | No | `false` | | `use_vertex` | Use Google Vertex AI with OIDC authentication instead of direct Anthropic API | No | `false` | | `allowed_tools` | Additional tools for Claude to use (the base GitHub tools will always be included) | No | "" | diff --git a/action.yml b/action.yml index b296023..f35e314 100644 --- a/action.yml +++ b/action.yml @@ -14,9 +14,12 @@ inputs: required: false # Claude Code configuration - anthropic_model: + model: description: "Model to use (provider-specific format required for Bedrock/Vertex)" required: false + anthropic_model: + description: "DEPRECATED: Use 'model' instead. Model to use (provider-specific format required for Bedrock/Vertex)" + required: false default: "claude-3-7-sonnet-20250219" allowed_tools: description: "Additional tools for Claude to use (the base GitHub tools will always be included)" @@ -98,14 +101,14 @@ runs: allowed_tools: ${{ env.ALLOWED_TOOLS }} disallowed_tools: ${{ env.DISALLOWED_TOOLS }} timeout_minutes: ${{ inputs.timeout_minutes }} - anthropic_model: ${{ inputs.anthropic_model }} + anthropic_model: ${{ inputs.model || inputs.anthropic_model }} mcp_config: ${{ steps.prepare.outputs.mcp_config }} use_bedrock: ${{ inputs.use_bedrock }} use_vertex: ${{ inputs.use_vertex }} anthropic_api_key: ${{ inputs.anthropic_api_key }} env: # Model configuration - ANTHROPIC_MODEL: ${{ inputs.anthropic_model }} + ANTHROPIC_MODEL: ${{ inputs.model || inputs.anthropic_model }} GITHUB_TOKEN: ${{ steps.prepare.outputs.GITHUB_TOKEN }} # AWS configuration From d15de3a8e38783027765c731ad06b21a6c8f8e2f Mon Sep 17 00:00:00 2001 From: Lina Tawfik Date: Thu, 22 May 2025 07:22:13 -0700 Subject: [PATCH 2/2] docs: update README examples to use 'model' parameter correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Show model parameter as optional comment for direct API examples - Keep model parameter required for Bedrock and Vertex AI examples - Demonstrates the default behavior when model is not specified 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index abf402d..bad88e9 100644 --- a/README.md +++ b/README.md @@ -256,7 +256,7 @@ Use a specific Claude model: ```yaml - uses: anthropics/claude-code-action@beta with: - anthropic_model: "claude-3-7-sonnet-20250219" + # model: "claude-3-5-sonnet-20241022" # Optional: specify a different model # ... other inputs ``` @@ -284,21 +284,20 @@ Use provider-specific model names based on your chosen provider: # For direct Anthropic API (default) - uses: anthropics/claude-code-action@beta with: - anthropic_model: "claude-3-7-sonnet-20250219" anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} # ... other inputs # For Amazon Bedrock with OIDC - uses: anthropics/claude-code-action@beta with: - anthropic_model: "anthropic.claude-3-7-sonnet-20250219-beta:0" # Cross-region inference + model: "anthropic.claude-3-7-sonnet-20250219-beta:0" # Cross-region inference use_bedrock: "true" # ... other inputs # For Google Vertex AI with OIDC - uses: anthropics/claude-code-action@beta with: - anthropic_model: "claude-3-7-sonnet@20250219" + model: "claude-3-7-sonnet@20250219" use_vertex: "true" # ... other inputs ``` @@ -324,7 +323,7 @@ Both AWS Bedrock and GCP Vertex AI require OIDC authentication. - uses: anthropics/claude-code-action@beta with: - anthropic_model: "anthropic.claude-3-7-sonnet-20250219-beta:0" + model: "anthropic.claude-3-7-sonnet-20250219-beta:0" use_bedrock: "true" # ... other inputs