Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
27 changes: 25 additions & 2 deletions config/pi/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@
"maxTokens": 8192
},
{
"id": "z-ai/glm-4.7",
"name": "GLM-4.7 (Z-AI)",
"id": "z-ai/glm-4-7",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium

This model ID change from z-ai/glm-4.7 to z-ai/glm-4-7 (dot to hyphen) should be carefully verified. If this is correcting a typo to match OpenRouter's actual model identifier, that's fine. However, if existing configurations or scripts reference the old ID z-ai/glm-4.7, they will break. Consider checking for any hardcoded references to the old model ID.

Agent: 🏛 Architecture • Fix in Cursor • Fix in Claude

Prompt for Agent
Task: Address review feedback left on GitHub.
Repository: shunkakinoki/dotfiles#580
File: config/pi/models.json#L145
Action: Open this file location in your editor, inspect the highlighted code, and resolve the issue described below.

Feedback:
This model ID change from `z-ai/glm-4.7` to `z-ai/glm-4-7` (dot to hyphen) should be carefully verified. If this is correcting a typo to match OpenRouter's actual model identifier, that's fine. However, if existing configurations or scripts reference the old ID `z-ai/glm-4.7`, they will break. Consider checking for any hardcoded references to the old model ID.

"name": "glm-4-7 (Z-AI)",

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.

medium

For consistency with other model names in this file (e.g., GLM-4.6 (Z-AI) on line 162 and the new GLM-4.7 (Z-AI) on line 185), the model name should be capitalized. This improves readability and maintains a consistent naming convention across the configuration.

Suggested change
"name": "glm-4-7 (Z-AI)",
"name": "GLM-4.7 (Z-AI)",

"reasoning": false,
"input": [
"text"
Expand Down Expand Up @@ -174,6 +174,29 @@
"maxTokens": 16384
}
]
},
"openrouter-preset": {
"baseUrl": "https://openrouter.ai/api/v1",
"apiKey": "OPENROUTER_API_KEY",
"api": "openai-completions",
"models": [
{
"id": "@preset/glm-4-7",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium

The model ID uses the @preset/ prefix which appears to be OpenRouter-specific syntax. Verify that the Pi agent correctly handles this prefix when constructing API requests. Also, there's a discrepancy: this entry uses @preset/glm-4-7 while the direct model on line 145 uses z-ai/glm-4-7. Consider documenting when to use each variant.

Agent: 🏛 Architecture • Fix in Cursor • Fix in Claude

Prompt for Agent
Task: Address review feedback left on GitHub.
Repository: shunkakinoki/dotfiles#580
File: config/pi/models.json#L184
Action: Open this file location in your editor, inspect the highlighted code, and resolve the issue described below.

Feedback:
The model ID uses the `@preset/` prefix which appears to be OpenRouter-specific syntax. Verify that the Pi agent correctly handles this prefix when constructing API requests. Also, there's a discrepancy: this entry uses `@preset/glm-4-7` while the direct model on line 145 uses `z-ai/glm-4-7`. Consider documenting when to use each variant.

"name": "GLM-4.7 (Z-AI)",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 131072,
"maxTokens": 16384
}
]
}
}
}
6 changes: 6 additions & 0 deletions home-manager/programs/fish/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
kyberm = "_kyberm_function";
ocxe = "_ocxe_function";
ocxeh = "_ocxeh_function";
pixe = "_pixe_function";
pixeh = "_pixeh_function";
sag = "_ssh_add_github";
shortcuts = "_fish_shortcuts";
zdo = "_zdo_function";
Expand Down Expand Up @@ -149,6 +151,10 @@
"_dev_function"
"_ocxe_function"
"_ocxeh_function"
"_pilxe_function"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

High

These function references (_pilxe_function and _pilxeh_function) appear to be added but the corresponding function files are not present in this PR. This will cause the fish shell configuration to fail at build time when it tries to source non-existent files. Either these entries should be removed or the function files need to be added.

Agent: 🏛 Architecture • Fix in Cursor • Fix in Claude

Prompt for Agent
Task: Address review feedback left on GitHub.
Repository: shunkakinoki/dotfiles#580
File: home-manager/programs/fish/default.nix#L154
Action: Open this file location in your editor, inspect the highlighted code, and resolve the issue described below.

Feedback:
These function references (`_pilxe_function` and `_pilxeh_function`) appear to be added but the corresponding function files are not present in this PR. This will cause the fish shell configuration to fail at build time when it tries to source non-existent files. Either these entries should be removed or the function files need to be added.

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.

P1: xdg.configFile installs Fish functions _pilxe_function/_pilxeh_function that don't exist, causing build/activation failure or unused config (likely typo vs _pixe*)

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At home-manager/programs/fish/default.nix, line 154:

<comment>xdg.configFile installs Fish functions `_pilxe_function`/`_pilxeh_function` that don't exist, causing build/activation failure or unused config (likely typo vs `_pixe*`)</comment>

<file context>
@@ -149,6 +151,10 @@
         "_dev_function"
         "_ocxe_function"
         "_ocxeh_function"
+        "_pilxe_function"
+        "_pilxeh_function"
+        "_pixe_function"
</file context>

"_pilxeh_function"

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.

high

These functions, _pilxe_function and _pilxeh_function, seem to have been added by mistake. They are not defined as shell abbreviations, and their corresponding function files are not included in this pull request. Including them here will likely cause sourcing errors. Please remove them.

Copilot AI Jan 15, 2026

Copy link

Choose a reason for hiding this comment

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

The functions _pilxe_function and _pilxeh_function are referenced but don't exist in the functions directory. These should be removed from the list, or the corresponding function files need to be created.

Suggested change
"_pilxe_function"
"_pilxeh_function"

Copilot uses AI. Check for mistakes.
"_pixe_function"
"_pixeh_function"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
"_fish_shortcuts"
"_fzf_cmd_history"
"_fzf_directory_picker"
Expand Down
11 changes: 11 additions & 0 deletions home-manager/programs/fish/functions/_pixe_function.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function _pixe_function --description "Run Pi agent with GLM-4.7 via OpenRouter"
# Run Pi agent with a free-form prompt (spaces allowed) using GLM-4.7
# Usage: pixe [<prompt words...>]

if test (count $argv) -eq 0
pi-agent -m 'openrouter-preset/@preset/glm-4-7'

Copilot AI Jan 15, 2026

Copy link

Choose a reason for hiding this comment

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

Inconsistent model ID format. The existing _ocxe_function.fish uses openrouter-preset/glm-4-7 while this uses openrouter-preset/@preset/glm-4-7. The JSON configuration defines the model ID as @preset/glm-4-7, so the format openrouter-preset/@preset/glm-4-7 appears correct, but _ocxe_function.fish should likely be updated for consistency.

Copilot uses AI. Check for mistakes.
else
set -l prompt (string join " " -- $argv)
pi-agent "$prompt" -m 'openrouter-preset/@preset/glm-4-7'

Copilot AI Jan 15, 2026

Copy link

Choose a reason for hiding this comment

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

Inconsistent model ID format. The existing _ocxe_function.fish uses openrouter-preset/glm-4-7 while this uses openrouter-preset/@preset/glm-4-7. The JSON configuration defines the model ID as @preset/glm-4-7, so the format openrouter-preset/@preset/glm-4-7 appears correct, but _ocxe_function.fish should likely be updated for consistency.

Copilot uses AI. Check for mistakes.
end
Comment on lines +5 to +10

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.

medium

To improve maintainability and avoid duplicating the model identifier string, it's a good practice to define it as a local variable. This makes it easier to update in the future if needed.

  set -l model 'openrouter-preset/@preset/glm-4-7'
  if test (count $argv) -eq 0
    pi-agent -m "$model"
  else
    set -l prompt (string join " " -- $argv)
    pi-agent "$prompt" -m "$model"
  end

end
12 changes: 12 additions & 0 deletions home-manager/programs/fish/functions/_pixeh_function.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function _pixeh_function --description "Run Pi agent headlessly with GLM-4.7"
# Prompt for input and run Pi agent
# Usage: pixeh

read -P "Prompt: " prompt
if test -z "$prompt"
echo "No prompt provided, aborting." >&2
return 1
end

pi-agent "$prompt" -m 'openrouter-preset/@preset/glm-4-7'
Comment on lines +10 to +11

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.

medium

For consistency with the _pixe_function and for better maintainability, consider extracting the hardcoded model identifier into a local variable.

  set -l model 'openrouter-preset/@preset/glm-4-7'
  pi-agent "$prompt" -m "$model"

Copilot AI Jan 15, 2026

Copy link

Choose a reason for hiding this comment

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

Inconsistent model ID format. The existing _ocxe_function.fish uses openrouter-preset/glm-4-7 while this uses openrouter-preset/@preset/glm-4-7. The JSON configuration defines the model ID as @preset/glm-4-7, so the format openrouter-preset/@preset/glm-4-7 appears correct, but _ocxe_function.fish should likely be updated for consistency.

Copilot uses AI. Check for mistakes.
end
Loading