fix: update local model to qwen/qwen3.5-9b and extract obsidian inline script - #1415
Conversation
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
📝 WalkthroughWalkthroughRefactored the Obsidian headless shim to load its script from an external file and added that script plus tests; updated multiple Fish helper functions to switch configured AI model identifiers from Gemma variants to Qwen variants. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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 docstrings
🧪 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 |
Mesa DescriptionTL;DRReplaced Gemma LLM with Qwen 3.5 9B across Codex/OpenCode/Pi fish functions and extracted the Obsidian headless launcher into an external script, along with associated tests. What changed?LLM Model Updates (Gemma to Qwen 3.5 9B)
Obsidian Headless Script Extraction
Testing and Coverage
Description generated by Mesa. Update settings |
There was a problem hiding this comment.
Code Review
This pull request refactors the Obsidian headless shim to use an external script via pkgs.replaceVars and updates several Fish functions (Coxel, OpenCode, and Pi) to transition from Gemma and older Qwen models to qwen/qwen3.5-9b. Feedback highlights that models.json must be updated to ensure the __QWEN_LOCAL__ placeholder resolves correctly and notes that the template files for the pixel functions are missing from the current changes.
| codex resume $argv[2] | ||
| else if test (count $argv) -eq 0 | ||
| codex --oss --local-provider lmstudio --model '__GEMMA__' --full-auto -c model_reasoning_effort=minimal | ||
| codex --oss --local-provider lmstudio --model '__QWEN_LOCAL__' --full-auto -c model_reasoning_effort=minimal |
There was a problem hiding this comment.
The template now uses the __QWEN_LOCAL__ placeholder, which likely maps to the qwen-local key in models.json. However, the current models.json (visible in the repository context) still defines qwen-local as qwen3.5-0.8b-optiq.
To ensure that generated functions correctly use the new model and match the hardcoded .fish files updated in this PR, models.json should be updated to point to qwen/qwen3.5-9b.
|
|
||
| if test (count $argv) -gt 0; and contains -- "$argv[1]" --resume -r --continue -c | ||
| pi --model 'lmstudio/qwen3.5-0.8b-optiq' --resume $argv[2] | ||
| pi --model 'lmstudio/qwen/qwen3.5-9b' --resume $argv[2] |
There was a problem hiding this comment.
The pull request description states that Gemma model references are being replaced in all codex, opencode, and pi fish functions, including both .fish and .tpl.fish versions. While the .fish files for pixel and pixelh are updated here, their corresponding template files (_pixel_function.tpl.fish and _pixelh_function.tpl.fish) are missing from the changes. If these templates exist in the repository, they should be updated to maintain consistency with the other functions.
There was a problem hiding this comment.
Pull request overview
Updates local LLM wrapper scripts and the Obsidian headless shim to align with the new default local model and to satisfy repository checks around inline shell strings.
Changes:
- Switch Codex/OpenCode/Pi fish wrappers (both
.fishand.tpl.fish) from Gemma/older Qwen references toqwen/qwen3.5-9b(and__QWEN_LOCAL__in templates). - Standardize fish wrapper descriptions/comments to reference the local Qwen model.
- Extract the Obsidian
xvfb-runwrapper intoobsidian-headless.shand inject paths viapkgs.replaceVars.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| home-manager/programs/fish/functions/_pixelh_function.fish | Update Pi headless wrapper to use the new local Qwen model ID |
| home-manager/programs/fish/functions/_pixel_function.fish | Update Pi interactive wrapper to use the new local Qwen model ID |
| home-manager/programs/fish/functions/_ocxelh_function.tpl.fish | Update OpenCode headless template to Qwen wording + __QWEN_LOCAL__ placeholder |
| home-manager/programs/fish/functions/_ocxelh_function.fish | Update OpenCode headless wrapper to the new concrete Qwen model ID |
| home-manager/programs/fish/functions/_ocxel_function.tpl.fish | Update OpenCode interactive template to Qwen wording + __QWEN_LOCAL__ placeholder |
| home-manager/programs/fish/functions/_ocxel_function.fish | Update OpenCode interactive wrapper to the new concrete Qwen model ID |
| home-manager/programs/fish/functions/_coxelh_function.tpl.fish | Update Codex headless template to Qwen wording + __QWEN_LOCAL__ placeholder |
| home-manager/programs/fish/functions/_coxelh_function.fish | Update Codex headless wrapper to the new concrete Qwen model ID |
| home-manager/programs/fish/functions/_coxel_function.tpl.fish | Update Codex interactive template to Qwen wording + __QWEN_LOCAL__ placeholder |
| home-manager/programs/fish/functions/_coxel_function.fish | Update Codex interactive wrapper to the new concrete Qwen model ID |
| home-manager/modules/obsidian/obsidian-headless.sh | New externalized wrapper script used to run Obsidian CLI under Xvfb |
| home-manager/modules/obsidian/default.nix | Replace inline shell string with replaceVars + external script file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| else if test (count $argv) -eq 0 | ||
| codex --oss --local-provider lmstudio --model '__GEMMA__' --full-auto -c model_reasoning_effort=minimal | ||
| codex --oss --local-provider lmstudio --model '__QWEN_LOCAL__' --full-auto -c model_reasoning_effort=minimal | ||
| else | ||
| set -l prompt (string join " " -- $argv) | ||
| codex exec --oss --local-provider lmstudio --model '__GEMMA__' --full-auto -c model_reasoning_effort=minimal -- "$prompt" | ||
| codex exec --oss --local-provider lmstudio --model '__QWEN_LOCAL__' --full-auto -c model_reasoning_effort=minimal -- "$prompt" | ||
| end |
There was a problem hiding this comment.
These templates now use the __QWEN_LOCAL__ placeholder, but scripts/llm-update.sh sources placeholder values from the repo-level models.json key qwen-local, which currently maps to qwen3.5-0.8b-optiq. As-is, rerunning scripts/llm-update.sh will regenerate the concrete .fish wrappers back to the old model. Update models.json (qwen-local) to qwen/qwen3.5-9b (and re-run llm-update) so the placeholder-driven generation stays consistent with the committed .fish files.
There was a problem hiding this comment.
1 issue found across 12 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="home-manager/programs/fish/functions/_coxel_function.tpl.fish">
<violation number="1" location="home-manager/programs/fish/functions/_coxel_function.tpl.fish:8">
P2: The `__QWEN_LOCAL__` placeholder will resolve to whatever value `models.json` maps for `qwen-local`. If that file still points to the old model (`qwen3.5-0.8b-optiq`), the template-generated functions will use a different model than the hardcoded `.fish` files (`qwen/qwen3.5-9b`). Ensure `models.json` is updated in this PR to keep both in sync.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| codex resume $argv[2] | ||
| else if test (count $argv) -eq 0 | ||
| codex --oss --local-provider lmstudio --model '__GEMMA__' --full-auto -c model_reasoning_effort=minimal | ||
| codex --oss --local-provider lmstudio --model '__QWEN_LOCAL__' --full-auto -c model_reasoning_effort=minimal |
There was a problem hiding this comment.
P2: The __QWEN_LOCAL__ placeholder will resolve to whatever value models.json maps for qwen-local. If that file still points to the old model (qwen3.5-0.8b-optiq), the template-generated functions will use a different model than the hardcoded .fish files (qwen/qwen3.5-9b). Ensure models.json is updated in this PR to keep both in sync.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At home-manager/programs/fish/functions/_coxel_function.tpl.fish, line 8:
<comment>The `__QWEN_LOCAL__` placeholder will resolve to whatever value `models.json` maps for `qwen-local`. If that file still points to the old model (`qwen3.5-0.8b-optiq`), the template-generated functions will use a different model than the hardcoded `.fish` files (`qwen/qwen3.5-9b`). Ensure `models.json` is updated in this PR to keep both in sync.</comment>
<file context>
@@ -1,13 +1,13 @@
codex resume $argv[2]
else if test (count $argv) -eq 0
- codex --oss --local-provider lmstudio --model '__GEMMA__' --full-auto -c model_reasoning_effort=minimal
+ codex --oss --local-provider lmstudio --model '__QWEN_LOCAL__' --full-auto -c model_reasoning_effort=minimal
else
set -l prompt (string join " " -- $argv)
</file context>
Summary
qwen/qwen3.5-9bin all codex/opencode/pi fish functions (both.fishand.tpl.fish)obsidian/default.nixto externalobsidian-headless.shusingpkgs.replaceVarsFixes
__QWEN_LOCAL__placeholder in templates andqwen/qwen3.5-9bin non-template functionswriteShellScriptBinwith inline string in obsidian moduleSummary by cubic
Switch the local LLM from Gemma to Qwen 3.5 9B across Codex/OpenCode/Pi fish helpers and extract the Obsidian headless launcher into an external script with tests. Fixes failing shell tests and the inline script check; also applies Nix formatting across configs.
Bug Fixes
qwen/qwen3.5-9band templates to use__QWEN_LOCAL__, resolving 15 shell-test failures.writeShellScriptBinin theobsidianmodule with externalobsidian-headless.shviapkgs.replaceVars(usesxvfb-runandobsidian); add a test spec and include the script in coverage, satisfying the shell-inline-check.Refactors
Written for commit 4e66eb9. Summary will update on new commits.