Skip to content

feat(vision): #106 slice 1 — VL serving with verified mmproj readiness, honest observe routing, native image parts - #2093

Merged
joelteply merged 3 commits into
canaryfrom
feat/vision-serving-mmproj-observe
Aug 2, 2026
Merged

joelteply merged 3 commits into
canaryfrom
feat/vision-serving-mmproj-observe

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

Task #106 slice 1 (vision-serving, P0) — personas' vision gates live mode. Three coherent units:

1. Verified vision readiness on the serving lane

The --mmproj spawn path existed; nothing verified the multimodal endpoint actually answers. Now:

  • LlamaServerControl::multimodal_support() reads the running server's own /props modalities block.
  • vision_lane_ready() (pure): declared Vision + resolved mmproj + /props modalities.vision must ALL agree — every gap is a named, loud error; an unverified claim of sight is refused by construction.
  • ServingSnapshot.vision_ready publishes the reconcile's verified verdict (serde-default back-compat; ts-rs regenerated).

2. A VL model the serving daemon can actually bring up + honest observe routing

  • Catalog row ggml-org/Qwen2.5-VL-7B-Instruct-GGUF (llama-server provider, Vision + ToolUse, ~4.7 GB Q4_K_M + ~1.4 GB f16 mmproj in ONE repo → models/pull acquires both, find_mmproj_beside resolves — zero per-machine paths). Its capability_rank stays below the 14B coder, so it never hijacks the live lane by surprise; serving/pin brings it up deliberately.
  • cognition/vision-describe (the engine behind persona look/observe acts and the live FrameDescriber) now selects only models whose lane answers: llama-server rows gate on the live snapshot (ready + active + vision_ready); llamacpp-local rows gate on the opt-in + artifacts; cloud rows gate on key presence. Kills the pre-Build(deps-dev): Bump @types/node from 22.14.0 to 24.2.1 #106 shape where prefer-local picked an artifact-less VL row and every observe act died at select() ("adapter not connected") while a good vision lane sat registered. All-skipped stays the honest no-eyes failure — never a fabricated description — with per-candidate skip reasons logged.

3. Native raw images for vision-capable models (Joel's scope addition)

OpenAICompatibleAdapter now gates image content parts per the target model row's Capability::Vision via sensory::route: vision-capable → proper image_url base64 data-URI parts in the /v1 payload (what the multimodal llama-server lane consumes natively); non-vision → the VisionDescriptionService text bridge unchanged, and image parts are dropped loudly instead of POSTed at a text-only endpoint. Previously image_url was emitted unconditionally.

Tests (all with // what this catches:)

  • vision_lane_ready_requires_declaration_projector_and_props_confirmation
  • snapshot_mapping_is_honest (extended: verdict survives into the snapshot)
  • llama_server_row_is_servable_only_when_active_ready_and_vision_verified
  • vision_capable_model_gets_raw_image_content_parts
  • non_vision_model_has_image_parts_dropped_and_keeps_bridge_text

cargo check clean; targeted cargo test -p continuum-core --lib --features metal,accelerate for every touched mod: 89 + 44 + 31 pass.

Operator steps post-merge (to run the acceptance test — Atlas's observe succeeding)

  1. continuum models/pull --model_id ggml-org/Qwen2.5-VL-7B-Instruct-GGUF (~6.1 GB: GGUF + mmproj, lands in the HF cache).
  2. serving/pin ggml-org/Qwen2.5-VL-7B-Instruct-GGUF (or let the planner pick it where it's the best fit) — the reconcile verifies /props modalities.vision and publishes vision_ready: true.
  3. Atlas's observation act needs a connected eye-node client for the pixel capture (perception/observe is Provided); with the lane vision-ready, the describe/native-image path behind it stops failing "adapter not connected".

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

joelteply and others added 3 commits August 1, 2026 19:29
…e + ServingSnapshot.vision_ready

The mmproj spawn path existed (--mmproj via resolve_mmproj_for_model) but nothing
verified the multimodal endpoint actually ANSWERS: a Vision row whose projector
failed to load (or a text-only build) served with the capability silently absent.

- LlamaServerControl::multimodal_support(): reads the running server's own
  /props 'modalities' block (vision/audio). Default Ok(None) keeps fakes honest.
- vision_lane_ready(): pure verdict — declared Vision + resolved mmproj +
  /props modalities.vision must ALL agree before a lane may claim sight;
  every gap is a named, loud error (never an unverified claim).
- ServingSnapshot.vision_ready: the reconcile's verified verdict, published on
  the snapshot so the observation path gates on the LIVE lane's truth, not the
  catalog row's declaration. serde(default) keeps old snapshots readable.
- serving_daemon reconcile probes + threads the verdict into
  snapshot_from_outcome; not-ready reasons land as serving.vision.* probes.

Tests: vision_lane_ready_requires_declaration_projector_and_props_confirmation
(all five branches), snapshot_mapping_is_honest extended to prove the verdict
survives into the published snapshot.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… only to VERIFIED eyes

Catalog: ggml-org/Qwen2.5-VL-7B-Instruct-GGUF — the first llama-server-provider
row with Capability::Vision, i.e. the first VL model the serving daemon can
actually bring up. ggml-org repo ships GGUF + mmproj sidecar in one repo, so
'models/pull --model_id ggml-org/Qwen2.5-VL-7B-Instruct-GGUF' acquires both
(the pull path's Vision mmproj-sibling logic) and find_mmproj_beside resolves
the projector with zero per-machine path edits. ~4.7GB Q4_K_M + ~1.4GB f16
projector; keeps ToolUse so the live-mode citizen can see AND act. Its
capability_rank stays below the 14B coder, so it never hijacks the live lane —
operator brings vision up via models/pull + serving/pin.

Observe path (cognition/vision-describe — the engine behind every persona
look/observe act and the live FrameDescriber): selection now requires the lane
BEHIND a Vision row to actually answer, not just the row's declaration —
- llama-server rows: live ServingSnapshot must be ready, serving THIS model,
  and vision_ready (the daemon's verified /props verdict);
- llamacpp-local rows: only under the CONTINUUM_LOCAL_LLAMA=1 opt-in with GGUF
  and mmproj resolving on disk;
- cloud rows: only when the provider's API-key secret exists (mirror of
  adapter registration).
Pre-#106 failure this kills: prefer-local picked a VL row with no artifacts on
disk and EVERY observe act died at select() ('adapter not connected') even while
a good vision lane sat registered. All-skipped stays the HONEST no-eyes failure
(Ok(None) → never a fabricated description), now with per-candidate skip reasons
logged for diagnosis.

Tests: llama_server_row_is_servable_only_when_active_ready_and_vision_verified.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…gated per MODEL row

Joel's scope addition on #106: a VISION-capable model must receive raw pixels
NATIVELY — OpenAI-style image_url content parts (base64 data-URI) in the /v1
chat payload, which is exactly what the multimodal llama-server lane's mtmd
tokenizer consumes. The gate is the TARGET MODEL row's Capability::Vision via
sensory::route (the one sensory-bridge decision point), never a provider-level
guess; a row the registry doesn't know (dynamic catalogs, DMR) falls back to
the provider capability scan already advertised by capabilities().

Non-vision models keep the VisionDescriptionService text-description bridge
UNCHANGED — and the adapter now enforces it: image parts are dropped (loudly
logged) instead of being POSTed at a text-only endpoint where they are at best
an API error and at worst a silent drop the persona would mistake for sight.
Previously image_url parts were emitted unconditionally for every model.

Tests (pure payload assembly, both branches):
- vision_capable_model_gets_raw_image_content_parts
- non_vision_model_has_image_parts_dropped_and_keeps_bridge_text

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 483c22e into canary Aug 2, 2026
4 checks passed
@joelteply
joelteply deleted the feat/vision-serving-mmproj-observe branch August 2, 2026 00:30
@joelteply
joelteply restored the feat/vision-serving-mmproj-observe branch August 21, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant