Skip to content

feat(vertexai): Allow serializing to Developer API models #17294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

natebosch
Copy link
Contributor

Move parsing from top level methods, and serialization from a method on
the model,into instance methods on a new SerializationStrategy class.
Use the existing parsing code for the vertex strategy and copy over code
form the developer SDK for the Google AI strategy.

Add a _ModelUri class to allow a vertex and developer specialization
for the different backends.

Copy the serialization and parsing tests from the developer SDK, skip a
few tests that rely on arguments or methods that are unsupported in the
vertex model. Tests skipped for content embedding and extra arguments
passed to countTokens.

Move parsing from top level methods, and serialization from a method on
the model,into instance methods on a new `SerializationStrategy` class.
Use the existing parsing code for the vertex strategy and copy over code
form the developer SDK for the Google AI strategy.

Add a `_ModelUri` class to allow a vertex and developer specialization
for the different backends.

Copy the serialization and parsing tests from the developer SDK, skip a
few tests that rely on arguments or methods that are unsupported in the
vertex model. Tests skipped for content embedding and extra arguments
passed to countTokens.
@natebosch natebosch requested a review from cynthiajoan April 21, 2025 17:28
Remove some tests that were added testing behaviors moved to new private
classes. These details are still tested in other places.
@natebosch natebosch changed the title Allow serializing to Developer API models feat: Allow serializing to Developer API models Apr 21, 2025
@natebosch
Copy link
Contributor Author

I think the remaining CI failures are unrelated to this change.

@cynthiajoan cynthiajoan changed the title feat: Allow serializing to Developer API models feat(vertexai): Allow serializing to Developer API models Apr 22, 2025
natebosch and others added 4 commits April 28, 2025 12:26
Co-authored-by: Cynthia J <cynthiajoan@users.noreply.github.com>
Co-authored-by: Cynthia J <cynthiajoan@users.noreply.github.com>
@natebosch natebosch changed the base branch from main to vertexai/developer_api April 28, 2025 19:33
@natebosch natebosch merged commit 73e4064 into firebase:vertexai/developer_api Apr 28, 2025
23 of 26 checks passed
@natebosch natebosch deleted the vertexai/genai-types branch April 28, 2025 23:26
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.

2 participants