From 3dd39077982eb5f66368241a3134479ad5c6e35d Mon Sep 17 00:00:00 2001 From: graychoi Date: Sat, 19 Jul 2025 14:27:49 +0900 Subject: [PATCH] fix: add model parameter support to base-action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add model field to ClaudeOptions type - Pass ANTHROPIC_MODEL env var to runClaude function - Handle --model argument in prepareRunConfig This allows the model specified in action.yml to be properly passed to the Claude CLI command. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- base-action/src/index.ts | 1 + base-action/src/run-claude.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/base-action/src/index.ts b/base-action/src/index.ts index 24e0b42..ac6fc6f 100644 --- a/base-action/src/index.ts +++ b/base-action/src/index.ts @@ -26,6 +26,7 @@ async function run() { appendSystemPrompt: process.env.INPUT_APPEND_SYSTEM_PROMPT, claudeEnv: process.env.INPUT_CLAUDE_ENV, fallbackModel: process.env.INPUT_FALLBACK_MODEL, + model: process.env.ANTHROPIC_MODEL, }); } catch (error) { core.setFailed(`Action failed with error: ${error}`); diff --git a/base-action/src/run-claude.ts b/base-action/src/run-claude.ts index c6e2433..70e38d7 100644 --- a/base-action/src/run-claude.ts +++ b/base-action/src/run-claude.ts @@ -21,6 +21,7 @@ export type ClaudeOptions = { claudeEnv?: string; fallbackModel?: string; timeoutMinutes?: string; + model?: string; }; type PreparedConfig = { @@ -94,6 +95,9 @@ export function prepareRunConfig( if (options.fallbackModel) { claudeArgs.push("--fallback-model", options.fallbackModel); } + if (options.model) { + claudeArgs.push("--model", options.model); + } if (options.timeoutMinutes) { const timeoutMinutesNum = parseInt(options.timeoutMinutes, 10); if (isNaN(timeoutMinutesNum) || timeoutMinutesNum <= 0) {