@drsamonline/prober 0.12.12 → 0.12.14

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +6 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drsamonline/prober",
3
- "version": "0.12.12",
3
+ "version": "0.12.14",
4
4
  "description": "Canary prober: liveness, readiness and suitability checks that decide what may be routed to.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/index.js CHANGED
@@ -112,9 +112,12 @@ export async function probeTarget(entry, opts = {}) {
112
112
  // what it is told, so without this guard a seeded or imported base_url of
113
113
  // http://169.254.169.254/ (cloud metadata) or http://127.0.0.1:6379 would be
114
114
  // fetched on the user's machine and the result reported as a provider's health.
115
- // `allowLocal` is for a loopback probe that something asked for explicitly —
116
- // the test fixtures and `sui local`. Production code never sets it.
117
- const reachable = base ? probeAddressAllowed(base, { allowLocal: opts.allowLocal === true }) : null;
115
+ // A loopback probe is allowed when something asked for it explicitly, or when
116
+ // the catalogue itself says this entry is a model server on this machine
117
+ // (`local: true` — ollama, LM Studio). A remote provider claiming 127.0.0.1 is
118
+ // not local, and is still refused.
119
+ const allowLocal = opts.allowLocal === true || entry.local === true;
120
+ const reachable = base ? probeAddressAllowed(base, { allowLocal }) : null;
118
121
  if (base && !reachable.ok) {
119
122
  return {
120
123
  pool_key: key,