Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Releases/v4.0.0/.claude/PAI/Tools/pai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link

Copilot AI Mar 3, 2026

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 --model with an invalid value and cause a confusing launch failure.

Suggested change
const model = process.env.CLAUDE_MODEL;
const rawModel = process.env.CLAUDE_MODEL;
const model = rawModel?.trim();

Copilot uses AI. Check for mistakes.
if (model) {
args.push("--model", model);
}

Comment on lines +415 to +420
Copy link

Copilot AI Mar 3, 2026

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.0 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.

Suggested change
// 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);
}

Copilot uses AI. Check for mistakes.
// Change to PAI directory unless --local flag is set
if (!options.local) {
process.chdir(CLAUDE_DIR);
Expand Down
6 changes: 6 additions & 0 deletions Releases/v4.0.1/.claude/PAI/Tools/pai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link

Copilot AI Mar 3, 2026

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 --model with an invalid value and cause a confusing launch failure.

Suggested change
const model = process.env.CLAUDE_MODEL;
const rawModel = process.env.CLAUDE_MODEL;
const model = rawModel?.trim();

Copilot uses AI. Check for mistakes.
if (model) {
args.push("--model", model);
}
Comment on lines +415 to +419
Copy link

Copilot AI Mar 3, 2026

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.

Copilot uses AI. Check for mistakes.

// Change to PAI directory unless --local flag is set
if (!options.local) {
process.chdir(CLAUDE_DIR);
Expand Down
6 changes: 6 additions & 0 deletions Releases/v4.0.2/.claude/PAI/Tools/pai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link

Copilot AI Mar 3, 2026

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 --model with an invalid value and cause a confusing launch failure.

Suggested change
const model = process.env.CLAUDE_MODEL;
const rawModel = process.env.CLAUDE_MODEL;
const model = rawModel ? rawModel.trim() : "";

Copilot uses AI. Check for mistakes.
if (model) {
args.push("--model", model);
}

Comment on lines +415 to +420
Copy link

Copilot AI Mar 3, 2026

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.

Suggested change
// 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);
}

Copilot uses AI. Check for mistakes.
// Change to PAI directory unless --local flag is set
if (!options.local) {
process.chdir(CLAUDE_DIR);
Expand Down
6 changes: 6 additions & 0 deletions Releases/v4.0.3/.claude/PAI/Tools/pai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link

Copilot AI Mar 3, 2026

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 --model with an invalid value and cause a confusing launch failure.

Suggested change
const model = process.env.CLAUDE_MODEL;
const rawModel = process.env.CLAUDE_MODEL;
const model = rawModel !== undefined ? rawModel.trim() : undefined;

Copilot uses AI. Check for mistakes.
if (model) {
args.push("--model", model);
}
Comment on lines +415 to +419
Copy link

Copilot AI Mar 3, 2026

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.

Copilot uses AI. Check for mistakes.

// Change to PAI directory unless --local flag is set
if (!options.local) {
process.chdir(CLAUDE_DIR);
Expand Down
Loading