From 5225f7752f7f507ee1d51c3210dcedacf80a7642 Mon Sep 17 00:00:00 2001 From: romracer Date: Tue, 7 Oct 2025 09:36:27 -0500 Subject: [PATCH 1/3] Pass ARG_COPILOT_MODEL to install.sh --- registry/coder-labs/modules/copilot/main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/registry/coder-labs/modules/copilot/main.tf b/registry/coder-labs/modules/copilot/main.tf index fd93b048f..c6436f3e3 100644 --- a/registry/coder-labs/modules/copilot/main.tf +++ b/registry/coder-labs/modules/copilot/main.tf @@ -295,6 +295,7 @@ module "agentapi" { ARG_COPILOT_CONFIG='${base64encode(local.final_copilot_config)}' \ ARG_EXTERNAL_AUTH_ID='${var.external_auth_id}' \ ARG_COPILOT_VERSION='${var.copilot_version}' \ + ARG_COPILOT_MODEL='${var.copilot_model}' \ /tmp/install.sh EOT } \ No newline at end of file From 2e9b16374a53e642041c9bcc6bc97d4f53a1cc88 Mon Sep 17 00:00:00 2001 From: romracer Date: Tue, 7 Oct 2025 09:37:26 -0500 Subject: [PATCH 2/3] Reference the passed in ARG_COPILOT_MODEL --- registry/coder-labs/modules/copilot/scripts/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/registry/coder-labs/modules/copilot/scripts/install.sh b/registry/coder-labs/modules/copilot/scripts/install.sh index f44d50873..d300ddb8d 100644 --- a/registry/coder-labs/modules/copilot/scripts/install.sh +++ b/registry/coder-labs/modules/copilot/scripts/install.sh @@ -14,6 +14,7 @@ ARG_MCP_CONFIG=$(echo -n "${ARG_MCP_CONFIG:-}" | base64 -d 2> /dev/null || echo ARG_COPILOT_CONFIG=$(echo -n "${ARG_COPILOT_CONFIG:-}" | base64 -d 2> /dev/null || echo "") ARG_EXTERNAL_AUTH_ID=${ARG_EXTERNAL_AUTH_ID:-github} ARG_COPILOT_VERSION=${ARG_COPILOT_VERSION:-0.0.334} +ARG_COPILOT_MODEL=${ARG_COPILOT_MODEL:-claude-sonnet-4.5} validate_prerequisites() { if ! command_exists node; then @@ -201,7 +202,7 @@ add_custom_mcp_servers() { } configure_copilot_model() { - if [ -n "$ARG_COPILOT_MODEL" ] && [ "$ARG_COPILOT_MODEL" != "claude-sonnet-4.5" ]; then + if [ "$ARG_COPILOT_MODEL" != "claude-sonnet-4.5" ]; then echo "Setting Copilot model to: $ARG_COPILOT_MODEL" copilot config model "$ARG_COPILOT_MODEL" || { echo "WARNING: Failed to set model via copilot config, will use environment variable fallback" From ad5f7709616839080df4b282ef914ae69aa0b942 Mon Sep 17 00:00:00 2001 From: romracer Date: Tue, 7 Oct 2025 09:37:47 -0500 Subject: [PATCH 3/3] Update stale config path --- registry/coder-labs/modules/copilot/scripts/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder-labs/modules/copilot/scripts/install.sh b/registry/coder-labs/modules/copilot/scripts/install.sh index d300ddb8d..0651a8186 100644 --- a/registry/coder-labs/modules/copilot/scripts/install.sh +++ b/registry/coder-labs/modules/copilot/scripts/install.sh @@ -85,7 +85,7 @@ setup_copilot_configurations() { local module_path="$HOME/.copilot-module" mkdir -p "$module_path" - mkdir -p "$HOME/.config" + mkdir -p "$HOME/.copilot" setup_copilot_config