@routstr/sdk 0.2.1 → 0.2.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/dist/client/index.d.mts +4 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.js +7 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +7 -1
- package/dist/client/index.mjs.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2338,6 +2338,12 @@ var ProviderManager = class {
|
|
|
2338
2338
|
hasFailed(baseUrl) {
|
|
2339
2339
|
return this.failedProviders.has(baseUrl);
|
|
2340
2340
|
}
|
|
2341
|
+
/**
|
|
2342
|
+
* Get a copy of the failed providers set
|
|
2343
|
+
*/
|
|
2344
|
+
getFailedProviders() {
|
|
2345
|
+
return new Set(this.failedProviders);
|
|
2346
|
+
}
|
|
2341
2347
|
/**
|
|
2342
2348
|
* Find the next best provider for a model
|
|
2343
2349
|
* @param modelId The model ID to find a provider for
|
|
@@ -3207,7 +3213,7 @@ var RoutstrClient = class {
|
|
|
3207
3213
|
retryCount: 0
|
|
3208
3214
|
});
|
|
3209
3215
|
}
|
|
3210
|
-
throw new FailoverError(baseUrl, Array.from(this.providerManager));
|
|
3216
|
+
throw new FailoverError(baseUrl, Array.from(this.providerManager.getFailedProviders()));
|
|
3211
3217
|
}
|
|
3212
3218
|
/**
|
|
3213
3219
|
* Handle post-response balance update for all modes
|