@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.
@@ -37,6 +37,10 @@ declare class ProviderManager {
37
37
  * Check if a provider has failed
38
38
  */
39
39
  hasFailed(baseUrl: string): boolean;
40
+ /**
41
+ * Get a copy of the failed providers set
42
+ */
43
+ getFailedProviders(): Set<string>;
40
44
  /**
41
45
  * Find the next best provider for a model
42
46
  * @param modelId The model ID to find a provider for
@@ -37,6 +37,10 @@ declare class ProviderManager {
37
37
  * Check if a provider has failed
38
38
  */
39
39
  hasFailed(baseUrl: string): boolean;
40
+ /**
41
+ * Get a copy of the failed providers set
42
+ */
43
+ getFailedProviders(): Set<string>;
40
44
  /**
41
45
  * Find the next best provider for a model
42
46
  * @param modelId The model ID to find a provider for
@@ -1637,6 +1637,12 @@ var ProviderManager = class {
1637
1637
  hasFailed(baseUrl) {
1638
1638
  return this.failedProviders.has(baseUrl);
1639
1639
  }
1640
+ /**
1641
+ * Get a copy of the failed providers set
1642
+ */
1643
+ getFailedProviders() {
1644
+ return new Set(this.failedProviders);
1645
+ }
1640
1646
  /**
1641
1647
  * Find the next best provider for a model
1642
1648
  * @param modelId The model ID to find a provider for
@@ -2506,7 +2512,7 @@ var RoutstrClient = class {
2506
2512
  retryCount: 0
2507
2513
  });
2508
2514
  }
2509
- throw new FailoverError(baseUrl, Array.from(this.providerManager));
2515
+ throw new FailoverError(baseUrl, Array.from(this.providerManager.getFailedProviders()));
2510
2516
  }
2511
2517
  /**
2512
2518
  * Handle post-response balance update for all modes