Skip to content

Make Qwen configurable on mcpx/OpenCode #2218

Closed

Description

@dezren39

Ask

Qwen / local-model usage should be one documented config knob per surface (mcpx and OpenCode) instead of scattered, hardcoded model entries across provider blocks and config files.

Interim state (2026-10-29, Drew's order)

A disable pass parked the Qwen/Llama surface area for now:

  • OpenCode (.opencode/opencode.jsonc): Qwen model entries under the still-active cline-pass and commandcode providers are commented out (definitions retained in place, per the fleet config rule: disable = park, never delete). Qwen/Llama entries under cloudflare-ai-gateway and groq were already inert — both providers sit in disabled_providers, and the Cloudflare Workers AI block was already commented out. OpenChamber's copies (settings.json / preferences.json) already carry every Qwen/Llama model in hiddenModels, and no OpenChamber default, routing category, or favorite points at one.
  • mcpx (.mcpx.json): no Qwen/Llama servers or models exist there today; the same pass parked the codedb server under a top-level disabledMcpServers key (definition retained).

The daily sync-models timer re-syncs provider model lists, so commented-out entries may drift back — another reason the durable fix is a knob, not edits.

Acceptance

  • One documented on/off config switch per surface (mcpx, OpenCode) governing Qwen/local-model availability, defaulting off.
  • Flipping the switch restores the parked definitions without re-editing model lists; definitions are never deleted.
  • OpenChamber inherits the OpenCode-side state (no separate per-model hiding pass needed).

Out of scope: the atlas Qwen embedding pass (embed_pass3.py) — a separate, explicitly kept workload.

Acceptance criteria

  • mcpx exposes Qwen/local-model selection as one documented config knob (named in the mcpx docs/config), and OpenCode exposes the equivalent single knob in its config — no scattered per-provider model entries need editing to switch or disable Qwen.
  • Toggling the knob off reproduces the current parked state (no Qwen/Llama models offered on either surface); toggling it on restores the model entries without hand-editing provider blocks.
  • The interim parked definitions from the 2026-10-29 disable pass are either consumed by the knob or removed with the knob's landing noted here.

Activity

  1. added
    kind/featureNew feature or capability request
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    effort/sSmall: expected under 2 hours of work
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Local-model feature audit — what "configurable" has to cover (2026-10-29)

    Drew's correction checked against source: there ARE code features using llama/qwen models in all three systems, and none of them read the provider model listings PR #2220 parked. Full inventory: research_notes/local-model-features-20261029/findings.md (opencode @ 388f652999, openchamber-fork @ 719cc8f01, code @ ce5c72b).

    Verdict on tonight's pass first: it risked nothing. The parked entries (cline-pass qwen3.8-max/3.7-max/3.7-plus, commandcode qwen/*) are hosted-API chat-model listings. Every real feature sources its local model independently — pinned constants in source, or its own settings:

    • OpenCode — messaging embeddings (the two observed llama-server processes). packages/core/src/messaging/embedding.ts: tiers hardcoded in source (tiny=MiniLM, default=Qwen3-Embedding-0.6B, step-up=4B, top=8B) with pinned HuggingFace URLs; spawns llama.cpp b11669 per server process (hence two: standing server + OpenChamber's managed instance). The index it feeds is semantic/hybrid search over messages and session transcripts (messaging_vector table, vectors computed lazily during search) — used by the Messaging service, the agent messaging tool, and plugins via the host. Unavailable → hybrid degrades to fuzzy FTS with a user-visible note. Its knob is messaging.embedding (tier / "off" / remote endpoint / autostart, default on) plus env OPENCODE_DISABLE_EMBEDDING. The fleet config sets no messaging key at all — so the one Qwen that runs 24/7 is governed by a config surface this issue hasn't named yet. It should: "configurable" here means a documented messaging.embedding setting in the fleet config (even if the setting is "leave the default on, deliberately"), not just listing hygiene.
    • OpenChamber — route interpreter local stage. route-local-model.js: Qwen2.5-1.5B-Instruct GGUF (pinned commit+sha256), run via node-llama-cpp to turn one natural-language sentence about model pools into routing overrides, between a no-model keyword stage and the external classification provider. Opt-in download via Settings; not currently downloaded on the laptop, so the stage is inert. Config surface = Settings download + stage toggles, plus the messaging-config bridge (messaging-config.js) it exposes for its instances.
    • mcpx — two surfaces, neither is a listing. (1) Catalog embeddings for semantic tool search (pkgs/mcpx/internal/catalog/embeddings.go): a cascade — remote endpoint → WASM transformer → pure-Go subword embedder that needs no model at all; no embeddings.* settings are configured, so mcpx runs on the no-model floor today by design. (2) The prompt/consumer provider (internal/scripting/provider.go): natural-language intent → tool calls, with provider types including ollama/qwen meaning a local endpoint, resolved from mcpx settings/env. "Qwen configurable on mcpx" therefore means these settings having documented, deliberate values — there is no mcpx model listing to flip.

    Acceptance implication for this issue: a per-surface knob table that names (a) OpenCode provider listings (done, PR #2220), (b) OpenCode messaging.embedding, (c) OpenChamber interpreter local stage, (d) mcpx embeddings.* + prompt-provider settings — each with its current deliberate value, including where the deliberate value is "on" (messaging embeddings) or "absent by design" (mcpx subword floor).

    Related follow-ups filed from the same audit: #2225 (codedb — one shared instance or an effective replacement; its park in PR #2220 is the only config change with functional surface) and dezren39/hatch-personal#3 (Atlas source-code indexing — the corpus side if #2225's replacement path lands on a fleet index).

  4. added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 29, 2026
  5. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Intake review

    • Fleet monitor intake (repo-fleet-monitor, 2026-10-29 05:12 CDT run): this issue had kind/priority/effort labels but no acceptance-criteria section; AC appended and meta/enriched added. A triage task (queue task 3385) was enqueued by this same monitor run under Duty 1 — the issue carried queue/queued with no live task behind it.
    • Still live? Yes — the interim disable pass is recorded in the body as the starting state, not the fix.
    • Related: the 2026-10-29 Qwen/Llama park edits in .opencode/opencode.jsonc and OpenChamber hiddenModels (named in the body).
    • Risks: two surfaces (mcpx + OpenCode) plus OpenChamber's copies can drift; the knob design should say which surface owns the source of truth.
    • Suggested approach: inventory every current Qwen/Llama entry across the surfaces first, then design the knob to generate or gate exactly that set.
  6. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 1, 2026
  7. 2 remaining items

  8. added
    queue/queuedHas a queued task in the Supabase agent queue
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  9. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: OpenChamber scheduled lane (repo-worker-code)
    • Session / ID: queue task 5227
    • Task: Verify current state and document the per-surface local-model knobs and mcpx settings.
  10. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 1, 2026
  11. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (PR opened)

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

Metadata

Metadata

Assignees

Labels

effort/sSmall: expected under 2 hours of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)status:in-review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions