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

[Feature]: Support OAuth token with Vertex AI #6906

Open
sean-tr opened this issue Nov 26, 2024 · 0 comments
Open

[Feature]: Support OAuth token with Vertex AI #6906

sean-tr opened this issue Nov 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sean-tr
Copy link

sean-tr commented Nov 26, 2024

The Feature

The documentation of litellm shows how to authenticate using JSON credentials. However, I only have access to an OAuth token. I would like to be able to do the following:

from google.oauth2.credentials import Credentials as OAuth2Credentials


temp_creds = OAuth2Credentials(credentials["token"])


cc = completion(
    model="vertex_ai/gemini-1.5-flash",
    vertex_project=credentials["project_id"],
    vertex_location=credentials["region"],
    vertex_credentials=temp_creds,
    messages=[{"role": "user", "content": "Name 3 bright colours"}],
)

To implement this myself, I think I have to modify VertexBase.load_auth to handle cases other than JSON strings and files. However, I wanted to make this issue to double-check it hasn't already been implemented and that I'm going to modify the right file.

Motivation, pitch

Motivation is explained in feature description.

Twitter / LinkedIn details

No response

@sean-tr sean-tr added the enhancement New feature or request label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant