-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Copy link
Description
Adding the Copilot CLI module to a template generates the following error in the logs and doesn't complete installation / Coder tasks integration:
/tmp/install.sh: line 204: ARG_COPILOT_MODEL: unbound variable
It doesn't appear ARG_COPILOT_MODEL is passed to agentapi's install script:
registry/registry/coder-labs/modules/copilot/main.tf
Lines 291 to 298 in f75afeb
ARG_MCP_APP_STATUS_SLUG='${local.app_slug}' \ | |
ARG_REPORT_TASKS='${var.report_tasks}' \ | |
ARG_WORKDIR='${local.workdir}' \ | |
ARG_MCP_CONFIG='${var.mcp_config != "" ? base64encode(var.mcp_config) : ""}' \ | |
ARG_COPILOT_CONFIG='${base64encode(local.final_copilot_config)}' \ | |
ARG_EXTERNAL_AUTH_ID='${var.external_auth_id}' \ | |
ARG_COPILOT_VERSION='${var.copilot_version}' \ | |
/tmp/install.sh |
And it has no default on line 204:
if [ -n "$ARG_COPILOT_MODEL" ] && [ "$ARG_COPILOT_MODEL" != "claude-sonnet-4.5" ]; then |
Seems like the proper fix is to pass ARG_COPILOT_MODEL
to install.sh
:
...
ARG_COPILOT_VERSION='${var.copilot_version}' \
ARG_COPILOT_MODEL='${var.copilot_model}' \
/tmp/install.sh
and then reference it there:
...
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}
Metadata
Metadata
Assignees
Labels
No labels