-
Notifications
You must be signed in to change notification settings - Fork 86
chore: add input for path, and use coder_env for model in claude-code module #617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
matifali
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a few nits.
There was a problem hiding this comment.
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 refactors the claude-code module to use environment variables for model configuration instead of CLI flags, and adds a new input variable for custom PATH configuration.
- Model configuration now uses
ANTHROPIC_MODELenvironment variable viacoder_envresource instead of--modelCLI flag - Added
claude_pathvariable to allow custom PATH configuration for the Claude Code binary - Removed ARG_MODEL parameter and related CLI flag handling from start script
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| registry/coder/modules/claude-code/main.tf | Added claude_path variable and anthropic_model coder_env resource; removed ARG_MODEL parameter from start script invocation; updated model variable description |
| registry/coder/modules/claude-code/scripts/start.sh | Removed ARG_MODEL variable declaration, debug print, and --model CLI flag handling |
| registry/coder/modules/claude-code/main.test.ts | Updated test to verify ANTHROPIC_MODEL environment variable is set via coder_env instead of checking for --model CLI flag |
| registry/coder/modules/claude-code/README.md | Updated all version references from 4.2.7 to 4.3.0 |
| variable "claude_path" { | ||
| type = string | ||
| description = "Path to prepend to PATH for Claude Code binary." | ||
| default = "$HOME/.local/bin" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are you ensuring this is the same path used in the install script? There is a chance these two can drift.
…on for this since official installer does not support versions or install path flags
…ring claude is in path
Description
Adds a
claude_pathvariable to override the path that thecoder_envsets for claude-code.Model now uses
coder_envto set theANTHROPIC_MODELenv instead of using the--modelcli flag which did not set the anthropic model globally in the workspace.Type of Change
Module Information
Path:
registry/coder/modules/claude-codeNew version:
v4.3.0Breaking change: [ ] Yes [X] No
Testing & Validation
bun test)bun fmt)Related Issues