Business · Product · Technology · AI

Retain early conversation text while selecting recent image inputs

A Movo-X provider-request case tracing retained turn text, ordered image selection, private-object reads and an explicit turn-count refusal with captured synthetic requests.

Work directly with Omer Muneer Qazi · Reviewed 29 November 2026

The scenario: an early statement matters after many later photo turns

A conversation can begin with important identity or reported-history information and later accumulate several photo attachments. Reducing image input should not accidentally remove the early text merely because it appeared beside an older attachment. Those are separate selection decisions.

The inspected Movo-X request builder keeps supplied turn text while selecting a bounded recent image set. Three synthetic tests capture its outgoing request shape and object-read behaviour. The fixtures establish what the builder sends through its injected transport, rather than what a real model understands or how clinically important it considers a statement.

Begin with an explicit supplied-turn contract

The builder accepts a supported language and a bounded number of supplied turns. It iterates those turns instead of taking only the last few message objects. In the existing long-conversation fixture, early reported identity and history text remain in the captured request alongside later turns.

A supplemental case checks all forty supplied text turns and verifies that a forty-first causes refusal before the mock provider is invoked. This is an explicit count boundary, not silent truncation of an arbitrarily long history. It does not establish a provider’s token window or guarantee that any forty possible turns fit every model configuration.

Select images by the supplied conversation order

The implementation flattens image attachments from the provided turns and selects the recent entries from that ordered list. Recency here follows the supplied message and attachment order; the builder is not ranking photos by clinical relevance or recovering camera capture timestamps.

The existing fixture uses distinct paths and checks the four selected image payloads in its captured request. That gives the selection a concrete meaning. The authoritative history projection and any caller supplying it need to preserve their intended ordering, rather than expecting the provider builder to infer it from arbitrary timestamps or filenames.

Preserve an older turn’s text when its image is omitted

The supplemental object-read fixture contains five image turns and deliberately makes the oldest image unavailable in its fake store. The builder reads the four selected paths, retains the oldest turn’s text and successfully constructs the synthetic request without reading that omitted object.

This demonstrates the useful independence of text retention and image selection. Removing an older image from this provider request does not delete the stored original or erase its conversation turn. Product access to originals, retention and deletion remain separate lifecycle operations with their own authority and evidence.

Understand the path-identity assumption behind selection

The implementation uses selected image paths as lookup identities while it walks the turns. The inspected base schema declares unique attachment paths and associates an attachment with a message. Those source-level properties help explain the intended input to this builder.

The synthetic selection cases use distinct paths. They do not certify arbitrary callers that repeat the same path in several attachment entries, and the current installed constraints were not queried. A new caller should preserve the same input invariants or define its own duplicate semantics rather than assuming a slice alone proves a universal image-count bound.

Load selected bytes through private storage rather than exposing object paths

For a selected image, the builder reads the private object, checks its selected size and media-type conditions and puts encoded bytes in the provider image block. The object path is a server-side lookup key rather than the image content sent to the provider.

The existing long-conversation fixture checks selected payload contents. The supplemental capture also checks absence of its private-path prefix. The fake image bytes are sufficient to test construction, not real decoding or provider image acceptance. Earlier upload processing and current private-storage permissions remain distinct checks.

Keep text, transcript and image representations intelligible

Text contributes text blocks, voice contributes a labelled transcript block and selected images contribute image blocks. A turn with an omitted image can still contribute its text. A turn with no remaining content does not add an empty provider message in this implementation.

That makes the request shape explainable at the level of actual content blocks. It does not make an assistant reply authoritative or prove that all clinically relevant context is present. Optional structured health context has its own consent and construction path, and the original records remain different from this selected provider input.

Measure payload outcomes without inventing operating-cost claims

The captured fixtures establish turn retention, selected object reads and image-block counts. They do not measure network latency, provider token accounting, invoice charges, process memory or real-model quality. A count boundary and a per-object size check also do not by themselves describe the entire serialized request’s resource use.

For an operating decision, measure those quantities with a dated workload and the actual service configuration. Keep such measurements separate from the deterministic construction tests so a useful request-shape improvement is not presented as an unverified percentage saving.

A practical context-construction acceptance package

Retain early-text, exact-turn-limit, ordered-image, omitted-object and private-path fixtures. Capture the outgoing request with synthetic markers and compare its content blocks before evaluating real-model behaviour. Review the source-history ordering and path-identity assumptions whenever the builder gains another caller.

For a CTO, the result is a context policy that can explain what it retains and what it selects. The pinned source and three scoped cases establish selected construction behaviour. Current database invariants, real image acceptance, model attention and operational measurements remain separately testable responsibilities.

Compare the reviewed boundaries

Independent choices within one provider request

On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.

Input or conditionObserved synthetic resultSeparate acceptance
Early supplied textRetained with later turnsReal-model interpretation and completeness
Older unselected image unavailableNot read; its turn text retainedOriginal-file lifecycle and later access
Selected distinct image pathsPrivate reads and encoded image blocksActual image decoding/provider acceptance
More than forty supplied turnsRefused before mock provider callProvider token window and workload sizing

Illustrative control flow

Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.

require_supported_language_and_turn_count(turns)
selected_images = recent_image_entries_in_supplied_order(turns)
for turn in turns:
    keep_selected_text_and_transcript_blocks(turn)
    load_image_bytes_only_for_selected_paths(turn, selected_images)
    append_nonempty_provider_message()

# Image selection does not require discarding the earlier text history.

About this engineering series

Written by Omer Muneer Qazi from a review of Movo-X implementation and dated engineering records. This article explains source behaviour and historical observations; current production, clinical outcomes and store availability require their own verification. Examples are synthetic and proposed test cases are identified as such.

Explore the Movo-X engineering series → · Related implementation experience →

Discuss a similar engineering problem

Send the workflow, current platform and the decision your team needs to make. I can help define an implementation or review scope with concrete acceptance evidence.

Discuss your project on WhatsApp ↗
WhatsApp Omer about this project ↗