Skip to content

add google roundtrip#70

Open
knjiang wants to merge 1 commit into01-28-testing_framework_for_transformrequest_responsefrom
01-26-add_google_roundtrip
Open

add google roundtrip#70
knjiang wants to merge 1 commit into01-28-testing_framework_for_transformrequest_responsefrom
01-26-add_google_roundtrip

Conversation

@knjiang
Copy link
Contributor

@knjiang knjiang commented Jan 28, 2026

This PR adds google roundtrip tests for existing google cases in the repository.

Note:

In order to conform the existing cases to the generated schema at https://github.com/braintrustdata/lingua/blob/main/crates/lingua/src/providers/google/generated.rs, we have to update the capture.ts Google executor to use the HTTP API instead of genai sdk.

Copy link
Contributor Author

knjiang commented Jan 28, 2026

@knjiang knjiang force-pushed the add_universal_params_between_completions_responses_and_anthropic branch from 52805d2 to af4a595 Compare January 29, 2026 05:38
@knjiang knjiang force-pushed the 01-26-add_google_roundtrip branch from 1feefc7 to 8288bf4 Compare January 29, 2026 05:38
@knjiang knjiang changed the base branch from add_universal_params_between_completions_responses_and_anthropic to graphite-base/70 February 2, 2026 18:00
@knjiang knjiang force-pushed the 01-26-add_google_roundtrip branch from 8288bf4 to 68f389d Compare February 2, 2026 18:00
@knjiang knjiang changed the base branch from graphite-base/70 to 01-28-testing_framework_for_transformrequest_response February 2, 2026 18:01
This was referenced Feb 2, 2026
@@ -0,0 +1,73 @@
use crate::providers::google::generated::{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start at this file, this is where we grab all the testcases and roundtrip them. this automatically tests google/convert.rs

Comment on lines +98 to +99
encrypted_content: Option<String>,
#[ts(optional)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encrypted_content is used by both anthropic/google so i think it should be a universal type.

GOOGLE_MODEL,
} from "../../cases";

const GOOGLE_API_BASE = "https://generativelanguage.googleapis.com/v1beta";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the genai TS sdk isn't just a stainless sdk where it just wraps openapi.

They do a bunch of transforms in the SDK so I'm using the HTTP API instead since the generated types reflect the HTTP API.

@knjiang knjiang force-pushed the 01-26-add_google_roundtrip branch from 68f389d to 1b05794 Compare February 3, 2026 03:58
@knjiang knjiang marked this pull request as ready for review February 3, 2026 04:01
@knjiang knjiang requested a review from remh February 3, 2026 05:58
@knjiang knjiang force-pushed the 01-26-add_google_roundtrip branch from 1b05794 to a2f07da Compare February 3, 2026 21:39
@knjiang knjiang force-pushed the 01-28-testing_framework_for_transformrequest_response branch from d09967b to 13cb50c Compare February 3, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant