test(translation): cover file attachments routed to Anthropic - #862
dagardner-nv merged 2 commits into
Conversation
Signed-off-by: David Gardner <dagardner@nvidia.com>
…anslation-file-attachments Signed-off-by: David Gardner <dagardner@nvidia.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA-NeMo/Switchyard/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughThe request translation tests add coverage for Responses URL-file titles and for Chat and Responses file inputs translated to Anthropic. The new cases assert errors for invalid text data, image data supplied as a document, and files without a supported source. ChangesAnthropic document translation tests
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The added attachment-translation tests protect the intended behavior, with no identified issue requiring a change before merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
A rabbit checks each file with care Comment |
What
encode_anthropic_filemethod incrates/switchyard-translation/src/codecs/anthropic/buffered.rsWhy
These request translation paths lacked tests. The new cases protect the file content and error behavior when Switchyard routes OpenAI requests to Anthropic.
Notes for reviewers
Start with
crates/switchyard-translation/tests/request_translation.rs. This PR changes tests only.Validation:
cargo fmt --all --check,cargo clippy --workspace --all-targets --offline -- -D warnings, andcargo test -p switchyard-translation --offlinepassed.Summary by CodeRabbit