@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/index.js CHANGED
@@ -2340,6 +2340,12 @@ var ProviderManager = class {
2340
2340
  hasFailed(baseUrl) {
2341
2341
  return this.failedProviders.has(baseUrl);
2342
2342
  }
2343
+ /**
2344
+ * Get a copy of the failed providers set
2345
+ */
2346
+ getFailedProviders() {
2347
+ return new Set(this.failedProviders);
2348
+ }
2343
2349
  /**
2344
2350
  * Find the next best provider for a model
2345
2351
  * @param modelId The model ID to find a provider for
@@ -3209,7 +3215,7 @@ var RoutstrClient = class {
3209
3215
  retryCount: 0
3210
3216
  });
3211
3217
  }
3212
- throw new FailoverError(baseUrl, Array.from(this.providerManager));
3218
+ throw new FailoverError(baseUrl, Array.from(this.providerManager.getFailedProviders()));
3213
3219
  }
3214
3220
  /**
3215
3221
  * Handle post-response balance update for all modes