Skip to content
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

[FEAT]: Application Default Credentials on Gemini #2575

Open
Stono opened this issue Nov 3, 2024 · 0 comments · May be fixed by #2578
Open

[FEAT]: Application Default Credentials on Gemini #2575

Stono opened this issue Nov 3, 2024 · 0 comments · May be fixed by #2578
Labels
enhancement New feature or request feature request

Comments

@Stono
Copy link

Stono commented Nov 3, 2024

What would you like to see?

The vast majority of google libraries support ADC for transparent auth. That also means they just "work" when running locally, or deployed as applications on GKE using Workload Identity.

Not needing to create secrets which then require storage, sharing between devs, and rotation is a huge win.

I did have a quick look at the code but it looks like the app is using @google/generative-ai which doesn't support ADC (no clue why - the hopscotch of google libraries always confuses me): google-gemini/generative-ai-js#289.

The @google-cloud/vertexai does, so the app could pivot to that. That's the library I used to use (i now just make rest calls to https://europe-west4-aiplatform.googleapis.com/v1/projects/${projectId}/locations/europe-west4/publishers/google/models/${model}:predict to avoid pulling in all the transitive dependencies of the google library, although that would then break existing users as that doesn't support api keys.

Switching the library would have other benefits too for example being able to target specific regions or zones for those more concerns about data processing locations. The @google/generative-ai library looks super restrictive tbh.

Maybe it'd need to be a new API integration (Vertex) 🤷

@Stono Stono added enhancement New feature or request feature request labels Nov 3, 2024
@Stono Stono linked a pull request Nov 3, 2024 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant