Skip to content

fix(copilot): remove hardcoded model enum to allow any Copilot model - #833

Merged
matifali merged 1 commit into
mainfrom
matifali/copilot-remove-model-enum
Apr 4, 2026
Merged

matifali merged 1 commit into
mainfrom
matifali/copilot-remove-model-enum

Conversation

@matifali

@matifali matifali commented Apr 4, 2026

Copy link
Copy Markdown
Member

The copilot_model variable was restricted to a hardcoded enum of three models (claude-sonnet-4, claude-sonnet-4.5, gpt-5). Models change fast and this validation was blocking users from using newer models.

Changes

  • Remove validation block from copilot_model variable in main.tf
  • Update variable description to indicate any Copilot-supported model can be used
  • Replace enum validation test with a test that verifies arbitrary model strings are accepted
  • Bump module version to 0.4.1 in README examples

Closes #832

🤖 This PR was created with the help of Coder Agents, and needs a human review. 🧑‍💻

@matifali matifali added the version:patch Add to PRs requiring a patch version upgrade label Apr 4, 2026
@matifali
matifali requested a review from Copilot April 4, 2026 16:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes hardcoded copilot_model enum validation in the Copilot module so users can specify any GitHub Copilot-supported model string without being blocked by outdated allowlists.

Changes:

  • Removed the copilot_model variable enum validation and updated its description to allow any Copilot-supported model.
  • Updated Terraform tests to confirm arbitrary model strings are accepted and still produce the expected environment variable behavior.
  • Bumped README example module version pins to 0.4.1.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
registry/coder-labs/modules/copilot/main.tf Removes strict model allowlist validation and updates variable description.
registry/coder-labs/modules/copilot/copilot.tftest.hcl Replaces allowlist-based test coverage with a custom-model acceptance plan test.
registry/coder-labs/modules/copilot/README.md Updates module version pins in examples to 0.4.1.

Comment thread registry/coder-labs/modules/copilot/main.tf
@matifali
matifali requested a review from 35C4n0r April 4, 2026 19:11

@35C4n0r 35C4n0r left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@matifali
matifali merged commit 494ad9b into main Apr 4, 2026
9 checks passed
@matifali
matifali deleted the matifali/copilot-remove-model-enum branch April 4, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version:patch Add to PRs requiring a patch version upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

github copilot module only supports specific models

3 participants