@jaypie/llm 1.3.18 → 1.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +8 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +8 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -10656,7 +10656,14 @@ const getLogger$3 = () => log$1.log.lib({ lib: kit.JAYPIE.LIB.LLM });
|
|
|
10656
10656
|
// Client initialization
|
|
10657
10657
|
async function initializeClient$3({ apiKey, } = {}) {
|
|
10658
10658
|
const logger = getLogger$3();
|
|
10659
|
-
|
|
10659
|
+
let resolvedApiKey = apiKey || (await aws.getEnvSecret("GOOGLE_API_KEY"));
|
|
10660
|
+
if (!resolvedApiKey) {
|
|
10661
|
+
const geminiApiKey = await aws.getEnvSecret("GEMINI_API_KEY");
|
|
10662
|
+
if (geminiApiKey) {
|
|
10663
|
+
logger.warn("GEMINI_API_KEY is a deprecated fallback; set GOOGLE_API_KEY instead");
|
|
10664
|
+
resolvedApiKey = geminiApiKey;
|
|
10665
|
+
}
|
|
10666
|
+
}
|
|
10660
10667
|
if (!resolvedApiKey) {
|
|
10661
10668
|
throw new errors.ConfigurationError("The application could not resolve the requested keys");
|
|
10662
10669
|
}
|