@routstr/sdk 0.2.0 → 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 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/dist/storage/index.d.mts +0 -2
- package/dist/storage/index.d.ts +0 -2
- package/dist/storage/index.js +0 -2
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/index.mjs +0 -2
- package/dist/storage/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/client/index.d.mts
CHANGED
|
@@ -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
|
package/dist/client/index.d.ts
CHANGED
|
@@ -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
|
package/dist/client/index.js
CHANGED
|
@@ -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
|