chore(config): update opencode configuration - #523
Conversation
📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughUpdated the OpenRouter preset mapping in the configuration file from GLM-4.6 to GLM-4.7, changing the preset ID and display name accordingly. This single-file change updates model version references without altering the configuration structure. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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 a routine maintenance update within the opencode configuration. The primary goal is to ensure that the system utilizes the latest version of the GLM model, thereby incorporating potential improvements or new features offered by the updated model. This change involves adjusting the model identifier and its corresponding display name to maintain consistency and accuracy. Highlights
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;DRUpdated GLM model from 4.6 to 4.7 in opencode configuration. What changed?
Description generated by Mesa. Update settings |
There was a problem hiding this comment.
Code Review
This pull request updates the GLM model version from 4.6 to 4.7 in the opencode configuration for openrouter-preset. While the model's id and name are correctly updated, the JSON key for this configuration remains glm-4-6. This creates an inconsistency that could be misleading. I've added a review comment recommending to update the key to glm-4-7 to maintain clarity and prevent potential issues.
| "id": "@preset/glm-4-7", | ||
| "name": "Preset GLM-4.7 (via OpenRouter)" |
There was a problem hiding this comment.
The key for this model configuration on line 199 is glm-4-6, but the id and name fields now refer to glm-4-7. This inconsistency is misleading and could lead to incorrect model selection if the key is used as an identifier. For clarity and to prevent potential bugs, it's recommended to update the key on line 199 to glm-4-7 to match the model version.
There was a problem hiding this comment.
Pull request overview
This PR updates the GLM model configuration from version 4.6 to 4.7 in the OpenRouter preset section of the opencode configuration file.
Key changes:
- Updated model ID from
@preset/glm-4-6to@preset/glm-4-7 - Updated display name from "Preset GLM-4.6 (via OpenRouter)" to "Preset GLM-4.7 (via OpenRouter)"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -197,8 +197,8 @@ | |||
| }, | |||
| "models": { | |||
| "glm-4-6": { | |||
There was a problem hiding this comment.
The model key "glm-4-6" is inconsistent with the updated model ID "@preset/glm-4-7" and name "Preset GLM-4.7 (via OpenRouter)". When updating the model version, the key should also be updated to "glm-4-7" to maintain consistency and avoid confusion. This mismatch could lead to developers referencing the wrong model version.
| "glm-4-6": { | |
| "glm-4-7": { |
There was a problem hiding this comment.
Performed full review of 9043376...8f1a973
Analysis
-
Configuration Inconsistency: The PR introduces the only instance where a model's JSON key name ("glm-4-6") doesn't match its actual model ID ("@preset/glm-4-7"), breaking the established pattern used across all other models.
-
Maintenance and Readability Concerns: The inconsistency may confuse future maintainers, as this is the only model with an explicit
idfield that differs from its key, with no documentation explaining the reason for this exception. -
Potential Reference Errors: Users or code referencing "glm-4-6" may unknowingly be using version 4.7, potentially causing subtle issues if version-specific features or behaviors are expected.
Tip
Help
Slash Commands:
/review- Request a full code review/review latest- Review only changes since the last review/describe- Generate PR description. This will update the PR body or issue comment depending on your configuration/help- Get help with Mesa commands and configuration options
0 files reviewed | 0 comments | Edit Agent Settings • Read Docs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @config/opencode/opencode.jsonc:
- Around line 199-202: The config entry uses the object key "glm-4-6" while the
mapped preset id is "@preset/glm-4-7"; rename the object key from "glm-4-6" to
"glm-4-7" so the key matches the preset id (update the JSON object key where the
entry with id "@preset/glm-4-7" is defined) and verify the "@preset/glm-4-7"
preset is configured in your OpenRouter dashboard.
📜 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 (1)
config/opencode/opencode.jsonc
🧰 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: cubic · AI code reviewer
- GitHub Check: Mesa Review
- GitHub Check: nix-nixos
- GitHub Check: nix-linux
- GitHub Check: nix-darwin
- GitHub Check: e2e-run (NixOS, ubuntu-latest)
- GitHub Check: e2e-run (Ubuntu, ubuntu-latest)
- GitHub Check: docker-build-push (linux/amd64, amd64, ubuntu-latest)
- GitHub Check: e2e-run (MacOS, macos-latest)
- GitHub Check: docker-build-push (linux/arm64, arm64, ubuntu-24.04-arm)
- GitHub Check: shell-lint
- GitHub Check: lua-neovim
- GitHub Check: lua-hammerspoon
- GitHub Check: lua-neovim-test
- GitHub Check: shell-test
| "glm-4-6": { | ||
| "id": "@preset/glm-4-6", | ||
| "name": "Preset GLM-4.6 (via OpenRouter)" | ||
| "id": "@preset/glm-4-7", | ||
| "name": "Preset GLM-4.7 (via OpenRouter)" | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Find repo references to the old key or old/new preset ids
echo "=== Searching for 'glm-4-6' references ==="
rg -n '"glm-4-6"' --type json --type jsonc --type js --type ts . 2>/dev/null || echo "No matches found"
echo ""
echo "=== Searching for '@preset/glm-4-6' references ==="
rg -n '"@preset/glm-4-6"' . 2>/dev/null || echo "No matches found"
echo ""
echo "=== Searching for '@preset/glm-4-7' references ==="
rg -n '"@preset/glm-4-7"' . 2>/dev/null || echo "No matches found"
echo ""
echo "=== Checking config file context ==="
cat -n config/opencode/opencode.jsonc | sed -n '190,210p'Repository: shunkakinoki/dotfiles
Length of output: 999
🌐 Web query:
OpenRouter @preset/glm-4-7 GLM-4.7 preset documentation
💡 Result:
I couldn't find a public OpenRouter documentation page specifically for a builtin preset named "@preset/glm-4-7". OpenRouter's presets feature docs (how to reference presets like @preset/ in API requests) are here: [1]. For GLM‑4.7 model details you can refer to the GLM project/announcements (example: GLM-4.7 overview). [2]
If you want the exact preset config for @preset/glm-4-7 (provider routing, system prompt, params, fallbacks), check your OpenRouter dashboard Presets page (organization presets) or ask the OpenRouter team/support to export the preset — presets are managed via the web app and the API as described in the docs. [1][2]
Sources:
[1] OpenRouter — Presets documentation.
[2] GLM‑4.7 model overview (GLM project / OpenLM.ai coverage).
Model key "glm-4-6" should be renamed to "glm-4-7" to match the preset version.
The key is currently "glm-4-6" while the mapped preset is "@preset/glm-4-7", creating a confusing mismatch. Since no references to this key exist elsewhere in the codebase, renaming is safe.
Suggested fix
"models": {
- "glm-4-6": {
+ "glm-4-7": {
"id": "@preset/glm-4-7",
"name": "Preset GLM-4.7 (via OpenRouter)"
}
}Ensure @preset/glm-4-7 is configured in your OpenRouter dashboard.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "glm-4-6": { | |
| "id": "@preset/glm-4-6", | |
| "name": "Preset GLM-4.6 (via OpenRouter)" | |
| "id": "@preset/glm-4-7", | |
| "name": "Preset GLM-4.7 (via OpenRouter)" | |
| } | |
| "glm-4-7": { | |
| "id": "@preset/glm-4-7", | |
| "name": "Preset GLM-4.7 (via OpenRouter)" | |
| } |
🤖 Prompt for AI Agents
In @config/opencode/opencode.jsonc around lines 199 - 202, The config entry uses
the object key "glm-4-6" while the mapped preset id is "@preset/glm-4-7"; rename
the object key from "glm-4-6" to "glm-4-7" so the key matches the preset id
(update the JSON object key where the entry with id "@preset/glm-4-7" is
defined) and verify the "@preset/glm-4-7" preset is configured in your
OpenRouter dashboard.
Summary
Changes
Summary by cubic
Updates opencode configuration to use Preset GLM-4.7 instead of 4.6 via OpenRouter. Keeps the default model current; only the model ID and display name were changed.
Written for commit 8f1a973. Summary will update on new commits.