Skip to content

feat: wire local qwen model into codex configs - #1078

Merged
shunkakinoki merged 3 commits into
mainfrom
feat/local-qwen-codex-config
Mar 13, 2026
Merged

feat: wire local qwen model into codex configs#1078
shunkakinoki merged 3 commits into
mainfrom
feat/local-qwen-codex-config

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Mar 13, 2026

Copy link
Copy Markdown
Owner

Changes

  • add a qwen-local model alias that resolves to qwen/qwen3.5-9b
  • replace the old local Codex/OpenCode GPT-OSS and GLM local entries with the Qwen local wiring
  • add templated coxel and coxelh fish wrappers so __QWEN_LOCAL__ is substituted into generated wrappers
  • extend fish wrapper specs to cover both template placeholders and generated substitutions

Technical Details

  • Codex local wrappers now call --model __QWEN_LOCAL__ and force model_provider=lmstudio
  • scripts/llm-update.sh now hydrates _coxel_function and _coxelh_function from template sources
  • generated Codex and OpenCode configs were refreshed from the templates

Testing

  • bash scripts/llm-update.sh
  • fish smoke checks for generated coxel and coxelh wrappers verifying qwen/qwen3.5-9b with model_provider=lmstudio
  • fish smoke checks for template coxel and coxelh wrappers verifying __QWEN_LOCAL__
  • fishtape not available in this shell, so the fish specs were not run end-to-end

Generated with Codex by GPT-5


Summary by cubic

Switches local Codex and OpenCode to Qwen 3.5 9B via LM Studio, adds OpenCode fish wrappers, and standardizes templating/tests. Introduces a qwen-local alias, removes old GPT‑OSS/GLM entries, and sets minimal reasoning for local runs.

  • New Features

    • Added qwen-local in models.json -> qwen/qwen3.5-9b.
    • Codex: set oss_provider=lmstudio, added profiles.qwen-local, wrappers use --oss --local-provider lmstudio --model ...; removed gpt-oss/glm-4-7-flash.
    • OpenCode: added ocxel/ocxelh wrappers and templates wired to LM Studio Qwen; updated opencode*.jsonc; mapped commands in home-manager and added tests.
    • scripts/llm-update.sh hydrates new Codex/OpenCode templates; fish specs cover placeholders and generated wrappers.
  • Migration

    • Run bash scripts/llm-update.sh to regenerate configs and wrappers.
    • Ensure LM Studio serves qwen/qwen3.5-9b; use coxel/coxelh and ocxel/ocxelh, or codex --model qwen/qwen3.5-9b / opencode -m lmstudio/qwen/qwen3.5-9b.

Written for commit 713a2f4. Summary will update on new commits.

Entire-Checkpoint: 11bc22e092dc
@mesa-dot-dev

mesa-dot-dev Bot commented Mar 13, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Wires local Qwen 3.5 9B model into Codex and OpenCode configurations, replacing older local GPT-OSS/GLM entries and standardizing fish wrapper templating for LM Studio integration.

What changed?

  • config/codex/config.toml: Removed 'gpt-oss-20b' and 'gpt-oss-120b' profiles; added a 'qwen-local' profile ('qwen/qwen3.5-9b').
  • config/codex/config.tpl.toml: Removed 'gpt-oss-20b', 'gpt-oss-120b', and 'glm-4-7-flash' model profiles; added a 'qwen-local' profile configured for LM Studio with model = "__QWEN_LOCAL__".
  • config/opencode/opencode.jsonc: Removed several gpt-oss and glm-4.7-flash models from the lm-studio provider; added qwen/qwen3.5-9b. Removed openai/gpt-oss-20b from ollama.
  • config/opencode/opencode.tpl.jsonc: Removed existing OpenAI and GLM models from lm-studio; added a __QWEN_LOCAL__ (Qwen 3.5 9B) model. Removed openai/gpt-oss-20b from ollama.
  • home-manager/programs/fish/functions/_coxel_function.fish: Changed the default model for codex from glm-4-7-flash to qwen/qwen3.5-9b; set lmstudio as the model provider and minimal reasoning effort.
  • home-manager/programs/fish/functions/_coxel_function.tpl.fish: Updated the definition or logic of this Fish shell function template, now incorporating __QWEN_LOCAL__.
  • home-manager/programs/fish/functions/_coxelh_function.fish: Switched from the glm-4-7-flash model to the local qwen/qwen3.5-9b model; replaced --profile with --model and set model_provider to lmstudio and model_reasoning_effort to minimal.
  • home-manager/programs/fish/functions/_coxelh_function.tpl.fish: Introduced a new Fish shell function template for headless codex execution, utilizing __QWEN_LOCAL__ and lmstudio as the model provider with minimal reasoning effort.
  • models.json: Added a new 'qwen-local' model entry ('qwen/qwen3.5-9b').
  • scripts/llm-update.sh: Updated to include _coxel_function.tpl.fish and _coxelh_function.tpl.fish in the TEMPLATES associative array for processing.
  • spec/fish/_coxel_function.tpl_test.fish: New unit tests for _coxel_function.tpl.fish verifying the use of __QWEN_LOCAL__, lmstudio provider, minimal reasoning effort, and correct codex exec invocation.
  • spec/fish/_coxel_function_test.fish: Updated tests for _coxel_function to assert its use of the qwen/qwen3.5-9b model, lmstudio provider, and minimal reasoning effort.
  • spec/fish/_coxelh_function.tpl_test.fish: New tests for _coxelh_function.tpl.fish ensuring proper error handling for empty prompts and correct internal codex command calls with specific arguments.
  • spec/fish/_coxelh_function_test.fish: Added new tests for _coxelh_function verifying its correct invocation of the codex command with the qwen/qwen3.5-9b model, lmstudio provider, and minimal reasoning effort for non-empty prompts.

Description generated by Mesa. Update settings

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 streamlines the local large language model integration within the Codex and OpenCode systems by introducing support for the Qwen 3.5 9B model. It consolidates local model configurations, removes outdated entries, and enhances the shell wrapper generation process to support templated model names, improving flexibility and maintainability for local LLM usage.

Highlights

  • Qwen Local Model Integration: A new qwen-local model alias has been introduced, resolving to qwen/qwen3.5-9b, and integrated into Codex and OpenCode configurations.
  • Deprecation of Old Local Models: Older local models like gpt-oss-20b, gpt-oss-120b, and glm-4-7-flash have been removed from Codex and OpenCode configurations, replaced by the new Qwen local wiring.
  • Templated Fish Wrappers: New templated coxel and coxelh fish shell wrappers were added, allowing for dynamic substitution of the __QWEN_LOCAL__ placeholder during generation.
  • Updated Build Script: The scripts/llm-update.sh script was updated to hydrate the new templated fish functions, ensuring they are correctly generated.
  • Extended Test Coverage: Fish wrapper specifications were extended to cover both the template placeholders and the generated substitutions for the new Qwen model.
Changelog
  • config/codex/config.toml
    • Removed gpt-oss-20b, gpt-oss-120b, and glm-4-7-flash profiles.
    • Added qwen-local profile pointing to qwen/qwen3.5-9b with lmstudio provider.
  • config/codex/config.tpl.toml
    • Removed gpt-oss-20b, gpt-oss-120b, and glm-4-7-flash profiles.
    • Added qwen-local profile using __QWEN_LOCAL__ placeholder with lmstudio provider.
  • config/opencode/opencode.jsonc
    • Removed openai/gpt-oss-20b, openai/gpt-oss-120b, and zai-org/glm-4.7-flash model entries from LM Studio configuration.
    • Added qwen/qwen3.5-9b model entry for LM Studio.
    • Removed openai/gpt-oss-20b model entry from Ollama configuration.
  • config/opencode/opencode.tpl.jsonc
    • Removed openai/gpt-oss-20b, openai/gpt-oss-120b, and zai-org/glm-4.7-flash model entries from LM Studio configuration.
    • Added __QWEN_LOCAL__ model entry for LM Studio.
    • Removed openai/gpt-oss-20b model entry from Ollama configuration.
  • home-manager/programs/fish/functions/_coxel_function.fish
    • Updated function description to mention Qwen model.
    • Changed codex calls to use qwen/qwen3.5-9b model and lmstudio provider instead of glm-4-7-flash profile.
  • home-manager/programs/fish/functions/_coxel_function.tpl.fish
    • Added new file containing a templated fish function for _coxel_function using __QWEN_LOCAL__.
  • home-manager/programs/fish/functions/_coxelh_function.fish
    • Updated function description to mention Qwen model.
    • Changed codex calls to use qwen/qwen3.5-9b model and lmstudio provider instead of glm-4-7-flash profile.
  • home-manager/programs/fish/functions/_coxelh_function.tpl.fish
    • Added new file containing a templated fish function for _coxelh_function using __QWEN_LOCAL__.
  • models.json
    • Added qwen-local alias mapping to qwen/qwen3.5-9b.
  • scripts/llm-update.sh
    • Added _coxel_function.tpl.fish and _coxelh_function.tpl.fish to the list of templates to be processed.
  • spec/fish/_coxel_function.tpl_test.fish
    • Added new test file to verify the _coxel_function.tpl.fish behavior with placeholders.
  • spec/fish/_coxel_function_test.fish
    • Updated tests to verify _coxel_function uses the substituted Qwen model and lmstudio provider.
  • spec/fish/_coxelh_function.tpl_test.fish
    • Added new test file to verify the _coxelh_function.tpl.fish behavior with placeholders.
  • spec/fish/_coxelh_function_test.fish
    • Updated tests to verify _coxelh_function uses the substituted Qwen model and lmstudio provider.
Activity
  • No human activity has occurred on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request correctly wires up the local Qwen model, replacing old configurations. The introduction of template files for fish functions is a great improvement. My review includes suggestions to further improve maintainability by using the newly defined qwen-local profile in the fish wrapper functions instead of hardcoding the model name and provider. This would make future updates to the local model configuration easier, as changes would be centralized in the config.toml file. I've also included suggestions for updating the new test files to align with this change.

Comment on lines +5 to +10
if test (count $argv) -eq 0
codex --model '__QWEN_LOCAL__' --full-auto -c model_provider=lmstudio -c model_reasoning_summary_format=experimental
else
set -l prompt (string join " " -- $argv)
codex exec --model '__QWEN_LOCAL__' --full-auto -c model_provider=lmstudio -c model_reasoning_summary_format=experimental -- "$prompt"
end

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 better maintainability and consistency, consider using the qwen-local profile, which is already defined in config/codex/config.tpl.toml. This avoids hardcoding the model and provider in this script. If the local model configuration changes in the future, you would only need to update the config.toml file.

  if test (count $argv) -eq 0
    codex --profile 'qwen-local' --full-auto -c model_reasoning_summary_format=experimental
  else
    set -l prompt (string join " " -- $argv)
    codex exec --profile 'qwen-local' --full-auto -c model_reasoning_summary_format=experimental -- "$prompt"
  end

return 1
end

codex exec --model '__QWEN_LOCAL__' --full-auto -c model_provider=lmstudio -c model_reasoning_summary_format=experimental -- "$prompt"

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 better maintainability, it would be better to use the qwen-local profile here, similar to my comment on _coxel_function.tpl.fish. This centralizes the local model configuration.

  codex exec --profile 'qwen-local' --full-auto -c model_reasoning_summary_format=experimental -- "$prompt"

Comment thread spec/fish/_coxel_function.tpl_test.fish Outdated
Comment on lines +10 to +11
@test "no args uses QWEN_LOCAL placeholder" (grep -c "__QWEN_LOCAL__" $log1) -ge 1
@test "no args forces lmstudio provider" (grep -c "model_provider=lmstudio" $log1) -ge 1

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

If you apply the suggestion to use the qwen-local profile in _coxel_function.tpl.fish, this test should be updated to check for the profile name instead of the placeholder and provider.

@test "no args uses qwen-local profile" (grep -c "qwen-local" $log1) -ge 1

Comment thread spec/fish/_coxel_function.tpl_test.fish Outdated
Comment on lines +21 to +22
@test "with args uses QWEN_LOCAL placeholder" (grep -c "__QWEN_LOCAL__" $log2) -ge 1
@test "with args forces lmstudio provider" (grep -c "model_provider=lmstudio" $log2) -ge 1

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

Similarly, if you use the qwen-local profile, this part of the test should be updated to check for the profile.

@test "with args uses qwen-local profile" (grep -c "qwen-local" $log2) -ge 1

Comment on lines +13 to +14
@test "non-empty prompt uses QWEN_LOCAL placeholder" (grep -c "__QWEN_LOCAL__" $log1) -ge 1
@test "non-empty prompt forces lmstudio provider" (grep -c "model_provider=lmstudio" $log1) -ge 1

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

If you apply the suggestion to use the qwen-local profile in _coxelh_function.tpl.fish, this test should be updated to check for the profile name.

@test "non-empty prompt uses qwen-local profile" (grep -c "qwen-local" $log1) -ge 1

Entire-Checkpoint: 882ea478a15e
@coderabbitai

coderabbitai Bot commented Mar 13, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 05dd981a-52c5-41e9-96f0-03cc1d65ecb7

📥 Commits

Reviewing files that changed from the base of the PR and between c049428 and 713a2f4.

📒 Files selected for processing (23)
  • config/codex/config.toml
  • config/codex/config.tpl.toml
  • config/opencode/opencode.jsonc
  • config/opencode/opencode.tpl.jsonc
  • home-manager/programs/fish/default.nix
  • home-manager/programs/fish/functions/_coxel_function.fish
  • home-manager/programs/fish/functions/_coxel_function.tpl.fish
  • home-manager/programs/fish/functions/_coxelh_function.fish
  • home-manager/programs/fish/functions/_coxelh_function.tpl.fish
  • home-manager/programs/fish/functions/_ocxel_function.fish
  • home-manager/programs/fish/functions/_ocxel_function.tpl.fish
  • home-manager/programs/fish/functions/_ocxelh_function.fish
  • home-manager/programs/fish/functions/_ocxelh_function.tpl.fish
  • models.json
  • scripts/llm-update.sh
  • spec/fish/_coxel_function.tpl_test.fish
  • spec/fish/_coxel_function_test.fish
  • spec/fish/_coxelh_function.tpl_test.fish
  • spec/fish/_coxelh_function_test.fish
  • spec/fish/_ocxel_function.tpl_test.fish
  • spec/fish/_ocxel_function_test.fish
  • spec/fish/_ocxelh_function.tpl_test.fish
  • spec/fish/_ocxelh_function_test.fish

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added Fish shell shortcuts for running OpenCode and Codex locally in interactive and headless modes (ocxel / ocxelh and coxel / coxelh).
  • Updates

    • Switched local model provider to LM Studio and standardized on a Qwen 3.5 9B local model with reduced reasoning effort.
    • Command invocations updated to use OSS/local-provider flags and explicit model selection.
  • Tests

    • Added and extended tests covering interactive and headless behaviors, prompt handling, and provider/model flags.

Walkthrough

Consolidates local LLM profiles to a single Qwen 3.5 9B model via LM Studio, updates Codex/OpenCode model registries, adds four Fish shell function pairs (interactive/headless) for Codex/OpenCode, extends tests for those functions, and updates the llm-update template mappings.

Changes

Cohort / File(s) Summary
Configuration & Model Registry
config/codex/config.toml, config/codex/config.tpl.toml, config/opencode/opencode.jsonc, config/opencode/opencode.tpl.jsonc, models.json
Removes multiple GPT-OSS/GLM profiles and adds oss_provider = "lmstudio" plus a single qwen-localqwen/qwen3.5-9b profile; updates OpenCode model maps accordingly.
Fish Shell - Codex functions
home-manager/programs/fish/default.nix, home-manager/programs/fish/functions/_coxel_function.*, home-manager/programs/fish/functions/_coxelh_function.*
Adds ocxel/ocxelh abbreviations and creates/updates Codex wrapper functions to invoke Codex locally using LM Studio + Qwen model with minimal reasoning effort.
Fish Shell - OpenCode functions
home-manager/programs/fish/functions/_ocxel_function.*, home-manager/programs/fish/functions/_ocxelh_function.*
Adds OpenCode wrapper functions (interactive and headless) that call opencode with the local LM Studio Qwen model; include prompt handling and validation.
Build & Template Infrastructure
scripts/llm-update.sh
Adds four template→output mappings for the new Fish function templates so templates propagate to generated function files.
Tests (fishtape)
spec/fish/_coxel_function*.fish, spec/fish/_coxelh_function*.fish, spec/fish/_ocxel_function*.fish, spec/fish/_ocxelh_function*.fish
Adds/updates comprehensive tests validating interactive and headless modes, prompt handling, model substitution (qwen/qwen3.5-9b), --oss and --local-provider lmstudio, and model_reasoning_effort settings.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant User
participant FishFunc as Fish function (ocxel/ocxelh/_coxel/_coxelh)
participant CLI as Codex / OpenCode CLI
participant LMStudio as LM Studio (local runtime)
User->>FishFunc: invoke (args or prompt)
FishFunc->>CLI: build command (flags: --oss, --local-provider lmstudio, --model qwen/qwen3.5-9b, --c model_reasoning_effort=minimal)
CLI->>LMStudio: request inference / run model
LMStudio-->>CLI: response / output
CLI-->>FishFunc: stdout / exit status
FishFunc-->>User: display result / status

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

enhancement

Poem

🐰
Nibbling through configs late at night,
Qwen hops in, local and bright.
LM Studio hums, prompts take flight,
Four new functions—what a delight! ✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/local-qwen-codex-config
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…l Qwen model

Entire-Checkpoint: c9a2c3f2b9ba
@shunkakinoki
shunkakinoki marked this pull request as ready for review March 13, 2026 19:14
Copilot AI review requested due to automatic review settings March 13, 2026 19:14
@mesa-dot-dev

mesa-dot-dev Bot commented Mar 13, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@shunkakinoki
shunkakinoki merged commit 713a8e1 into main Mar 13, 2026
21 checks passed
@shunkakinoki
shunkakinoki deleted the feat/local-qwen-codex-config branch March 13, 2026 19:14

Copilot AI left a comment

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.

Pull request overview

Wires a local Qwen model (qwen/qwen3.5-9b) into Codex/OpenCode configs and standardizes fish wrapper generation via templates and placeholder substitution.

Changes:

  • Added qwen-local alias in models.json and updated Codex/OpenCode configs to use Qwen via LM Studio.
  • Introduced templated fish wrapper functions (*_function.tpl.fish) and updated scripts/llm-update.sh to hydrate generated wrappers.
  • Extended fish specs to validate both template placeholders (__QWEN_LOCAL__) and substituted outputs.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
spec/fish/_ocxelh_function_test.fish Adds spec coverage for generated ocxelh OpenCode wrapper using Qwen via LM Studio.
spec/fish/_ocxelh_function.tpl_test.fish Adds spec coverage for templated ocxelh wrapper verifying __QWEN_LOCAL__ placeholder.
spec/fish/_ocxel_function_test.fish Adds spec coverage for generated ocxel OpenCode wrapper (interactive + run modes).
spec/fish/_ocxel_function.tpl_test.fish Adds spec coverage for templated ocxel wrapper placeholder behavior.
spec/fish/_coxelh_function_test.fish Extends coxelh spec to assert LM Studio provider + Qwen + minimal reasoning.
spec/fish/_coxelh_function.tpl_test.fish Adds spec coverage for templated coxelh wrapper placeholder behavior.
spec/fish/_coxel_function_test.fish Updates coxel spec assertions from old local model to Qwen/LM Studio flags.
spec/fish/_coxel_function.tpl_test.fish Adds spec coverage for templated coxel wrapper placeholder behavior.
scripts/llm-update.sh Adds template-to-generated mappings for new fish wrapper templates.
models.json Adds qwen-local alias pointing to qwen/qwen3.5-9b.
home-manager/programs/fish/functions/_ocxelh_function.tpl.fish New templated OpenCode headless wrapper using __QWEN_LOCAL__.
home-manager/programs/fish/functions/_ocxelh_function.fish New generated OpenCode headless wrapper pinned to qwen/qwen3.5-9b.
home-manager/programs/fish/functions/_ocxel_function.tpl.fish New templated OpenCode prompt wrapper (interactive/run) using __QWEN_LOCAL__.
home-manager/programs/fish/functions/_ocxel_function.fish New generated OpenCode prompt wrapper pinned to qwen/qwen3.5-9b.
home-manager/programs/fish/functions/_coxelh_function.tpl.fish New templated Codex headless wrapper using LM Studio + __QWEN_LOCAL__.
home-manager/programs/fish/functions/_coxelh_function.fish Updates generated Codex headless wrapper to Qwen/LM Studio flags.
home-manager/programs/fish/functions/_coxel_function.tpl.fish New templated Codex prompt wrapper using LM Studio + __QWEN_LOCAL__.
home-manager/programs/fish/functions/_coxel_function.fish Updates generated Codex prompt wrapper to Qwen/LM Studio flags.
home-manager/programs/fish/default.nix Registers new fish functions/aliases for ocxel and ocxelh.
config/opencode/opencode.tpl.jsonc Replaces prior local model entries with __QWEN_LOCAL__ for LM Studio provider.
config/opencode/opencode.jsonc Refreshes generated OpenCode config to use qwen/qwen3.5-9b.
config/codex/config.tpl.toml Adds qwen-local profile and LM Studio OSS provider wiring via placeholders.
config/codex/config.toml Refreshes generated Codex config with qwen-local profile targeting qwen/qwen3.5-9b.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@@ -0,0 +1,11 @@
function _coxel_function --description "Run Codex with a free-form prompt using the local Qwen model"
# Run Codex with a free-form prompt (spaces allowed) using the local Qwen model
# Usage: cxel [<prompt words...>]
# Run Codex with a free-form prompt (spaces allowed) using the local glm-4-7-flash model
function _coxel_function --description "Run Codex with a free-form prompt using the local Qwen model"
# Run Codex with a free-form prompt (spaces allowed) using the local Qwen model
# Usage: cxel [<prompt words...>]

# ── no args: interactive mode ─────────────────────────────
set log1 (mktemp)
function opencode; echo $argv >> $log1; end

# ── with args: run mode ──────────────────────────────────
set log2 (mktemp)
function opencode; echo $argv >> $log2; end

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

2 issues found across 23 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:3">
P3: The usage comment points to `cxel`, but this wrapper is exposed as `coxel`. Update it so the generated wrapper does not document a non-existent command.</violation>
</file>

<file name="home-manager/programs/fish/functions/_ocxel_function.tpl.fish">

<violation number="1" location="home-manager/programs/fish/functions/_ocxel_function.tpl.fish:6">
P2: This wrapper only overrides OpenCode's primary model, so lightweight `small_model` calls can still go to the remote `cliproxyapi/glm-4.7` provider.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

# Usage: ocxel [<prompt words...>]

if test (count $argv) -eq 0
opencode -m 'lmstudio/__QWEN_LOCAL__'

@cubic-dev-ai cubic-dev-ai Bot Mar 13, 2026

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.

P2: This wrapper only overrides OpenCode's primary model, so lightweight small_model calls can still go to the remote cliproxyapi/glm-4.7 provider.

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/_ocxel_function.tpl.fish, line 6:

<comment>This wrapper only overrides OpenCode's primary model, so lightweight `small_model` calls can still go to the remote `cliproxyapi/glm-4.7` provider.</comment>

<file context>
@@ -0,0 +1,11 @@
+  # Usage: ocxel [<prompt words...>]
+
+  if test (count $argv) -eq 0
+    opencode -m 'lmstudio/__QWEN_LOCAL__'
+  else
+    set -l prompt (string join " " -- $argv)
</file context>
Fix with Cubic

@@ -0,0 +1,11 @@
function _coxel_function --description "Run Codex with a free-form prompt using the local Qwen model"
# Run Codex with a free-form prompt (spaces allowed) using the local Qwen model
# Usage: cxel [<prompt words...>]

@cubic-dev-ai cubic-dev-ai Bot Mar 13, 2026

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.

P3: The usage comment points to cxel, but this wrapper is exposed as coxel. Update it so the generated wrapper does not document a non-existent command.

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 3:

<comment>The usage comment points to `cxel`, but this wrapper is exposed as `coxel`. Update it so the generated wrapper does not document a non-existent command.</comment>

<file context>
@@ -0,0 +1,11 @@
+function _coxel_function --description "Run Codex with a free-form prompt using the local Qwen model"
+  # Run Codex with a free-form prompt (spaces allowed) using the local Qwen model
+  # Usage: cxel [<prompt words...>]
+
+  if test (count $argv) -eq 0
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants