feat: Add support for Vertex AI and Vertex express mode (#380)

This commit is contained in:
sasha-gitg
2025-05-16 08:06:43 -07:00
committed by GitHub
parent 7d818b46bc
commit 609757f911
3 changed files with 64 additions and 19 deletions

View File

@@ -35,8 +35,9 @@ export class GeminiClient {
constructor(private config: Config) {
const userAgent = config.getUserAgent();
const apiKeyFromConfig = config.getApiKey();
this.client = new GoogleGenAI({
apiKey: config.getApiKey(),
apiKey: apiKeyFromConfig === '' ? undefined : apiKeyFromConfig,
httpOptions: {
headers: {
'User-Agent': userAgent,