Repository navigation
feat(provider): accept image parts in chat messages (vision on the wire) - #498
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
ajianaz
force-pushed
the
feat/vision-input
branch
from
November 3, 2026 14:32
9670761 to
0fa764a
Compare
| (#437); command-level allow/deny patterns for `run_command` (#438); global session | ||
| index and `sessions --all`, `resume` names the owning project's command (#439); | ||
| context compaction for `chat`, `resume` and `mission` (#440), its overflow recovery | ||
| <<<<<<< HEAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What (description of the change)
Image input on the chat wire (#212):
--image <path|data:…;base64,…>(repeatable) onrun,chatandmission, attached to the first message/turn. Embedders getturn::run_turn_with_images. The OpenAI wire sendstext+image_urlcontent parts. Rules: png/jpeg/gif/webp detected from file bytes, 10 MiB cap; paths are canonicalise-jail-checked (../symlink escapes refused loudly); inline images spill to<codecora home>/tole/images/. The session log stores only a reference (payload.images: path, mime, bytes, fnv1a64 hash); each request reloads the file and re-checks the jail and hash, soresumekeeps working — a changed or missing file reaches the model as an[image unavailable: …]note instead of being dropped.TOLE_VISION=0fails before any request with amodel-capabilityerror; a 400/415/422 whose body names image/vision/multimodal maps to the same error. Docs: README image section +TOLE_VISION, epics, CHANGELOG.Why (the problem you're solving)
Closes #212. The fleet model is multimodal; tole could not carry an image on the wire.
Testing (how you verified this works)
tests/image_input.rsfailed to compile before the implementation (run_turn_with_images,with_image_roots,with_visionabsent). GREEN: 2 integration tests (reference-only logging + replay to a wire image part; the non-vision capability error), 5imagemodule unit tests, and 2 wire tests inopenai.rs(missing file -> note; rejecting server -> capability error).cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace --no-fail-fast(972 passed / 0 failed),cargo test -p tole-core --no-default-features(392 passed / 0 failed),cargo build -p tole-cli --no-default-features: all pass. cora pre-commit: "No issues found".OnceLockso provider signatures are unchanged and resumed sessions can reload;TOLE_VISIONis env-only (no config key);base64added to tole-core (already in the lockfile).