@antseed/cli 0.1.195 → 0.1.196

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.
@@ -1816,6 +1816,22 @@ test('sweep control endpoint validates and dispatches sequentially via the runni
1816
1816
  const missing = await invokeProxy(proxy, makeProxyRequest({ method: 'GET', path: `/_antseed/sweep/0x${'bb'.repeat(32)}` }));
1817
1817
  assert.deepEqual(JSON.parse(missing.body), { ok: true, receipt: null });
1818
1818
  });
1819
+ test('peer refresh drops services a seller stopped advertising', () => {
1820
+ const advertised = makePeer('a', ['venice-video']);
1821
+ advertised.providerPricing = { 'venice-video': { defaults: { inputUsdPerMillion: 0, outputUsdPerMillion: 0 }, services: { 'video-model': { inputUsdPerMillion: 0, outputUsdPerMillion: 0 } } } };
1822
+ advertised.providerServiceApiProtocols = { 'venice-video': { services: { 'video-model': ['venice-video'] } } };
1823
+ advertised.lastReachedAt = Date.now() - 1000;
1824
+ const proxy = makeBuyerProxyWithPeers([]);
1825
+ proxy._replacePeers([advertised]);
1826
+ const unadvertised = makePeer('a', []);
1827
+ proxy._replacePeers([unadvertised]);
1828
+ const cached = proxy._cachedPeers;
1829
+ assert.equal(cached.length, 1);
1830
+ assert.deepEqual(cached[0].providers, []);
1831
+ assert.equal(cached[0].providerPricing, undefined);
1832
+ assert.equal(cached[0].providerServiceApiProtocols, undefined);
1833
+ assert.equal(cached[0].lastReachedAt, advertised.lastReachedAt);
1834
+ });
1819
1835
  test('peer refresh control endpoint triggers immediate refresh', async () => {
1820
1836
  const refreshedPeer = makePeer('a', ['anthropic']);
1821
1837
  const proxy = makeBuyerProxyWithPeers([], [refreshedPeer]);