llm-relay 0.73.1 → 0.74.0

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/cli.js CHANGED
@@ -15,6 +15,7 @@ import { providerCredentialSlots, slotAllowsModel } from "./credential-fleet.js"
15
15
  import { loadLaneManifest, rosterIsStale, verifyModel } from "./lane-manifest.js";
16
16
  import { probeLanes } from "./lane-probe.js";
17
17
  import { buildDispatch, allLadderRungs, normalizeCliCommand, restoreExhaustedRows, specContextWindow, CONTEXT_TOKEN, TASK_TOKEN, formatLaneStats } from "./dispatch.js";
18
+ import { loadLaneAffinityRows, restoreLaneAffinityRows } from "./lane-affinity.js";
18
19
  import { McpDispatchServer } from "./mcp/server.js";
19
20
  import { loadExhaustedRows } from "./dispatch-exhaustion-persistence.js";
20
21
  import { detectHostRouting, parseHostRoutingState } from "./host-routing.js";
@@ -1669,12 +1670,13 @@ export async function resolveDispatchView(opts) {
1669
1670
  const cachedContextWindow = setupDispatchCatalog(cfg);
1670
1671
  const liveRaw = (await tryServer(cfg, `/dispatch?${qs}`));
1671
1672
  const live = liveRaw !== null && liveRaw.host === "bypassed" ? liveRaw : null;
1672
- restoreExhaustedRows(cfg, loadExhaustedRows());
1673
1673
  if (live !== null) {
1674
1674
  const view = normalizeDispatchCommands(live);
1675
1675
  return substituteTaskInView({ ...view, source: "daemon" }, opts.task);
1676
1676
  }
1677
1677
  const fallbackCfg = loadConfigSafely() ?? cfg;
1678
+ restoreExhaustedRows(fallbackCfg, loadExhaustedRows());
1679
+ restoreLaneAffinityRows(fallbackCfg, loadLaneAffinityRows());
1678
1680
  const fallbackView = normalizeDispatchCommands(buildDispatch(fallbackCfg, {
1679
1681
  ...(opts.lane ? { lane: opts.lane } : {}),
1680
1682
  ...(opts.tier ? { tier: opts.tier } : {}),
@@ -1791,6 +1793,7 @@ export async function runDispatch(arg) {
1791
1793
  const staleProxy = hostStale || windowStale;
1792
1794
  const live = staleProxy ? null : liveRaw;
1793
1795
  restoreExhaustedRows(cfg, loadExhaustedRows());
1796
+ restoreLaneAffinityRows(cfg, loadLaneAffinityRows());
1794
1797
  const rawView = normalizeDispatchCommands(live ??
1795
1798
  buildDispatch(cfg, {
1796
1799
  ...(lane ? { lane } : {}),
@@ -1865,6 +1868,10 @@ export async function runDispatch(arg) {
1865
1868
  }
1866
1869
  if (l.note)
1867
1870
  process.stdout.write(` note: ${l.note}\n`);
1871
+ if (l.pinned)
1872
+ process.stdout.write(` pinned until ${l.pinned.until} (${l.pinned.reason})\n`);
1873
+ if (l.demoted)
1874
+ process.stdout.write(` demoted until ${l.demoted.until} (${l.demoted.reason})\n`);
1868
1875
  if (l.stats)
1869
1876
  process.stdout.write(` ${formatLaneStats(l.stats)}\n`);
1870
1877
  }