@heylemon/lemonade 2026.2.23 → 2026.2.25
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.
|
@@ -135,6 +135,15 @@ export async function resolveApiKeyForProvider(params) {
|
|
|
135
135
|
}
|
|
136
136
|
catch { }
|
|
137
137
|
}
|
|
138
|
+
// When the provider has a custom baseUrl (proxy mode), prefer the config's
|
|
139
|
+
// explicit apiKey over shell env vars — the env var holds the real provider
|
|
140
|
+
// key while the config apiKey is the proxy/gateway auth token.
|
|
141
|
+
const providerEntry = resolveProviderConfig(cfg, provider);
|
|
142
|
+
const hasCustomBaseUrl = Boolean(providerEntry?.baseUrl?.trim());
|
|
143
|
+
const customKey = getCustomProviderApiKey(cfg, provider);
|
|
144
|
+
if (hasCustomBaseUrl && customKey) {
|
|
145
|
+
return { apiKey: customKey, source: "models.json", mode: "api-key" };
|
|
146
|
+
}
|
|
138
147
|
const envResolved = resolveEnvApiKey(provider);
|
|
139
148
|
if (envResolved) {
|
|
140
149
|
return {
|
|
@@ -143,7 +152,6 @@ export async function resolveApiKeyForProvider(params) {
|
|
|
143
152
|
mode: envResolved.source.includes("OAUTH_TOKEN") ? "oauth" : "api-key",
|
|
144
153
|
};
|
|
145
154
|
}
|
|
146
|
-
const customKey = getCustomProviderApiKey(cfg, provider);
|
|
147
155
|
if (customKey) {
|
|
148
156
|
return { apiKey: customKey, source: "models.json", mode: "api-key" };
|
|
149
157
|
}
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
140b3b7c47510604aa1c59436ecf4b03ac92f2762d85a0c50581d82725391c66
|