@link-assistant/agent 0.1.1 → 0.1.2
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/package.json +1 -1
- package/src/provider/provider.ts +7 -7
package/package.json
CHANGED
package/src/provider/provider.ts
CHANGED
|
@@ -599,14 +599,14 @@ export namespace Provider {
|
|
|
599
599
|
// load env
|
|
600
600
|
for (const [providerID, provider] of Object.entries(database)) {
|
|
601
601
|
if (disabled.has(providerID)) continue;
|
|
602
|
-
|
|
602
|
+
// Find the first truthy env var (supports multiple env var options like Google's
|
|
603
|
+
// GOOGLE_GENERATIVE_AI_API_KEY and GEMINI_API_KEY)
|
|
604
|
+
const apiKey = provider.env
|
|
605
|
+
.map((item) => process.env[item])
|
|
606
|
+
.find(Boolean);
|
|
603
607
|
if (!apiKey) continue;
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
// only include apiKey if there's only one potential option
|
|
607
|
-
provider.env.length === 1 ? { apiKey } : {},
|
|
608
|
-
'env'
|
|
609
|
-
);
|
|
608
|
+
// Always pass the API key - the provider SDK needs it for authentication
|
|
609
|
+
mergeProvider(providerID, { apiKey }, 'env');
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
// load apikeys
|