Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: HF vision mmproj sidecars (.mmproj) + remove backend-switch surface (WS-5)#1089

Merged
thinmintdev merged 3 commits into
mainfrom
fix/mmproj-hf-inspect-and-ws5-backend-switch
Jul 6, 2026
Merged

fix: HF vision mmproj sidecars (.mmproj) + remove backend-switch surface (WS-5)#1089
thinmintdev merged 3 commits into
mainfrom
fix/mmproj-hf-inspect-and-ws5-backend-switch

Conversation

@thinmintdev

Copy link
Copy Markdown
Contributor

Three logically separate changes, one commit each.

1. fix(models) — HF vision .mmproj sidecars (bug)

The Add-model-by-HF inspect endpoint only surfaced .gguf files, so repos that ship the projector with a bare .mmproj extension (e.g. jcbtc/chadrock-35b-ace-saber-rocmfp4-mtpmmproj-CHADROCK-35B-Ace-Saber-F32.mmproj) had it dropped from the variant list. The Add-by-HF modal builds its vision picker from those variants, so it showed "no mmproj files in repo" and a vision pull silently shipped without a projector.

Inspect now also admits *.mmproj sidecars (guarded on the mmproj token so nothing unrelated leaks into the main quant list), matching the local-directory scanner (discover._is_mmproj_sidecar) which already matches by name regardless of extension. No UI change needed. Two regression tests added (one uses the exact repo layout above).

2. refactor(slots) — remove the backend-switch surface (WS-5)

Backend identity is owned by the slot's profile, so a dedicated backend-switch was a second way to express what profiles already own. Removes POST /api/slots/{name}/backend + its endpoint-only helpers, the useSlotBackend hook/type + slotBackend endpoint const, and the switch UX in slots.jsx / inference-pane.jsx.

The amber backend_mismatch chip is kept (detection unchanged, from the slot_view aggregator) but now opens the slot editor's profile picker instead of firing a switch. Deletes the dedicated endpoint test file and trims the corresponding route/typed-error cases.

3. chore(slots) — FO-1/FO-2 cleanup

  • CLI free-port scan now uses the shared SLOT_PORT_RANGE_START/END constants instead of a hardcoded range(8081, 8100) (was diverging from the API pool).
  • Fix a stale container.py docstring referencing the render_systemd_override default deleted in WS-15.

Verification

  • Backend: ruff clean; targeted tests/api + tests/slots suites pass; 1527 tests collect with no import breakage.
  • UI: tsc typecheck clean, vite build succeeds, .mjs dash tests pass.

🤖 Generated with Claude Code

thinmintdev and others added 3 commits July 5, 2026 22:01
The Add-model-by-HF inspect endpoint only admitted files ending in
`.gguf`, so repos that ship the projector with a bare `.mmproj`
extension (e.g. `mmproj-*-F32.mmproj`) had it dropped from the variant
list. The Add-by-HF modal builds its vision picker from those variants,
so it showed "no mmproj files in repo" and a vision pull silently
shipped without a projector.

Inspect now also admits `*.mmproj` sidecars (guarded on the "mmproj"
token so nothing unrelated leaks into the main quant list), labelled
"mmproj sidecar". This matches the local-directory scanner
(`discover._is_mmproj_sidecar`), which already matches mmproj by name
regardless of extension. No UI change needed — the modal already routes
`/mmproj/i` variants into the vision dropdown and out of the main list.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Backend identity is owned by the slot's profile, so a dedicated
backend-switch was a second way to express what profiles already own.
Removes `POST /api/slots/{name}/backend` and its two endpoint-only
helpers, the `useSlotBackend` hook + `SlotBackendSwitchResponse` type +
`slotBackend` endpoint constant, and the switch UX in `slots.jsx` /
`inference-pane.jsx`.

The amber `backend_mismatch` chip is KEPT (detection is unchanged,
sourced from the slot_view aggregator) but now opens the slot editor's
profile picker via `onEdit` instead of firing a one-click switch — the
sanctioned way to change a slot's backend.

Deletes the dedicated endpoint test file, drops
`test_backend_flip_reconciles_profile_via_route` (the device->profile
reconciliation it covered still lives in `update_config`), and removes
the two `/backend` typed-error params.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
FO-1 (WS-4 straggler): `cli/slot_commands.py` hardcoded
`range(8081, 8100)` for its free-port scan, diverging from the API's
`_next_free_slot_port`. Point it at the shared `SLOT_PORT_RANGE_START/END`
constants in `hardware.stats` (port scan + help string) so the two pools
can never drift.

FO-2: correct a stale `container.py` module docstring that still claimed
`ContainerProvider` reuses an inherited `render_systemd_override` — that
default was deleted in WS-15; unit rendering is owned by
`_render_unit_from_plan`.

Also records the finish-out resolutions (FO-1..FO-4) in the handoff doc.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@thinmintdev thinmintdev enabled auto-merge (squash) July 6, 2026 02:02
@thinmintdev thinmintdev merged commit 4918e66 into main Jul 6, 2026
3 checks passed
@thinmintdev thinmintdev deleted the fix/mmproj-hf-inspect-and-ws5-backend-switch branch July 6, 2026 03:26
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.

1 participant