Handle empty string

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Danielle Yim
2026-01-08 10:50:09 -08:00
committed by GitHub
parent dbdab2da1f
commit f97ee841f7
+1 -1
View File
@@ -180,7 +180,7 @@ export async function createContentGenerator(
apiKey: config.apiKey === '' ? undefined : config.apiKey, apiKey: config.apiKey === '' ? undefined : config.apiKey,
vertexai: config.vertexai, vertexai: config.vertexai,
httpOptions, httpOptions,
...(apiVersionEnv !== undefined && { apiVersion: apiVersionEnv }), ...(apiVersionEnv && { apiVersion: apiVersionEnv }),
}); });
return new LoggingContentGenerator(googleGenAI.models, gcConfig); return new LoggingContentGenerator(googleGenAI.models, gcConfig);
} }