Repository navigation
feat(client): serialize ContentBlock::Attachment across native wires - #1047
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
ContentBlock::Attachment(AttachmentSource::Base64) blocks natively across all three provider wires, returningClientError::UnsupportedContentfor unresolvedAttachmentSource::BlobRefpayloads or unsupported media types:crates/ox-core/src/client/anthropic.rs): encodeimage/*asimageblocks andapplication/pdfasdocumentblocks with base64source.crates/ox-core/src/client/google.rs): encodeimage/*,application/pdf,audio/*, andvideo/*viaGeminiPart::inline_data(inlineDatawithmimeTypeanddata).crates/ox-core/src/client/openai.rs): widenResponsesInputItem::Message::contenttoResponsesMessageContent(Textfor text-only messages,Partswhen attachments are present), encoding text asinput_text,image/*asinput_imagedata URLs, andapplication/pdfasinput_filedata URLs (defaulting missing filenames toattachment.pdf).anthropic,google, andopenaito cover supported MIME types,BlobRefrejection, and unsupported MIME rejection.Test plan
cargo fmt --check(passed)cargo clippy --all-targets -- -D warnings(passed)cargo doc --no-deps(passed)cargo test -p ox-core(225 passed, 0 failed, 2 live tests ignored)cargo llvm-cov -p ox-core --summary-only(97.37% line coverage)nix develop -c run-hooks(all hooks passed)Related