-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(pai): add CLAUDE_MODEL env variable support #889
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -412,6 +412,12 @@ async function cmdLaunch(options: { mcp?: string; resume?: boolean; skipPerms?: | |||||||||||
| args.push("--resume"); | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| // Read model from environment variable (e.g. CLAUDE_MODEL=gpt-oss:20b for Ollama) | ||||||||||||
| const model = process.env.CLAUDE_MODEL; | ||||||||||||
| if (model) { | ||||||||||||
| args.push("--model", model); | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
|
Comment on lines
+415
to
+420
|
||||||||||||
| // Read model from environment variable (e.g. CLAUDE_MODEL=gpt-oss:20b for Ollama) | |
| const model = process.env.CLAUDE_MODEL; | |
| if (model) { | |
| args.push("--model", model); | |
| } |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -412,6 +412,12 @@ async function cmdLaunch(options: { mcp?: string; resume?: boolean; skipPerms?: | |||||||
| args.push("--resume"); | ||||||||
| } | ||||||||
|
|
||||||||
| // Read model from environment variable (e.g. CLAUDE_MODEL=gpt-oss:20b for Ollama) | ||||||||
| const model = process.env.CLAUDE_MODEL; | ||||||||
|
||||||||
| const model = process.env.CLAUDE_MODEL; | |
| const rawModel = process.env.CLAUDE_MODEL; | |
| const model = rawModel?.trim(); |
Copilot
AI
Mar 3, 2026
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.
This change introduces new functionality into the v4.0.1 release snapshot. If release directories are intended to be historical, immutable snapshots, please limit this change to the current release (v4.0.3) or ensure release documentation clearly indicates the backport.
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -412,6 +412,12 @@ async function cmdLaunch(options: { mcp?: string; resume?: boolean; skipPerms?: | |||||||||||
| args.push("--resume"); | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| // Read model from environment variable (e.g. CLAUDE_MODEL=gpt-oss:20b for Ollama) | ||||||||||||
| const model = process.env.CLAUDE_MODEL; | ||||||||||||
|
||||||||||||
| const model = process.env.CLAUDE_MODEL; | |
| const rawModel = process.env.CLAUDE_MODEL; | |
| const model = rawModel ? rawModel.trim() : ""; |
Copilot
AI
Mar 3, 2026
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.
This change introduces new functionality into the v4.0.2 release snapshot, which is described as a bug-fix patch with "no new features" (see Releases/README.md). If releases are meant to be immutable snapshots, please apply this only to the current release (v4.0.3) or update the release documentation accordingly.
| // Read model from environment variable (e.g. CLAUDE_MODEL=gpt-oss:20b for Ollama) | |
| const model = process.env.CLAUDE_MODEL; | |
| if (model) { | |
| args.push("--model", model); | |
| } |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -412,6 +412,12 @@ async function cmdLaunch(options: { mcp?: string; resume?: boolean; skipPerms?: | |||||||
| args.push("--resume"); | ||||||||
| } | ||||||||
|
|
||||||||
| // Read model from environment variable (e.g. CLAUDE_MODEL=gpt-oss:20b for Ollama) | ||||||||
| const model = process.env.CLAUDE_MODEL; | ||||||||
|
||||||||
| const model = process.env.CLAUDE_MODEL; | |
| const rawModel = process.env.CLAUDE_MODEL; | |
| const model = rawModel !== undefined ? rawModel.trim() : undefined; |
Copilot
AI
Mar 3, 2026
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.
This adds a new supported configuration surface (CLAUDE_MODEL) but it isn’t discoverable from the built-in k help output. Please document the environment variable (and an example) in the CLI help and/or the release notes so users can find it without reading the source.
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.
Consider normalizing the env var value before passing it through (e.g., trim whitespace and ignore values that become empty). As written,
CLAUDE_MODEL=" "will still push--modelwith an invalid value and cause a confusing launch failure.