REQ-INFER-025: Multimodal input is bounded, tier-gated and degrades gracefully¶
What it requires
- Given a config with no vision-capable tier, Then has_vision_capable_tier is false and select_vision_tier is empty.
- Given a tier that declares "vision" and has never been loaded, Then entropic_model_has_vision reports it as vision-capable.
- Given a text-only model and multimodal input, Then the turn completes gracefully.
- 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.
- Given the base adapter, Then format_content_parts produces the OpenAI content array.
- tier
- NOT_RUN
How it is met
Implemented by
bilinear_resizesrc/inference/image_preprocessor.cpp:99decodesrc/inference/image_preprocessor.cpp:226entropic_model_has_visionsrc/facade/entropic.cpp:5141entropic_run_messagessrc/facade/entropic.cpp:2864entropic_run_messages_streamingsrc/facade/entropic.cpp:2940generate_multimodalsrc/inference/llama_cpp_backend.cpp:3402has_vision_capable_tiersrc/inference/orchestrator.cpp:2266mtmd_prefillsrc/inference/llama_cpp_backend.cpp:3289preprocess_buffersrc/inference/image_preprocessor.cpp:204preprocess_filesrc/inference/image_preprocessor.cpp:181read_image_bytessrc/inference/image_preprocessor.cpp:146resize_if_neededsrc/inference/image_preprocessor.cpp:266select_vision_tiersrc/inference/orchestrator.cpp:2280tier_declares_visionsrc/inference/orchestrator.cpp:2037
Tests (32)
Reached through calls
32 tests: 32 absent
| test | result | linked by | implementers exercised | calls away |
|---|---|---|---|---|
Image within bounds is not resized | absent | inferred | 5 of 14 | 1 |
Preprocess valid small image | absent | inferred | 5 of 14 | 1 |
Reject file exceeding max size | absent | inferred | 5 of 14 | 1 |
Reject non-existent file | absent | inferred | 5 of 14 | 1 |
Reject non-image file | absent | inferred | 5 of 14 | 1 |
Resize preserves aspect ratio | absent | inferred | 5 of 14 | 1 |
Resize triggers when image exceeds max dims | absent | inferred | 5 of 14 | 1 |
Preprocess from memory buffer | absent | inferred | 4 of 14: bilinear_resize, decode, preprocess_buffer, resize_if_needed | 1 |
Orchestrator drives create_tier_backends + activation failure | absent | inferred | 2 of 14: has_vision_capable_tier, select_vision_tier | 1 |
entropic_model_has_vision on configured handle for unknown tier returns 0 | absent | inferred | 2 of 14: entropic_model_has_vision, tier_declares_vision | 1 |
entropic_model_has_vision returns 0 on NULL handle | absent | inferred | 2 of 14: entropic_model_has_vision, tier_declares_vision | 1 |
entropic_model_has_vision returns 0 on unconfigured handle | absent | inferred | 2 of 14: entropic_model_has_vision, tier_declares_vision | 1 |
entropic_model_has_vision with NULL model_id returns 0 | absent | inferred | 2 of 14: entropic_model_has_vision, tier_declares_vision | 1 |
entropic_run_messages on configured handle with empty array | absent | inferred | 2 of 14: entropic_run_messages, has_vision_capable_tier | 1 |
entropic_run_messages on configured handle with malformed JSON | absent | inferred | 2 of 14: entropic_run_messages, has_vision_capable_tier | 1 |
entropic_run_messages on null handle returns INVALID_HANDLE | absent | inferred | 2 of 14: entropic_run_messages, has_vision_capable_tier | 1 |
entropic_run_messages on unconfigured handle returns INVALID_STATE | absent | inferred | 2 of 14: entropic_run_messages, has_vision_capable_tier | 1 |
entropic_run_messages rejects NULL handle | absent | inferred | 2 of 14: entropic_run_messages, has_vision_capable_tier | 1 |
entropic_run_messages with console logging disabled still | absent | inferred | 2 of 14: entropic_run_messages, has_vision_capable_tier | 1 |
entropic_run_messages with image content but no vision tier | absent | inferred | 2 of 14: entropic_run_messages, has_vision_capable_tier | 1 |
entropic_run_messages with malformed JSON returns GENERATE_FAILED | absent | inferred | 2 of 14: entropic_run_messages, has_vision_capable_tier | 1 |
entropic_run_messages with null args returns INVALID_ARGUMENT | absent | inferred | 2 of 14: entropic_run_messages, has_vision_capable_tier | 1 |
entropic_run_messages: image without vision tier → NO_VISION_TIER | absent | inferred | 2 of 14: entropic_run_messages, has_vision_capable_tier | 1 |
entropic_run_messages_streaming on configured handle with empty array | absent | inferred | 2 of 14: entropic_run_messages_streaming, has_vision_capable_tier | 1 |
entropic_run_messages_streaming on unconfigured handle returns INVALID_STATE | absent | inferred | 2 of 14: entropic_run_messages_streaming, has_vision_capable_tier | 1 |
entropic_run_messages_streaming rejects NULL handle | absent | inferred | 2 of 14: entropic_run_messages_streaming, has_vision_capable_tier | 1 |
entropic_run_messages_streaming validates args | absent | inferred | 2 of 14: entropic_run_messages_streaming, has_vision_capable_tier | 1 |
Orchestrator has_vision_capable_tier reflects loaded state | absent | inferred | 1 of 14: has_vision_capable_tier | 1 |
Orchestrator has_vision_capable_tier reports false on empty | absent | inferred | 1 of 14: has_vision_capable_tier | 1 |
Orchestrator initialize against missing tier paths fails cleanly | absent | inferred | 1 of 14: has_vision_capable_tier | 1 |
entropic_model_has_vision with empty model_id returns 0 | absent | inferred | 1 of 14: entropic_model_has_vision | 1 |
gh#157: a deferred tier answers vision from config while unloaded | absent | inferred | 1 of 14: tier_declares_vision | 1 |