-
Notifications
You must be signed in to change notification settings - Fork 771
Closed
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
Hello,
I'm encountering an issue using the Google GenAI client with Vertex AI credentials. Here's the relevant snippet of my code:
from google.oauth2 import service_account
from google.genai import Client
credentials = service_account.Credentials.from_service_account_file('path/to/credentials.json')
client = Client(vertexai=True, project='my-project-id', location='us-central1', credentials=credentials)When running this code, it crashes with the following error:
('invalid_scope: Invalid OAuth scope or ID token audience provided.', {'error': 'invalid_scope', 'error_description': 'Invalid OAuth scope or ID token audience provided.'})
What I’ve Tried:
- The same service account credentials work for other Vertex AI operations.
- Verified the service account has sufficient permissions.
Question:
- Do I need to adjust the OAuth scope or provide additional parameters for the GenAI client?
- Are there any known incompatibilities or additional setup steps for using Vertex credentials with the GenAI client?
Thank you!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.