@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/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
@@ -4003,7 +4009,6 @@ var createEmptyStore = (driver) => vanilla.createStore((set, get) => ({
4003
4009
  const updates = typeof value === "function" ? value(state.clientIds) : value;
4004
4010
  const normalized = updates.map((entry) => ({
4005
4011
  ...entry,
4006
- baseUrl: normalizeBaseUrl(entry.baseUrl),
4007
4012
  createdAt: entry.createdAt ?? Date.now(),
4008
4013
  lastUsed: entry.lastUsed ?? null
4009
4014
  }));
@@ -4122,7 +4127,6 @@ var hydrateStoreFromDriver = async (store, driver) => {
4122
4127
  const usageTracking = rawUsageTracking;
4123
4128
  const clientIds = rawClientIds.map((entry) => ({
4124
4129
  ...entry,
4125
- baseUrl: normalizeBaseUrl(entry.baseUrl),
4126
4130
  createdAt: entry.createdAt ?? Date.now(),
4127
4131
  lastUsed: entry.lastUsed ?? null
4128
4132
  }));