diff --git a/agent/run.sh b/agent/run.sh index 810794ad..bd7747c9 100755 --- a/agent/run.sh +++ b/agent/run.sh @@ -30,7 +30,7 @@ Environment variables (required): AWS_REGION AWS region for Bedrock (e.g., us-east-1) Environment variables (optional): - ANTHROPIC_MODEL Model to use (default: us.anthropic.claude-sonnet-4-6) + ANTHROPIC_MODEL Model to use (unset: defer to the agent runtime default) DRY_RUN Set to 1 to validate config and print prompt without running the agent MAX_TURNS Max agent turns (default: 100) @@ -205,13 +205,15 @@ DOCKER_ARGS=( -e "CLAUDE_CODE_USE_BEDROCK=1" -e "AWS_REGION=${AWS_REGION}" -e "GITHUB_TOKEN=${GITHUB_TOKEN}" - -e "ANTHROPIC_MODEL=${ANTHROPIC_MODEL:-us.anthropic.claude-sonnet-4-6}" ) # Repo URL (may be empty in server mode — sent via payload) [[ -n "${REPO_URL}" ]] && DOCKER_ARGS+=(-e "REPO_URL=${REPO_URL}") -# Optional env vars +# Optional env vars. Pass each through only when the caller actually set it, so an +# unset variable leaves the agent runtime's own default (agent/src/config.py) intact +# instead of being shadowed by a second default defined here. +[[ -n "${ANTHROPIC_MODEL:-}" ]] && DOCKER_ARGS+=(-e "ANTHROPIC_MODEL=${ANTHROPIC_MODEL}") [[ -n "${ISSUE_NUMBER}" ]] && DOCKER_ARGS+=(-e "ISSUE_NUMBER=${ISSUE_NUMBER}") [[ -n "${TASK_DESCRIPTION}" ]] && DOCKER_ARGS+=(-e "TASK_DESCRIPTION=${TASK_DESCRIPTION}") [[ -n "${DRY_RUN:-}" ]] && DOCKER_ARGS+=(-e "DRY_RUN=${DRY_RUN}")