@tzyc/dsh-model-visibility 1.10.3 → 1.12.1

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
@@ -312,7 +312,6 @@ export function apply(ctx, config) {
312
312
  imageInput.refresh()
313
313
  },
314
314
  })
315
-
316
315
  /** Answer with JSON; the route is diagnostics-friendly on purpose. */
317
316
  const json = (value, status = 200) =>
318
317
  new Response(JSON.stringify(value), {
@@ -596,9 +595,12 @@ export function apply(ctx, config) {
596
595
  }
597
596
  // The sweep runs in the background: the response only reports that
598
597
  // it was accepted, and polling GET observes the progress state.
598
+ // `concurrency` is a per-run choice (how many checker calls may be
599
+ // in flight), so a fast relay can use more threads than the default.
600
+ const concurrency = Number.isFinite(body?.concurrency) ? body.concurrency : undefined
599
601
  if (!verifier.isRunning()) {
600
602
  verifier
601
- .start({ checker: { provider, model }, writeBack: body?.writeBack !== false })
603
+ .start({ checker: { provider, model }, writeBack: body?.writeBack !== false, concurrency })
602
604
  .then(() => {
603
605
  // Learned facts (and possibly provider settings) changed.
604
606
  service.invalidate()