REQ-INFER-025: Multimodal input is bounded, tier-gated and degrades gracefully

← Requirements

What it requires

  1. Given a config with no vision-capable tier, Then has_vision_capable_tier is false and select_vision_tier is empty.
  2. Given a tier that declares "vision" and has never been loaded, Then entropic_model_has_vision reports it as vision-capable.
  3. Given a text-only model and multimodal input, Then the turn completes gracefully.
  4. Given a non-existent file, an oversize file, or a non-image, Then preprocessing throws; given a valid image within bounds, Then it is not resized; given one exceeding max dimensions, Then it is resized preserving aspect ratio.
  5. Given the base adapter, Then format_content_parts produces the OpenAI content array.
tier
NOT_RUN

Where it lives

  • src/inference11
  • src/facade3

See it on the map

How it is met

implemented bytestsresultbilinear_resizedecodeentropic_model_has_visionentropic_run_messagesentropic_run_messages_streaminggenerate_multimodalhas_vision_capable_tiermtmd_prefillpreprocess_bufferpreprocess_fileread_image_bytesresize_if_neededselect_vision_tiertier_declares_visionImage within bounds is not resizedabsentOrchestrator drives create_tier_backends + activation failureabsentOrchestrator has_vision_capable_tier reflects loaded stateabsentOrchestrator has_vision_capable_tier reports false on emptyabsentOrchestrator initialize against missing tier paths fails cleanlyabsentPreprocess from memory bufferabsentPreprocess valid small imageabsentReject file exceeding max sizeabsentReject non-existent fileabsentReject non-image fileabsentResize preserves aspect ratioabsentResize triggers when image exceeds max dimsabsententropic_model_has_vision on configured handle for unknown tier returns 0absententropic_model_has_vision returns 0 on NULL handleabsententropic_model_has_vision returns 0 on unconfigured handleabsententropic_model_has_vision with NULL model_id returns 0absententropic_model_has_vision with empty model_id returns 0absententropic_run_messages on configured handle with empty arrayabsententropic_run_messages on configured handle with malformed JSONabsententropic_run_messages on null handle returns INVALID_HANDLEabsententropic_run_messages on unconfigured handle returns INVALID_STATEabsententropic_run_messages rejects NULL handleabsententropic_run_messages with console logging disabled still absententropic_run_messages with image content but no vision tierabsententropic_run_messages with malformed JSON returns GENERATE_FAILEDabsententropic_run_messages with null args returns INVALID_ARGUMENTabsententropic_run_messages: image without vision tier → NO_VISION_TIERabsententropic_run_messages_streaming on configured handle with empty arrayabsententropic_run_messages_streaming on unconfigured handle returns INVALID_STATEabsententropic_run_messages_streaming rejects NULL handleabsententropic_run_messages_streaming validates argsabsentgh#157: a deferred tier answers vision from config while unloadedabsent

Show on the map

Implemented by

Tests (32)

Reached through calls

32 tests: 32 absent

testresultlinked byimplementers exercisedcalls away
Image within bounds is not resizedabsentinferred5 of 141
Preprocess valid small imageabsentinferred5 of 141
Reject file exceeding max sizeabsentinferred5 of 141
Reject non-existent fileabsentinferred5 of 141
Reject non-image fileabsentinferred5 of 141
Resize preserves aspect ratioabsentinferred5 of 141
Resize triggers when image exceeds max dimsabsentinferred5 of 141
Preprocess from memory bufferabsentinferred4 of 14: bilinear_resize, decode, preprocess_buffer, resize_if_needed1
Orchestrator drives create_tier_backends + activation failureabsentinferred2 of 14: has_vision_capable_tier, select_vision_tier1
entropic_model_has_vision on configured handle for unknown tier returns 0absentinferred2 of 14: entropic_model_has_vision, tier_declares_vision1
entropic_model_has_vision returns 0 on NULL handleabsentinferred2 of 14: entropic_model_has_vision, tier_declares_vision1
entropic_model_has_vision returns 0 on unconfigured handleabsentinferred2 of 14: entropic_model_has_vision, tier_declares_vision1
entropic_model_has_vision with NULL model_id returns 0absentinferred2 of 14: entropic_model_has_vision, tier_declares_vision1
entropic_run_messages on configured handle with empty arrayabsentinferred2 of 14: entropic_run_messages, has_vision_capable_tier1
entropic_run_messages on configured handle with malformed JSONabsentinferred2 of 14: entropic_run_messages, has_vision_capable_tier1
entropic_run_messages on null handle returns INVALID_HANDLEabsentinferred2 of 14: entropic_run_messages, has_vision_capable_tier1
entropic_run_messages on unconfigured handle returns INVALID_STATEabsentinferred2 of 14: entropic_run_messages, has_vision_capable_tier1
entropic_run_messages rejects NULL handleabsentinferred2 of 14: entropic_run_messages, has_vision_capable_tier1
entropic_run_messages with console logging disabled still absentinferred2 of 14: entropic_run_messages, has_vision_capable_tier1
entropic_run_messages with image content but no vision tierabsentinferred2 of 14: entropic_run_messages, has_vision_capable_tier1
entropic_run_messages with malformed JSON returns GENERATE_FAILEDabsentinferred2 of 14: entropic_run_messages, has_vision_capable_tier1
entropic_run_messages with null args returns INVALID_ARGUMENTabsentinferred2 of 14: entropic_run_messages, has_vision_capable_tier1
entropic_run_messages: image without vision tier → NO_VISION_TIERabsentinferred2 of 14: entropic_run_messages, has_vision_capable_tier1
entropic_run_messages_streaming on configured handle with empty arrayabsentinferred2 of 14: entropic_run_messages_streaming, has_vision_capable_tier1
entropic_run_messages_streaming on unconfigured handle returns INVALID_STATEabsentinferred2 of 14: entropic_run_messages_streaming, has_vision_capable_tier1
entropic_run_messages_streaming rejects NULL handleabsentinferred2 of 14: entropic_run_messages_streaming, has_vision_capable_tier1
entropic_run_messages_streaming validates argsabsentinferred2 of 14: entropic_run_messages_streaming, has_vision_capable_tier1
Orchestrator has_vision_capable_tier reflects loaded stateabsentinferred1 of 14: has_vision_capable_tier1
Orchestrator has_vision_capable_tier reports false on emptyabsentinferred1 of 14: has_vision_capable_tier1
Orchestrator initialize against missing tier paths fails cleanlyabsentinferred1 of 14: has_vision_capable_tier1
entropic_model_has_vision with empty model_id returns 0absentinferred1 of 14: entropic_model_has_vision1
gh#157: a deferred tier answers vision from config while unloadedabsentinferred1 of 14: tier_declares_vision1