chore: backup - #448
Conversation
….7 Coding Plan model support in opencode.jsonc
…cated entries from config.yaml
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughThis PR modifies multiple configuration and build files: adds timeout wrappers to launchd restart commands in the Makefile, removes a deprecated model entry from cliproxyapi config, restructures opencode configuration with new Z.AI Coding Plan model sections and API key fields, and removes the KeepAlive setting from the brew-upgrader launchd agent. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @shunkakinoki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on enhancing the stability of system service management and refining model configurations. It adds timeouts to Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Mesa DescriptionTL;DRAdds AWS CLI v2 and S3 backups for CliproxyAPI, expands AI model support (GLM-4.6/4.7), hardens service restarts, and simplifies API key handling. What changed?
Description generated by Mesa. Update settings |
There was a problem hiding this comment.
Code Review
This pull request introduces several configuration updates. It improves the robustness of launchctl service restarts in the Makefile by adding timeouts. It refactors the AI model configurations in opencode.jsonc and cliproxyapi/config.yaml to add support for new GLM models and clarify API key management. Additionally, it corrects a launchd service configuration for brew-upgrader by removing a conflicting key. My review includes a suggestion to make the new timeouts in the Makefile configurable and points out an inconsistency in a model description in opencode.jsonc.
| launchctl-brew-upgrader: ## Restart brew-upgrader launchd agent. | ||
| @echo "🔄 Restarting brew-upgrader..." | ||
| @launchctl kickstart -k gui/$$(id -u)/org.nix-community.home.brew-upgrader || true | ||
| @timeout 5 launchctl kickstart -k gui/$$(id -u)/org.nix-community.home.brew-upgrader || true |
There was a problem hiding this comment.
Adding a timeout is a good way to prevent the command from hanging. However, hardcoding the timeout value 5 in multiple places makes it harder to maintain. Consider defining a variable for the timeout at the top of the Makefile. This would allow for easy adjustment and ensure consistency across all launchctl targets.
For example:
# At the top of the file
LAUNCHCTL_TIMEOUT ?= 5
# ... in the target
@timeout $(LAUNCHCTL_TIMEOUT) launchctl kickstart ...This change would apply to all similar launchctl commands modified in this PR.
| "name": "GLM-4.6 (via OpenRouter and Z.AI Coding Plan)" | ||
| }, | ||
| "z-ai/glm-4.7": { | ||
| "name": "GLM-4.7 (via OpenRouter and Z.AI Coding Plan)" |
There was a problem hiding this comment.
The model description here states that GLM-4.7 is available via OpenRouter. However, the change in config/cliproxyapi/config.yaml removes the z-ai/glm-4.7 model from the openrouter provider configuration. This creates an inconsistency and could be misleading. Please update the description to accurately reflect that the model is available via the Z.AI Coding Plan only.
"name": "GLM-4.7 (via Z.AI Coding Plan)"
There was a problem hiding this comment.
1 issue found across 4 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="Makefile">
<violation number="1" location="Makefile:611">
P1: `timeout` is not available by default on macOS. These launchd targets are macOS-specific, but `timeout` is a GNU coreutils command. Consider using `gtimeout` (requires `brew install coreutils`) or a portable alternative like `perl -e 'alarm 5; exec @ARGV' launchctl kickstart ...`.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
| launchctl-brew-upgrader: ## Restart brew-upgrader launchd agent. | ||
| @echo "🔄 Restarting brew-upgrader..." | ||
| @launchctl kickstart -k gui/$$(id -u)/org.nix-community.home.brew-upgrader || true | ||
| @timeout 5 launchctl kickstart -k gui/$$(id -u)/org.nix-community.home.brew-upgrader || true |
There was a problem hiding this comment.
P1: timeout is not available by default on macOS. These launchd targets are macOS-specific, but timeout is a GNU coreutils command. Consider using gtimeout (requires brew install coreutils) or a portable alternative like perl -e 'alarm 5; exec @ARGV' launchctl kickstart ....
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Makefile, line 611:
<comment>`timeout` is not available by default on macOS. These launchd targets are macOS-specific, but `timeout` is a GNU coreutils command. Consider using `gtimeout` (requires `brew install coreutils`) or a portable alternative like `perl -e 'alarm 5; exec @ARGV' launchctl kickstart ...`.</comment>
<file context>
@@ -608,37 +608,37 @@ launchctl: launchctl-brew-upgrader launchctl-cliproxyapi launchctl-code-syncer l
launchctl-brew-upgrader: ## Restart brew-upgrader launchd agent.
@echo "🔄 Restarting brew-upgrader..."
- @launchctl kickstart -k gui/$$(id -u)/org.nix-community.home.brew-upgrader || true
+ @timeout 5 launchctl kickstart -k gui/$$(id -u)/org.nix-community.home.brew-upgrader || true
@echo "✅ brew-upgrader restarted"
</file context>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
config/opencode/opencode.jsonc (1)
210-230: Run Biome formatter to address trailing commas.Lines 212 and 229 contain trailing commas before closing braces. While JSONC generally allows trailing commas, these specific placements may cause parsing issues in some contexts.
Run the formatter to ensure consistency:
#!/bin/bash # Format the opencode.jsonc file using Biome biome format --write config/opencode/opencode.jsonc
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
Makefileconfig/cliproxyapi/config.yamlconfig/opencode/opencode.jsonchome-manager/services/brew-upgrader/default.nix
💤 Files with no reviewable changes (2)
- home-manager/services/brew-upgrader/default.nix
- config/cliproxyapi/config.yaml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx,json,jsonc,md}
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Use Biome for code formatting as configured in biome.json
Files:
config/opencode/opencode.jsonc
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
- GitHub Check: Agent
- GitHub Check: cubic · AI code reviewer
- GitHub Check: nix-nixos
- GitHub Check: nix-linux
- GitHub Check: nix-darwin
- GitHub Check: docker-build-push (linux/arm64, arm64, ubuntu-24.04-arm)
- GitHub Check: e2e-run (MacOS, macos-latest)
- GitHub Check: docker-build-push (linux/amd64, amd64, ubuntu-latest)
- GitHub Check: e2e-run (Ubuntu, ubuntu-latest)
- GitHub Check: e2e-run (NixOS, ubuntu-latest)
- GitHub Check: shellspec
- GitHub Check: shellcheck
- GitHub Check: lua-hammerspoon
- GitHub Check: lua-neovim
- GitHub Check: lua-neovim-test
🔇 Additional comments (2)
Makefile (1)
611-611: LGTM: Timeout wrapper improves resilience.Adding 5-second timeouts to launchctl kickstart commands is a good defensive practice that prevents indefinite hangs during service restarts. The timeout duration is reasonable for these operations, and the
|| truefallback ensures graceful continuation.Also applies to: 617-617, 623-623, 629-629, 635-635, 641-641
config/opencode/opencode.jsonc (1)
45-50: LGTM: Clear model naming.The GLM model entries are well-structured with descriptive names that clearly indicate the dual provider support (OpenRouter and Z.AI Coding Plan).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "z-ai/glm-4.6": { | ||
| "name": "GLM-4.6 (via OpenRouter)", | ||
| "options": { | ||
| "stream": false | ||
| } | ||
| "name": "GLM-4.6 (via OpenRouter and Z.AI Coding Plan)" | ||
| }, | ||
| "z-ai/glm-4.7": { | ||
| "name": "GLM-4.7 (via OpenRouter and Z.AI Coding Plan)" |
There was a problem hiding this comment.
Add missing openrouter allowlist entry for z-ai/glm-4.7
The new z-ai/glm-4.7 entry is added under the CLIProxyAPI provider, but CLIProxyAPI’s openai-compatibility config only allowlists z-ai/glm-4.6 for the openrouter backend (see config/cliproxyapi/config.yaml under openai-compatibility → openrouter → models). With that config, selecting z-ai/glm-4.7 via the proxy will be rejected as an unknown model unless you also add it to the openrouter model list or point this entry at the Z-AI provider (glm-4.7).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR performs maintenance tasks including removing the deprecated KeepAlive property from the brew-upgrader service, reorganizing GLM model configurations to separate standard and coding plan variants, adding timeout protection to launchctl commands, and applying consistent JSON formatting. The changes improve service reliability and model organization.
Key changes:
- Removed
KeepAlive=truefrom brew-upgrader launchd service configuration - Reorganized GLM-4.6 and GLM-4.7 models into separate providers (z-ai and zai-coding-plan)
- Added 5-second timeout protection to launchctl kickstart commands
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| home-manager/services/brew-upgrader/default.nix | Removed deprecated KeepAlive property from launchd service configuration |
| config/opencode/opencode.jsonc | Split z-ai provider into z-ai and zai-coding-plan providers, updated model descriptions, and applied consistent JSON formatting |
| config/cliproxyapi/config.yaml | Removed z-ai/glm-4.7 from OpenRouter configuration as it's now handled by the z-ai provider |
| Makefile | Added timeout protection to all launchctl kickstart commands to prevent hanging |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "zai-coding-plan": { | ||
| "models": { | ||
| "glm-4.6": { | ||
| "name": "GLM-4.6 Coding Plan (via Z-AI)" | ||
| }, | ||
| "glm-4.7": { | ||
| "name": "GLM-4.7 Coding Plan (via Z-AI)" | ||
| } | ||
| }, |
There was a problem hiding this comment.
The zai-coding-plan provider is missing required configuration fields. Based on the pattern used by other providers like cliproxyapi, lmstudio, and ollama, it should include an npm package specification and a baseURL in the options section. Without these fields, the provider may not function correctly.
| @@ -198,7 +210,17 @@ | |||
| "glm-4.6": { | |||
| "name": "GLM-4.6 (via Z-AI)", | |||
| }, | |||
There was a problem hiding this comment.
Trailing comma after the last property in the JSON object. This will cause a JSON parsing error in most parsers, although JSONC typically allows trailing commas in arrays and objects.
| "name": "GLM-4.6 (via Z-AI)", | ||
| }, | ||
| "zai-coding-plan/glm-4.7": { | ||
| }, |
There was a problem hiding this comment.
Trailing comma after the last property in the models object. This will cause a JSON parsing error in most parsers, although JSONC typically allows trailing commas in arrays and objects.
| "name": "GLM-4.6 (via OpenRouter and Z.AI Coding Plan)" | ||
| }, | ||
| "z-ai/glm-4.7": { | ||
| "name": "GLM-4.7 (via OpenRouter and Z.AI Coding Plan)" |
There was a problem hiding this comment.
The model name mentions "via OpenRouter and Z.AI Coding Plan", but z-ai/glm-4.7 was removed from the OpenRouter configuration in config/cliproxyapi/config.yaml. The name should be updated to reflect that this model is only available via Z.AI Coding Plan, not OpenRouter.
| "name": "GLM-4.7 (via OpenRouter and Z.AI Coding Plan)" | |
| "name": "GLM-4.7 (via Z.AI Coding Plan)" |
| "apiKey": "{env:ZAI_API_KEY}", | ||
| } |
There was a problem hiding this comment.
Trailing comma after the last property in the options object. This will cause a JSON parsing error in most parsers, although JSONC typically allows trailing commas in arrays and objects.
Enhance configuration and scripts to support AWS CLI2 and S3 backups, improve handling of environment variables, and add support for GLM-4.7 and GLM-4.6 models in the OpenAI compatibility section. Update API key management for clarity and optional usage. Remove deprecated entries and enhance model descriptions for better understanding.
Summary by cubic
Adds AWS CLI v2 and S3 backups for CliproxyAPI config, and expands model support to GLM-4.6 (OpenRouter + Z.AI Coding Plan) and GLM-4.7 (Z.AI Coding Plan). Also hardens service restarts and simplifies API key handling.
New Features
Bug Fixes
Written for commit 0b03f2d. Summary will update automatically on new commits.