@ax-llm/ax 10.0.44 → 10.0.45

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/index.js CHANGED
@@ -1077,10 +1077,10 @@ var GoogleVertexAuth = class {
1077
1077
  }
1078
1078
  const client = await this.getAuthenticatedClient();
1079
1079
  const tokenResponse = await client.getAccessToken();
1080
- this.currentToken = tokenResponse.token ?? void 0;
1080
+ this.currentToken = tokenResponse.token;
1081
1081
  const expiry = this.getExpiry(tokenResponse);
1082
- const fiveMinutes = 5 * 60 * 1e3;
1083
- this.tokenExpiry = expiry - fiveMinutes;
1082
+ const tenMinutes = 10 * 60 * 1e3;
1083
+ this.tokenExpiry = expiry - tenMinutes;
1084
1084
  return this.currentToken;
1085
1085
  }
1086
1086
  /**
@@ -1100,8 +1100,6 @@ var GoogleVertexAuth = class {
1100
1100
  } else {
1101
1101
  console.warn("Unknown expiry type", responseExpiry);
1102
1102
  }
1103
- } else {
1104
- console.warn("No expiry date found in response", tokenResponse.res?.data);
1105
1103
  }
1106
1104
  return expiry;
1107
1105
  }
@@ -6084,11 +6082,16 @@ var AxBalancer = class _AxBalancer {
6084
6082
  default:
6085
6083
  throw e;
6086
6084
  }
6087
- console.warn(`Service ${this.currentService.getName()} failed`);
6085
+ console.warn(
6086
+ `AxBalancer: Service ${this.currentService.getName()} failed`,
6087
+ e
6088
+ );
6088
6089
  if (!this.getNextService()) {
6089
6090
  throw e;
6090
6091
  }
6091
- console.warn(`Switching to service ${this.currentService.getName()}`);
6092
+ console.warn(
6093
+ `AxBalancer: Switching to service ${this.currentService.getName()}`
6094
+ );
6092
6095
  }
6093
6096
  }
6094
6097
  }