-
Notifications
You must be signed in to change notification settings - Fork 234
Open
Description
I've been trying to understand how to get @google/genai working with BYOK/Unified Billing gateways.
The following works for unauthenticated gateways, but defeats the purpose of centralizing secrets since they need to be passed at client creation.
client = new GoogleGenAI({
vertexai: true,
project: googleCredentials.project_id,
location: 'global',
googleAuthOptions: {
credentials: {
client_email: googleCredentials.client_email,
private_key: googleCredentials.private_key,
},
},
httpOptions: {
baseUrl: `${CF_GATEWAY_BASE_URL({
accountId: c.env.CF_ACCOUNT_ID,
gatewayId: c.env.CF_AI_GATEWAY_UNAUTHED_ID,
})}/google-vertex-ai`,
},
});Metadata
Metadata
Assignees
Labels
No labels