pi-provider-litellm 1.2.4 → 1.2.5
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/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -318,10 +318,13 @@ export default async function (pi) {
|
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
+
let updateCosts = () => undefined;
|
|
321
322
|
const oauth = {
|
|
322
323
|
name: "LiteLLM",
|
|
323
324
|
login: (callbacks) => loginLiteLLM(callbacks, (next) => {
|
|
324
325
|
cacheFetchedAt = next.fetchedAt;
|
|
326
|
+
registerProvider(next.baseUrl, next.models);
|
|
327
|
+
updateCosts(next.models);
|
|
325
328
|
}),
|
|
326
329
|
refreshToken: refreshLiteLLM,
|
|
327
330
|
getApiKey: getLiteLLMApiKey,
|
|
@@ -344,7 +347,7 @@ export default async function (pi) {
|
|
|
344
347
|
});
|
|
345
348
|
}
|
|
346
349
|
registerProvider(creds.baseUrl, models);
|
|
347
|
-
|
|
350
|
+
updateCosts = setupLiteLLMCostTracking(pi, models);
|
|
348
351
|
let refreshInProgress = null;
|
|
349
352
|
function discoveryDisabledReason() {
|
|
350
353
|
if (isOffline())
|