Repository navigation
feat(ox-core): add multimodal attachment types, model modalities, and blob storage - #1043
Merged
Merged
Conversation
… blob storage Add Phase 1 core multimodal foundations for #279: - Declare InputModality, input_modalities, max_attachment_bytes, and supports_media_type on CatalogModel, and mark bundled models in models.toml. - Add AttachmentSource and ContentBlock::Attachment, returning ClientError::UnsupportedContent from wire encoders until Phase 2. - Store deduplicated SHA-256 attachment blobs in SessionStore with get_blob and hydrate_message.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…pe check Address PR #1043 review findings: - Bump SessionStore CURRENT_SCHEMA_VERSION to 2 and move blobs table creation into the v1 -> v2 migration with a regression test. - Parse MIME type/subtype with split_once('/') and eq_ignore_ascii_case in CatalogModel::supports_media_type, rejecting empty subtypes. - Add UnsupportedContent unit tests for Attachment blocks in the Anthropic, Google, and OpenAI wire modules.
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.
Summary
InputModality,CatalogModel::input_modalities,CatalogModel::max_attachment_bytes, andCatalogModel::supports_media_typetoox-core::catalog, and declareinput_modalities = ["text", "image", "pdf"]on bundled multimodal models incrates/ox-core/catalog/models.toml.AttachmentSource(Base64,BlobRef) andContentBlock::Attachmenttoox-core::message, and returnClientError::UnsupportedContentfrom the Anthropic, Google, and OpenAI wire encoders until Phase 2 implements provider attachment serialization.blobstable toSessionStoreinox-core::session:append_messagedecodes inline base64 attachments, deduplicates them by lowercase hex SHA-256 intoblobs, and persistsAttachmentSource::BlobRefinmessages.content;get_blobandhydrate_messageretrieve and re-inline blobs on demand.base64(0.22) andsha2(0.10) workspace dependencies forox-core.Test plan
cargo deny check(advisories ok, bans ok, licenses ok, sources ok)cargo fmt --checkcargo clippy --all-targets -- -D warningscargo doc --no-depscargo test(all workspace unit and integration tests pass)cargo llvm-cov -p ox-core --summary-only(97.21% line coverage acrossox-core, 99.54% insession.rs)nix develop -c run-hooks(all 20 hooks pass)Related