googleapis / googleapis/python-genai
Feature Parity: Enable File Upload API support for Vertex AI clients
- Dominant language
- Python
- Stars
- 4k
- Forks
- 1k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 40
Description
### What you're trying to do
I am looking to use the **File Upload API** within the new `google-genai` SDK while using the Vertex AI backend.
Even though recent blog posts and documentation (like [this one](https://blog.google/innovation-and-ai/technology/developers-tools/gemini-api-new-file-limits/)) treat the File API as a standard feature, it currently appears to be restricted to the Gemini (Developer) client.
Due to specific contractual and compliance requirements between my company and Google Cloud, we are standardized on **Vertex AI**. As a result, having feature parity for file management in the Vertex-enabled SDK is a high priority for our workflow.
### Any error messages you're getting
When attempting to use `client.files.upload` with a Vertex-initialized client, I receive the following error:
> *"This method is only supported in the Gemini Developer client"*
**Reference:** [google/genai/files.py#L194](https://www.google.com/search?q=https://github.com/googleapis/python-genai/blame/af94e536ab606d1795ad90e0c8eeb9c2a850ce6b/google/genai/files.py%23L194)
### Proposed Solution
It would be great to see support for `client.files` methods (upload, get, list, etc.) extended to the Vertex AI backend without having to switch implementation patterns or use separate APIs for file handling.
Contributor guide
Assessment
This issue has not been assessed yet.