feat(safety): Google GenAI + Bedrock VCR safety cassettes (Phase T3) - #15
Merged
Merged
Conversation
Added FR-owned safety cassette tests for Google GenAI and AWS Bedrock instrumentation packages. Each package gets 9 tests covering all 3 safety rule types (RegEx, List, UDF), both MASK and ALLOW actions, prompt + completion + streaming safety, recorded against real APIs. Google GenAI: gemini-2.5-flash via Google AI Studio. Bedrock: anthropic.claude-3-haiku via AWS Bedrock Converse API
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
test_safety_cassettes.py) — recorded againstgemini-2.5-flashtests/traces/test_safety_cassettes.py) — recorded againstanthropic.claude-3-haiku-20240307-v1:0via Converse APISafety rule coverage per provider:
Three-mode verification (zero failures):
--fr--cassettes--allNorth-star: All new files — zero modifications to existing TL-owned files.
Test plan
./scripts/run-tests.sh --all --package '*google*generative*'— 32 pass./scripts/run-tests.sh --all --package '*bedrock*'— 100 passgrep -rE "AKIA|AIza|Bearer" tests/**/cassettes/test_safety_cassettes/— no secret leaks