Add Google format validation and proxy test infrastructure#90
Closed
Add Google format validation and proxy test infrastructure#90
Conversation
Implement real Google request/response validation using the generated pbjson serde implementations (replacing the previous stubs that returned errors claiming protobuf types lacked serde support). Changes: - validation/google.rs: Real validation via GenerateContentRequest and GenerateContentResponse deserialization - cross_provider_tests.rs: Add Google constants and cross-format discrimination tests against all other providers - payloads format registry: Register Google executor for proxy validation - google-proxy.ts: New proxy-aware executor using raw fetch for gateway /generateContent and /streamGenerateContent endpoints - proxy/cases.ts: Add 4 native Gemini proxy test cases (basic, system instruction, multi-turn, tool call) - proxy/types.ts: Add google format to ProxyTestCase union - validation/index.ts: Add getEndpointForFormat() mapping all formats to their proxy endpoint paths Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
validation/google.rsusing the generated pbjson serde implementations (the previous stubs returned errors claiming protobuf types lacked serde support -- they do now)google-proxy.ts) that uses rawfetchto hit/v1/generateContentand/v1/streamGenerateContent(since the Google SDK doesn't supportbaseURLoverride)Test plan
cargo test -p lingua validation-- 32 validation tests pass (up from 14)cargo clippy --all-targets-- cleannpx tsc --noEmitinpayloads/-- TypeScript compiles cleanlycargo testin gateway/)🤖 Generated with Claude Code