@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.
- package/package.json +1 -1
- package/src/index.js +6 -3
package/package.json
CHANGED
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
|
-
//
|
|
116
|
-
// the
|
|
117
|
-
|
|
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,
|