@simplexai/localmodels-win32-x64 0.1.0-dev.62 → 0.1.0-dev.63
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/bootstrap.identity +1 -1
- package/bootstrap.sha256 +56 -54
- package/modules/localmodels/__init__.py +1 -1
- package/modules/localmodels/bifrost_checks.py +19 -13
- package/modules/localmodels/bifrost_clients.py +38 -36
- package/modules/localmodels/bifrost_config.py +19 -6
- package/modules/localmodels/bifrost_log.py +3 -3
- package/modules/localmodels/bifrost_models.py +9 -8
- package/modules/localmodels/bifrost_pi.py +27 -72
- package/modules/localmodels/catalog.json +51 -58
- package/modules/localmodels/custom_hub.py +10 -1
- package/modules/localmodels/custom_hub_http.py +14 -3
- package/modules/localmodels/debug_mode.py +3 -3
- package/modules/localmodels/gateway.py +56 -55
- package/modules/localmodels/gateway_bifrost.py +70 -83
- package/modules/localmodels/gateway_clients.py +33 -116
- package/modules/localmodels/gateway_home.py +5 -5
- package/modules/localmodels/gateway_keys.py +8 -6
- package/modules/localmodels/gateway_probe.py +4 -4
- package/modules/localmodels/gateway_server.py +4 -4
- package/modules/localmodels/gateway_speed.py +2 -2
- package/modules/localmodels/harness.py +185 -401
- package/modules/localmodels/harness_core.py +409 -0
- package/modules/localmodels/harness_gateway.py +75 -73
- package/modules/localmodels/harness_probe.py +19 -216
- package/modules/localmodels/library_custom.py +51 -16
- package/modules/localmodels/library_elastic.py +1 -1
- package/modules/localmodels/library_gateway.py +59 -176
- package/modules/localmodels/library_model.py +23 -0
- package/modules/localmodels/library_pricing.py +2 -2
- package/modules/localmodels/library_serve.py +5 -3
- package/modules/localmodels/library_smoke.py +33 -21
- package/modules/localmodels/library_status.py +330 -2
- package/modules/localmodels/llm_rank.py +14 -5
- package/modules/localmodels/magpie_setup.py +5 -4
- package/modules/localmodels/magpie_windows.py +1 -1
- package/modules/localmodels/pi_profile.py +384 -0
- package/modules/localmodels/process_identity.py +3 -3
- package/modules/localmodels/runtime_cli.py +32 -46
- package/modules/localmodels/runtime_pi.py +1 -1
- package/modules/localmodels/source_byok.py +9 -16
- package/modules/localmodels/stack_binding.py +9 -7
- package/modules/localmodels/stack_clients.py +137 -21
- package/modules/localmodels/stack_doctor.py +6 -3
- package/modules/localmodels/stack_hardware.py +18 -0
- package/modules/localmodels/stack_lifecycle.py +3 -2
- package/modules/localmodels/stack_remove.py +2 -1
- package/modules/localmodels/stack_verify.py +2 -2
- package/modules/localmodels/stack_view_events.py +2 -2
- package/modules/{simplex_localmodels-0.1.0.dev62.dist-info → simplex_localmodels-0.1.0.dev63.dist-info}/METADATA +1 -1
- package/modules/{simplex_localmodels-0.1.0.dev62.dist-info → simplex_localmodels-0.1.0.dev63.dist-info}/RECORD +53 -51
- package/package.json +1 -1
- package/tool.json +1 -1
- /package/modules/{simplex_localmodels-0.1.0.dev62.dist-info → simplex_localmodels-0.1.0.dev63.dist-info}/WHEEL +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev62.dist-info → simplex_localmodels-0.1.0.dev63.dist-info}/entry_points.txt +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev62.dist-info → simplex_localmodels-0.1.0.dev63.dist-info}/licenses/NOTICE +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev62.dist-info → simplex_localmodels-0.1.0.dev63.dist-info}/licenses/localmodels/HERMES-LICENSE +0 -0
|
@@ -9,9 +9,9 @@ import re
|
|
|
9
9
|
import urllib.parse
|
|
10
10
|
from pathlib import Path
|
|
11
11
|
|
|
12
|
-
from localmodels import bifrost_config
|
|
12
|
+
from localmodels import bifrost_config
|
|
13
13
|
|
|
14
|
-
APP_DIR =
|
|
14
|
+
APP_DIR = bifrost_config.APP_DIR
|
|
15
15
|
LOG_TAIL_BYTES = 16 * 1024
|
|
16
16
|
SUMMARY_MAX_CHARS = 240
|
|
17
17
|
|
|
@@ -41,7 +41,7 @@ def known_secrets(app: Path) -> list[str]:
|
|
|
41
41
|
"""Literal secrets from admin-password and config.json (longest first); never creates files."""
|
|
42
42
|
found: set[str] = set()
|
|
43
43
|
admin_user = bifrost_config.ADMIN_USER
|
|
44
|
-
caller_key =
|
|
44
|
+
caller_key = bifrost_config.CALLER_KEY
|
|
45
45
|
|
|
46
46
|
def add_password(raw: object) -> None:
|
|
47
47
|
if not isinstance(raw, str):
|
|
@@ -14,16 +14,17 @@ from __future__ import annotations
|
|
|
14
14
|
import http.client
|
|
15
15
|
import json
|
|
16
16
|
import urllib.error
|
|
17
|
+
import urllib.request
|
|
17
18
|
from typing import Any, Literal, TypedDict
|
|
18
19
|
|
|
19
|
-
from localmodels import catalog
|
|
20
|
-
from localmodels.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
26
|
-
|
|
20
|
+
from localmodels import catalog, http_local
|
|
21
|
+
from localmodels.bifrost_config import AGENT_MODEL, CALLER_KEY, PI_PROVIDER
|
|
22
|
+
from localmodels.harness_core import GatewayPlan, HarnessError
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def opener() -> urllib.request.OpenerDirector:
|
|
26
|
+
return http_local.no_proxy_opener()
|
|
27
|
+
|
|
27
28
|
|
|
28
29
|
SCHEMA: Literal["localmodels.stack-clients/v1"] = "localmodels.stack-clients/v1"
|
|
29
30
|
DEFAULT_CONTEXT = 131072 # plans saved before the window was recorded
|
|
@@ -5,58 +5,24 @@ tool did not add."""
|
|
|
5
5
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
|
-
import json
|
|
9
8
|
import os
|
|
10
|
-
import tempfile
|
|
11
9
|
from pathlib import Path
|
|
12
10
|
from typing import Any
|
|
13
11
|
|
|
14
|
-
from localmodels import bifrost_models,
|
|
15
|
-
from localmodels
|
|
12
|
+
from localmodels import bifrost_models, harness_core, hosts
|
|
13
|
+
from localmodels import pi_profile as pi_store
|
|
14
|
+
from localmodels.bifrost_config import AGENT_MODEL, PI_MODEL, PI_PROVIDER
|
|
16
15
|
from localmodels.gateway_requests import Check
|
|
17
|
-
from localmodels.
|
|
16
|
+
from localmodels.harness_core import GatewayPlan, HarnessError, HarnessPlan
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
def pi_profile(environment: dict[str, str] | None = None) -> Path:
|
|
21
|
-
return
|
|
22
|
-
(os.environ if environment is None else environment).get(
|
|
23
|
-
"PI_CODING_AGENT_DIR", str(Path.home() / ".pi" / "agent")
|
|
24
|
-
)
|
|
25
|
-
).expanduser()
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
def _read_json(path: Path) -> dict[str, Any]:
|
|
29
|
-
try:
|
|
30
|
-
value = json.loads(path.read_text(encoding="utf-8"))
|
|
31
|
-
except FileNotFoundError:
|
|
32
|
-
return {}
|
|
33
|
-
except (OSError, ValueError) as exc:
|
|
34
|
-
raise HarnessError(f"{path} cannot be read as JSON; left as is") from exc
|
|
35
|
-
if not isinstance(value, dict):
|
|
36
|
-
raise HarnessError(f"{path} is not a JSON object; left as is")
|
|
37
|
-
return value
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def _write_json(path: Path, value: dict[str, Any]) -> None:
|
|
41
|
-
path.parent.mkdir(parents=True, exist_ok=True)
|
|
42
|
-
mode = path.stat().st_mode & 0o777 if path.is_file() else 0o600
|
|
43
|
-
fd, tmp = tempfile.mkstemp(prefix=f".{path.name}.", dir=path.parent)
|
|
44
|
-
with os.fdopen(fd, "w", encoding="utf-8") as f:
|
|
45
|
-
f.write(json.dumps(value, ensure_ascii=False, indent=2) + "\n")
|
|
46
|
-
os.chmod(tmp, mode)
|
|
47
|
-
os.replace(tmp, path)
|
|
20
|
+
return pi_store.pi_dir(environment)
|
|
48
21
|
|
|
49
22
|
|
|
50
23
|
def pi_model(profile: Path | None = None) -> str | None:
|
|
51
24
|
"""pi's default model as its settings.json names it (provider/model)."""
|
|
52
|
-
|
|
53
|
-
doc = _read_json((profile or pi_profile()) / "settings.json")
|
|
54
|
-
except HarnessError:
|
|
55
|
-
return None
|
|
56
|
-
if not doc.get("defaultModel"):
|
|
57
|
-
return None
|
|
58
|
-
provider = doc.get("defaultProvider")
|
|
59
|
-
return f"{provider}/{doc['defaultModel']}" if provider else str(doc["defaultModel"])
|
|
25
|
+
return pi_store.PiProfileStore(profile or pi_profile()).default_model()
|
|
60
26
|
|
|
61
27
|
|
|
62
28
|
def _pi_entry(gw: GatewayPlan, listed: list[str]) -> dict[str, Any]:
|
|
@@ -72,19 +38,22 @@ def point_pi(plan: HarnessPlan, listed: list[str]) -> str:
|
|
|
72
38
|
default, recording first what pi had so ``stack remove`` can give it back."""
|
|
73
39
|
gw = plan["gateway"]
|
|
74
40
|
entry = _pi_entry(gw, listed) # refuses a model Bifrost does not list before any change
|
|
75
|
-
profile = pi_profile(
|
|
76
|
-
|
|
77
|
-
|
|
41
|
+
profile = pi_profile(harness_core.gateway_environment(plan))
|
|
42
|
+
store = pi_store.PiProfileStore(profile)
|
|
43
|
+
try:
|
|
44
|
+
models = store.read_models()
|
|
45
|
+
except pi_store.PiProfileError as exc:
|
|
46
|
+
raise HarnessError(str(exc)) from exc
|
|
78
47
|
providers = models.setdefault("providers", {})
|
|
79
48
|
if not isinstance(providers, dict):
|
|
80
|
-
raise HarnessError(f"providers in {models_path} is not an object; left as is")
|
|
49
|
+
raise HarnessError(f"providers in {store.models_path} is not an object; left as is")
|
|
81
50
|
owned = hosts.load_owned(plan["tools_dir"])
|
|
82
51
|
instance = owned["gateway"].get("bifrost")
|
|
83
52
|
ours = bool(instance and instance.get("pi_provider"))
|
|
84
53
|
existing = providers.get(PI_PROVIDER)
|
|
85
54
|
if existing is not None and not ours:
|
|
86
55
|
raise HarnessError(
|
|
87
|
-
f"pi already has a provider named {PI_PROVIDER} ({models_path}), not added by this"
|
|
56
|
+
f"pi already has a provider named {PI_PROVIDER} ({store.models_path}), not added by this"
|
|
88
57
|
" tool; not overwritten"
|
|
89
58
|
)
|
|
90
59
|
before = pi_model(profile)
|
|
@@ -101,11 +70,12 @@ def point_pi(plan: HarnessPlan, listed: list[str]) -> str:
|
|
|
101
70
|
bifrost["pi_provider"] = True
|
|
102
71
|
|
|
103
72
|
hosts.update_owned(record, plan["tools_dir"])
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
73
|
+
try:
|
|
74
|
+
providers[PI_PROVIDER] = entry
|
|
75
|
+
store.write_models(models)
|
|
76
|
+
store.set_default(PI_PROVIDER, AGENT_MODEL)
|
|
77
|
+
except pi_store.PiProfileError as exc:
|
|
78
|
+
raise HarnessError(str(exc)) from exc
|
|
109
79
|
return f"pi → {PI_MODEL}"
|
|
110
80
|
|
|
111
81
|
|
|
@@ -118,26 +88,20 @@ def unpoint_pi(
|
|
|
118
88
|
profile = pi_profile(
|
|
119
89
|
environment
|
|
120
90
|
if environment is not None
|
|
121
|
-
else {**os.environ, **
|
|
91
|
+
else {**os.environ, **pi_store.client_environment(tools_dir)}
|
|
122
92
|
)
|
|
93
|
+
store = pi_store.PiProfileStore(profile)
|
|
123
94
|
results: list[Check] = []
|
|
124
95
|
pi = doc["pi"]
|
|
125
96
|
if pi and pi["model"] == PI_MODEL:
|
|
126
|
-
settings_path = profile / "settings.json"
|
|
127
97
|
try:
|
|
128
|
-
|
|
98
|
+
store.read_settings()
|
|
129
99
|
current = pi_model(profile)
|
|
130
100
|
if current != PI_MODEL:
|
|
131
101
|
detail = f"pi default model was changed to {current or 'not set'}; left as is"
|
|
132
102
|
else:
|
|
133
103
|
previous = pi["previous"]
|
|
134
|
-
|
|
135
|
-
provider, _, model = previous.partition("/")
|
|
136
|
-
settings["defaultProvider"], settings["defaultModel"] = provider, model
|
|
137
|
-
else:
|
|
138
|
-
settings.pop("defaultProvider", None)
|
|
139
|
-
settings.pop("defaultModel", None)
|
|
140
|
-
_write_json(settings_path, settings)
|
|
104
|
+
store.restore_default(previous)
|
|
141
105
|
detail = f"pi → {previous or 'original setting'}"
|
|
142
106
|
results.append({"check": "pi", "ok": True, "detail": detail})
|
|
143
107
|
|
|
@@ -145,21 +109,12 @@ def unpoint_pi(
|
|
|
145
109
|
d["pi"] = None
|
|
146
110
|
|
|
147
111
|
hosts.update_owned(clear, tools_dir)
|
|
148
|
-
except (HarnessError, OSError) as exc:
|
|
112
|
+
except (HarnessError, pi_store.PiProfileError, OSError) as exc:
|
|
149
113
|
return [{"check": "pi", "ok": False, "detail": str(exc)[-200:]}]
|
|
150
114
|
added = doc["gateway"].get("bifrost")
|
|
151
115
|
if added and added.get("pi_provider"):
|
|
152
|
-
models_path = profile / "models.json"
|
|
153
116
|
try:
|
|
154
|
-
|
|
155
|
-
providers = models.get("providers")
|
|
156
|
-
entry = providers.get(PI_PROVIDER) if isinstance(providers, dict) else None
|
|
157
|
-
ours = isinstance(entry, dict) and str(entry.get("baseUrl", "")).startswith(
|
|
158
|
-
f"http://{added['addr']}/"
|
|
159
|
-
)
|
|
160
|
-
if ours and isinstance(providers, dict):
|
|
161
|
-
del providers[PI_PROVIDER]
|
|
162
|
-
_write_json(models_path, models)
|
|
117
|
+
ours = store.drop_provider_if_base_matches(PI_PROVIDER, added["addr"])
|
|
163
118
|
results.append(
|
|
164
119
|
{
|
|
165
120
|
"check": f"pi provider {PI_PROVIDER}",
|
|
@@ -174,6 +129,6 @@ def unpoint_pi(
|
|
|
174
129
|
bifrost.pop("pi_provider", None)
|
|
175
130
|
|
|
176
131
|
hosts.update_owned(drop, tools_dir)
|
|
177
|
-
except (HarnessError, OSError) as exc:
|
|
132
|
+
except (HarnessError, pi_store.PiProfileError, OSError) as exc:
|
|
178
133
|
results.append({"check": f"pi provider {PI_PROVIDER}", "ok": False, "detail": str(exc)})
|
|
179
134
|
return results
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"sources": [
|
|
62
62
|
{
|
|
63
63
|
"type": "intelligence_score",
|
|
64
|
-
"ref": "catalog/model-matrix/scores.json
|
|
65
|
-
"date": "2026-11-
|
|
64
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of qwen3.8-27b/ud-q4_k_m = 53.9 (AIHOT third-party capability scale minus v3 IRT penalty 1.19 [R1, measured]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
65
|
+
"date": "2026-11-27"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"type": "own_eval",
|
|
@@ -137,8 +137,8 @@
|
|
|
137
137
|
"sources": [
|
|
138
138
|
{
|
|
139
139
|
"type": "intelligence_score",
|
|
140
|
-
"ref": "catalog/model-matrix/scores.json
|
|
141
|
-
"date": "2026-11-
|
|
140
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of qwen3.8-27b/q8_0 = 54.6 (AIHOT third-party capability scale minus v3 IRT penalty 0.49 [R0, prior]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
141
|
+
"date": "2026-11-27"
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
"type": "editorial",
|
|
@@ -168,18 +168,14 @@
|
|
|
168
168
|
"id": "qwen3.8-27b-iq3s",
|
|
169
169
|
"display_name": "Qwen3.8 27B",
|
|
170
170
|
"description": "A smaller build of Qwen3.8 27B for 16 GB graphics cards and 32 GB Macs; reads images and answers nearly as well.",
|
|
171
|
-
"note": "
|
|
171
|
+
"note": "Demoted from validated to candidate under SimplexAI v3 reliability gate G1 (roadmap decision 71, 2026-11-27): paired BFCL v4 MT-Hard (n=200) dropped by -19.5 pp vs UD-Q4_K_M (0.305 vs 0.500, Q51 p=4e-6) and -19.0 pp vs Q8_0 (0.310 vs 0.500, Q8H p=8e-6), exceeding the 12 pp non-inferiority gate. Kept as candidate for explicit --llm and on-disk library management.",
|
|
172
172
|
"repo": "unsloth/Qwen3.8-27B-GGUF",
|
|
173
173
|
"license": "Apache-2.0",
|
|
174
174
|
"license_url": "https://huggingface.co/Qwen/Qwen3.8-27B/blob/main/LICENSE",
|
|
175
175
|
"family": "qwen",
|
|
176
176
|
"publisher": "Qwen",
|
|
177
177
|
"parameters": "27B",
|
|
178
|
-
"status": "
|
|
179
|
-
"validated_on": [
|
|
180
|
-
"linux",
|
|
181
|
-
"darwin"
|
|
182
|
-
],
|
|
178
|
+
"status": "candidate",
|
|
183
179
|
"tasks": [
|
|
184
180
|
"llm",
|
|
185
181
|
"vision"
|
|
@@ -220,12 +216,12 @@
|
|
|
220
216
|
"min-p": "0.0"
|
|
221
217
|
},
|
|
222
218
|
"quality": {
|
|
223
|
-
"score":
|
|
219
|
+
"score": 48,
|
|
224
220
|
"sources": [
|
|
225
221
|
{
|
|
226
222
|
"type": "intelligence_score",
|
|
227
|
-
"ref": "catalog/model-matrix/scores.json
|
|
228
|
-
"date": "2026-11-
|
|
223
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of qwen3.8-27b/ud-iq3_s = 48.5 (AIHOT third-party capability scale minus v3 IRT penalty 6.60 [R2, measured]; gated (MT-Hard -19.5 pp vs ud-q4_k_m (p=4e-06)); docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
224
|
+
"date": "2026-11-27"
|
|
229
225
|
},
|
|
230
226
|
{
|
|
231
227
|
"type": "editorial",
|
|
@@ -305,8 +301,8 @@
|
|
|
305
301
|
"sources": [
|
|
306
302
|
{
|
|
307
303
|
"type": "intelligence_score",
|
|
308
|
-
"ref": "catalog/model-matrix/scores.json
|
|
309
|
-
"date": "2026-11-
|
|
304
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of underdog-saluki-27b/iq2-mix = 50.0 (AIHOT third-party capability scale minus v3 IRT penalty 5.12 [R3, measured]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
305
|
+
"date": "2026-11-27"
|
|
310
306
|
},
|
|
311
307
|
{
|
|
312
308
|
"type": "editorial",
|
|
@@ -397,12 +393,12 @@
|
|
|
397
393
|
},
|
|
398
394
|
"min_engine": "b11370",
|
|
399
395
|
"quality": {
|
|
400
|
-
"score":
|
|
396
|
+
"score": 56,
|
|
401
397
|
"sources": [
|
|
402
398
|
{
|
|
403
399
|
"type": "intelligence_score",
|
|
404
|
-
"ref": "catalog/model-matrix/scores.json
|
|
405
|
-
"date": "2026-11-
|
|
400
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of qwen3.8-flash-next/ud-iq4_xs = 56.3 (AIHOT third-party capability scale minus v3 IRT penalty 3.73 [R2, measured]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
401
|
+
"date": "2026-11-27"
|
|
406
402
|
},
|
|
407
403
|
{
|
|
408
404
|
"type": "editorial",
|
|
@@ -475,12 +471,12 @@
|
|
|
475
471
|
},
|
|
476
472
|
"min_engine": "b11370",
|
|
477
473
|
"quality": {
|
|
478
|
-
"score":
|
|
474
|
+
"score": 52,
|
|
479
475
|
"sources": [
|
|
480
476
|
{
|
|
481
477
|
"type": "intelligence_score",
|
|
482
|
-
"ref": "catalog/model-matrix/scores.json
|
|
483
|
-
"date": "2026-11-
|
|
478
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of qwen3.8-flash-next/gsq-rco-iq2_xs = 52.1 (AIHOT third-party capability scale minus v3 IRT penalty 7.85 [R3, measured]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
479
|
+
"date": "2026-11-27"
|
|
484
480
|
},
|
|
485
481
|
{
|
|
486
482
|
"type": "editorial",
|
|
@@ -566,12 +562,12 @@
|
|
|
566
562
|
},
|
|
567
563
|
"min_engine": "b11370",
|
|
568
564
|
"quality": {
|
|
569
|
-
"score":
|
|
565
|
+
"score": 56,
|
|
570
566
|
"sources": [
|
|
571
567
|
{
|
|
572
568
|
"type": "intelligence_score",
|
|
573
|
-
"ref": "catalog/model-matrix/scores.json
|
|
574
|
-
"date": "2026-11-
|
|
569
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of qwen3.8-flash-next/gsq-rco-iq3_s = 56.3 (AIHOT third-party capability scale minus v3 IRT penalty 3.73 [R2, vendor]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
570
|
+
"date": "2026-11-27"
|
|
575
571
|
},
|
|
576
572
|
{
|
|
577
573
|
"type": "editorial",
|
|
@@ -667,12 +663,12 @@
|
|
|
667
663
|
"min-p": "0.0"
|
|
668
664
|
},
|
|
669
665
|
"quality": {
|
|
670
|
-
"score":
|
|
666
|
+
"score": 35,
|
|
671
667
|
"sources": [
|
|
672
668
|
{
|
|
673
669
|
"type": "intelligence_score",
|
|
674
|
-
"ref": "catalog/model-matrix/scores.json
|
|
675
|
-
"date": "2026-11-
|
|
670
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of qwen3.6-35b-a3b/ud-iq4_xs = 34.8 (AIHOT third-party capability scale minus v3 IRT penalty 2.64 [R2, measured]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
671
|
+
"date": "2026-11-27"
|
|
676
672
|
},
|
|
677
673
|
{
|
|
678
674
|
"type": "own_eval",
|
|
@@ -1373,8 +1369,8 @@
|
|
|
1373
1369
|
"sources": [
|
|
1374
1370
|
{
|
|
1375
1371
|
"type": "intelligence_score",
|
|
1376
|
-
"ref": "catalog/model-matrix/scores.json
|
|
1377
|
-
"date": "2026-11-
|
|
1372
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of ling-3.0-tiny/q4_k_m = 24.8 (AIHOT third-party capability scale minus v3 IRT penalty 1.48 [R1, prior]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
1373
|
+
"date": "2026-11-27"
|
|
1378
1374
|
},
|
|
1379
1375
|
{
|
|
1380
1376
|
"type": "editorial",
|
|
@@ -1454,12 +1450,12 @@
|
|
|
1454
1450
|
"min-p": "0.0"
|
|
1455
1451
|
},
|
|
1456
1452
|
"quality": {
|
|
1457
|
-
"score":
|
|
1453
|
+
"score": 53,
|
|
1458
1454
|
"sources": [
|
|
1459
1455
|
{
|
|
1460
1456
|
"type": "intelligence_score",
|
|
1461
|
-
"ref": "catalog/model-matrix/scores.json
|
|
1462
|
-
"date": "2026-11-
|
|
1457
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of inkling-2-mini/ud-q4_k_m = 53.1 (AIHOT third-party capability scale minus v3 IRT penalty 1.48 [R1, prior]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
1458
|
+
"date": "2026-11-27"
|
|
1463
1459
|
},
|
|
1464
1460
|
{
|
|
1465
1461
|
"type": "own_eval",
|
|
@@ -1543,12 +1539,12 @@
|
|
|
1543
1539
|
"min-p": "0.0"
|
|
1544
1540
|
},
|
|
1545
1541
|
"quality": {
|
|
1546
|
-
"score":
|
|
1542
|
+
"score": 51,
|
|
1547
1543
|
"sources": [
|
|
1548
1544
|
{
|
|
1549
1545
|
"type": "intelligence_score",
|
|
1550
|
-
"ref": "catalog/model-matrix/scores.json
|
|
1551
|
-
"date": "2026-11-
|
|
1546
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of inkling-2-mini/ud-iq3_xxs = 51.1 (AIHOT third-party capability scale minus v3 IRT penalty 3.55 [R2, measured]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
1547
|
+
"date": "2026-11-27"
|
|
1552
1548
|
},
|
|
1553
1549
|
{
|
|
1554
1550
|
"type": "editorial",
|
|
@@ -3720,12 +3716,12 @@
|
|
|
3720
3716
|
"verify_timeout_s": 4800,
|
|
3721
3717
|
"note": "Flash-Next IQ2_XS 256K on Strata 0.2.2 (engine 0.1.47), the fallback when the computer's memory cannot hold Swift 1.5 IQ3_S: ST2/ST3 measured 20.0 GiB VRAM beside d3-nano, 32 GiB RAM ceiling, 128-168 tok/s decode (engine 0.1.43).\nThe pack and MTP draft files are generated from pinned inputs by the bundled Strata tools during installation, with exact size and SHA256 checks before publication; existing matching files are reused. Preparation reserves 9 GiB for raw MTP tensors, their intermediate GGUF and gguf-py sources, in addition to the staged output group. GPU acceptance evidence below predates this fresh-install path.\nConversation parking (--conversation-cache-*) is planned by stack plan --conversation-cache: auto turns it on only when the whole suite still fits, and adds the budget to this service's cgroup ceilings. ST5 (lab-12020, 2026-10-23) measured a parked conversation at ~340 MB plus ~14 KB per token (415-560 MB at 5.3K-6.7K tokens), a park in 2.6-5.1 s and a restore in 1.0-1.3 s, so the 4 GiB / 4-slot budget holds four such conversations; more alternating conversations than slots evict each other oldest-first; the 512 MiB floor follows Strata's advice for an engine near its cap, and 2048 minimum tokens keeps short side requests (classification, quick replies) from evicting a long agent conversation. Without parking, a request whose prompt does not continue the live conversation drops it, so clients that alternate re-read their whole prompt.\nA fixed --expert-cache slot count is sized from the card (expert_cache_sizing) instead of auto: lab241-rsi (2026-10-23, lab-12021 GPU3 x16) cut the fixed agent workload by 13.4% (decode 118 -> 156 tok/s). --prefill auto:16384 gained another 8.6% under the 36 GiB parking ceiling but was killed by systemd-oomd at start under 34 GiB without parking: its prompt buffers take the RAM parking is priced for, so it is not in this recipe.\nSTRATA_ROUTE_TAIL_SKIP=0 turns off Strata's lossy CUDA default that skips missed low-rank experts. X2 (evidence/2026-10-26-strata-tailskip-x2-lab12021, lab-12021 GPU3, IQ2_XS at the production 10132 slots) measured teacher-forced KL 0.045 and top-1 agreement 93.5% for the default against it off (agent transcripts: KL 0.12, 91.0%), for +6.6% decode and -3.4% on the fixed agent workload.",
|
|
3722
3718
|
"quality": {
|
|
3723
|
-
"score":
|
|
3719
|
+
"score": 52,
|
|
3724
3720
|
"sources": [
|
|
3725
3721
|
{
|
|
3726
3722
|
"type": "intelligence_score",
|
|
3727
|
-
"ref": "catalog/model-matrix/scores.json
|
|
3728
|
-
"date": "2026-11-
|
|
3723
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of qwen3.8-flash-next/gsq-rco-iq2_xs = 52.1 (AIHOT third-party capability scale minus v3 IRT penalty 7.85 [R3, measured]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
3724
|
+
"date": "2026-11-27"
|
|
3729
3725
|
}
|
|
3730
3726
|
]
|
|
3731
3727
|
},
|
|
@@ -3850,12 +3846,12 @@
|
|
|
3850
3846
|
"verify_timeout_s": 1800,
|
|
3851
3847
|
"note": "Qwen3.6-35B-A3B UD-Q3_K_M on PolyStrata's strata-poly engine (0.2.20-poly.1) for 8 GB cards with 32 GB of memory: the engine fills the card with the experts it uses most and keeps the rest in host RAM, so a 35B model with 3B active runs where the weights do not fit. 64K window, 2 parallel requests (parallel: 2), --tail-skip 0 (upstream's default of 6 skips expert rows).\nSP9I (2026-11-11, engine 0.1.45-poly.9, installed by stack apply into an 8 GB share of a 96 GB card): acceptance 9/9, whole-card peak 7626 MiB during a 59.5K-token prompt with this recipe's 1152 MiB reserve (8138 MiB with 640, too close to an 8 GB card's 8192), anonymous memory at most 2.7 GiB, 100 tok/s after the 59.5K prompt on server-class CPU and memory. No real 8 GB card or desktop CPU was measured; speed there will be lower (upstream: 42-46 tok/s after 64K on an RTX 4070 Laptop).\n--ram-experts-mib 6144 holds 6 GiB of the experts outside VRAM in RAM and leaves the rest in the file cache. Measured 2026-11-20 on an RTX 4070 Laptop (8 GB) with 32 GB, Windows 11, engine 0.1.45-poly.9 started with this recipe's planned command: 2.9 GiB of experts in VRAM, 10.8 GiB outside; engine working set at most 7.6 GiB and private memory at most 10.0 GiB during a 64K-token prompt; the 9 GiB memory estimate Windows plans are priced by is that working set and the server's with a margin, since Windows prices against available physical memory; 52 tok/s in a short chat, 46 tok/s after the 64K prompt, 69 tok/s over a 1,024-token answer.\nPS219 (2026-11-23, engine 0.2.19-poly.1, installed by stack apply, three rounds, medians). RTX 5090 32 GB, Linux: 10,496/10,496 experts in VRAM, 456 tok/s in a short chat, 13,618 tok/s reading a prompt of 26K tokens and 495 tok/s after it, server memory at most 3.8 GiB.\nPS220 (2026-11-23, engine 0.2.20-poly.1, installed by stack apply, three rounds, medians). RTX 4070 Laptop 8 GB, Windows 11: 2,282/10,496 experts in VRAM, 59 tok/s in a short chat, 2,462 tok/s reading a prompt of 26K tokens and 49 tok/s after it, server memory at most 7.9 GiB. M5 Ultra 256 GB, macOS 27.2: 10,496/10,496 experts in VRAM, 151 tok/s in a short chat, 3,924 tok/s reading a prompt of 26K tokens and 62 tok/s after it, 18 GB held.\nIts memory is mostly page cache of the GGUF; the service ceiling bounds it, and --conversation-cache-mib auto parks idle conversations inside that ceiling.\nGreedy output is not bit-reproducible between requests: the split of experts between card and CPU follows use (SPOLY).\nText only: image input is off for this recipe.",
|
|
3852
3848
|
"quality": {
|
|
3853
|
-
"score":
|
|
3849
|
+
"score": 34,
|
|
3854
3850
|
"sources": [
|
|
3855
3851
|
{
|
|
3856
3852
|
"type": "intelligence_score",
|
|
3857
|
-
"ref": "catalog/model-matrix/
|
|
3858
|
-
"date": "2026-11-
|
|
3853
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of qwen3.6-35b-a3b/ud-q3_k_m = 33.9 (AIHOT third-party capability scale minus v3 IRT penalty 3.54 [R2, measured]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
3854
|
+
"date": "2026-11-27"
|
|
3859
3855
|
}
|
|
3860
3856
|
]
|
|
3861
3857
|
},
|
|
@@ -3966,8 +3962,8 @@
|
|
|
3966
3962
|
"sources": [
|
|
3967
3963
|
{
|
|
3968
3964
|
"type": "intelligence_score",
|
|
3969
|
-
"ref": "catalog/model-matrix/
|
|
3970
|
-
"date": "2026-11-
|
|
3965
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of qwen3.6-35b-a3b/ud-q4_k_m = 35.9 (AIHOT third-party capability scale minus v3 IRT penalty 1.48 [R1, prior]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
3966
|
+
"date": "2026-11-27"
|
|
3971
3967
|
}
|
|
3972
3968
|
]
|
|
3973
3969
|
},
|
|
@@ -4100,12 +4096,12 @@
|
|
|
4100
4096
|
"verify_timeout_s": 1800,
|
|
4101
4097
|
"note": "Thinking Machines Inkling 2 Mini UD-Q4_K_XL (Mainline_Support inkling2_loop, 5.41 BPW) on PolyStrata v0.2.20-poly.6 for 24 GB+ NVIDIA CUDA 13 cards (driver >= 580) with 128K FP8 KV cache and native vision (strata-vision GPU on >= 23.5 GiB cards, CPU below). Default concurrency is 2 parallel requests (parallel: 2 -> --batch 2); --prefer concurrent still falls back to llama.cpp Inkling 2 Mini pending live concurrent benchmarks.\nMeasured on local-118 GPU0 24 GB share (2026-11-23-polystrata-inkling2-mini-local118): all 3072/3072 routed experts fit in VRAM (14.7 GiB, 0.0 GiB offloaded), strata-vision GPU 791 MiB, whole-card peak 21,601 MiB across 58.4K and 105.6K prompts (2,463 MiB below the 24 GB gate), anonymous host RAM peak 1.7 GiB, 176.4 tok/s short decode, 6,869 tok/s prefill and 138.8 tok/s decode after 58.4K prompt (needle hit, vision and tool calling passed). Promoted above same-score llama.cpp Inkling on supported CUDA 13 NVIDIA hosts by roadmap decision 66.",
|
|
4102
4098
|
"quality": {
|
|
4103
|
-
"score":
|
|
4099
|
+
"score": 53,
|
|
4104
4100
|
"sources": [
|
|
4105
4101
|
{
|
|
4106
4102
|
"type": "intelligence_score",
|
|
4107
|
-
"ref": "catalog/model-matrix/scores.json
|
|
4108
|
-
"date": "2026-11-
|
|
4103
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of inkling-2-mini/ud-q4_k_xl = 53.1 (AIHOT third-party capability scale minus v3 IRT penalty 1.48 [R1, prior]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
4104
|
+
"date": "2026-11-27"
|
|
4109
4105
|
}
|
|
4110
4106
|
]
|
|
4111
4107
|
},
|
|
@@ -4241,12 +4237,12 @@
|
|
|
4241
4237
|
"verify_timeout_s": 1800,
|
|
4242
4238
|
"note": "Thinking Machines Inkling 2 Mini UD-Q3_K_XL (Mainline_Support inkling2_loop, 4.18 BPW) on PolyStrata v0.2.20-poly.6 for 8, 12 and 16 GB NVIDIA CUDA 13 cards (driver >= 580) with >= 24 GB RAM. Uses 64K FP8 KV cache, --vram-pool (caps prefill staging and KV growth strictly inside the card budget), --ram-experts-mib 6144, --tail-skip 0, and CPU strata-vision on < 23.5 GiB cards. Default concurrency is 2 parallel requests (parallel: 2 -> --batch 2) and LoopCD-Hidden (--loopcd-hidden 0.2) is enabled by default.\nMeasured on local-118 GPU0 stand-in shares (2026-11-23-polystrata-inkling2-mini-local118, 58.4K prompt needle + vision + tool calls all passed): 16 GB share 3058/3072 experts in VRAM, peak 14,498 MiB (1,374 MiB below gate), 178.3 tok/s short / 61.1 tok/s at 58.4K; 12 GB share 1977/3072 experts, peak 10,388 MiB, 138.7 / 47.0 tok/s; 8 GB share 896/3072 experts, peak 6,292 MiB (1,388 MiB below gate), cgroup peak 8.7 GiB / anon 8.4 GiB, 65.6 / 30.3 tok/s (server-class CPU stand-in upper bound; upstream RTX 4070 Laptop 8 GB measured 56 / 42 tok/s). Promoted by roadmap decision 66.\nWindows runs without --vram-pool (card_args keeps it on Linux). PSIW (2026-11-23, RTX 4070 Laptop 8 GB, Windows 11): with it the engine claims a 13,204 MiB pool from the process budget Windows reports, larger than the card, and every request longer than about 30 tokens gets \"no VRAM for a prompt's buffers\"; stack apply failed 3 times out of 3 on the 0.2.19-poly.1 and 0.2.20-poly.1 engines. Without it, on 0.2.19-poly.1: plain text of 54 to 31,022 tokens, Chinese, the CPU picture reader, a tool call and a needle in a 54K-token prompt all pass, card peak 6,966-7,001 MiB of 8,188. PolyStrata's main fixes the engine side (5b080f37b) for its next release.",
|
|
4243
4239
|
"quality": {
|
|
4244
|
-
"score":
|
|
4240
|
+
"score": 53,
|
|
4245
4241
|
"sources": [
|
|
4246
4242
|
{
|
|
4247
4243
|
"type": "intelligence_score",
|
|
4248
|
-
"ref": "catalog/model-matrix/scores.json
|
|
4249
|
-
"date": "2026-11-
|
|
4244
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of inkling-2-mini/ud-q3_k_xl = 53.1 (AIHOT third-party capability scale minus v3 IRT penalty 1.48 [R2, measured]; docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
4245
|
+
"date": "2026-11-27"
|
|
4250
4246
|
}
|
|
4251
4247
|
]
|
|
4252
4248
|
},
|
|
@@ -4271,7 +4267,7 @@
|
|
|
4271
4267
|
"runtime": "strata-poly",
|
|
4272
4268
|
"version": "UD-Q2_K_XL",
|
|
4273
4269
|
"display_name": "Inkling 2 Mini",
|
|
4274
|
-
"description": "
|
|
4270
|
+
"description": "Deprecated 2.8-bit PolyStrata build of Inkling 2 Mini; retired from automatic recommendations due to multi-turn agent degradation (explicit --llm and existing local installs only).",
|
|
4275
4271
|
"family": "other",
|
|
4276
4272
|
"publisher": "Thinking Machines",
|
|
4277
4273
|
"parameters": "26.4B",
|
|
@@ -4282,7 +4278,7 @@
|
|
|
4282
4278
|
"revision": "ea0c79b2ecd73669e774c8519b79bfabfddbc027",
|
|
4283
4279
|
"license": "Apache-2.0",
|
|
4284
4280
|
"license_url": "https://huggingface.co/thinkingmachines/Inkling-2-Mini/blob/ed40e7da625f594fc9c4990f5f66be24873c22d7/README.md",
|
|
4285
|
-
"status": "
|
|
4281
|
+
"status": "deprecated",
|
|
4286
4282
|
"tasks": [
|
|
4287
4283
|
"llm",
|
|
4288
4284
|
"vision"
|
|
@@ -4390,20 +4386,17 @@
|
|
|
4390
4386
|
],
|
|
4391
4387
|
"health_path": "/health",
|
|
4392
4388
|
"verify_timeout_s": 1800,
|
|
4393
|
-
"note": "
|
|
4389
|
+
"note": "DEPRECATED from --llm auto and Model Library recommendations (roadmap decision 70, 2026-11-27): at 2.80 BPW (IQ1_S in blk.0-6 including loop-entry blk.6, IQ2_XXS/T42 in loop layers, Unsloth KLD 0.0595 = 5.56x Q4), paired PolyStrata v0.2.20-poly.5 evaluation (2026-11-26, local-118 GPU0 stand-in) showed BFCL v4 MT-Hard collapsing from 36.0% (72/200) to 19.0% (38/200, -17.0 pp, 95% CI [-24.0, -10.0], McNemar p=5e-6) with 30 consecutive identical tool-call loop steps (Q4: 0), 1 force-terminated infinite loop, +40% empty turns (35 vs 25), C-Eval 520 -3.08 pp (73.85% vs 76.92%, p=0.0195), Chinese-to-English flips under card sampling, and further 8 GB CPU-offload regressions (30/36 diag, extra code truncation and wrong tool call). Kept as deprecated on PolyStrata v0.2.20-poly.6 (parallel: 2, --loopcd-hidden 0.2) for explicit --llm, approved-plan resume, and on-disk library management.\nHistorical calibration (SP219, 2026-11-23-polystrata-inkling2-mini-local118, local-118 GPU0 8 GB share inside a 14 GiB cgroup): 1428/3072 experts in VRAM, whole-card peak 6,294 MiB (1,386 MiB below gate), cgroup peak 6.8 GiB / anon 6.5 GiB, 112.8 tok/s short / 3,836 tok/s prefill / 45.5 tok/s decode after 58.4K prompt (needle hit, vision and tool calls passed). Originally added by roadmap decision 66.\nWindows runs without --vram-pool (card_args keeps it on Linux). PSIW (2026-11-23, RTX 4070 Laptop 8 GB, Windows 11, engine 0.2.19-poly.1): with it the engine claims a 9,092 MiB pool from the process budget Windows reports, larger than the card, stack apply fails and every request longer than about 30 tokens gets \"no VRAM for a prompt's buffers\". Without it, plain text of 54 to 31,022 tokens, Chinese, the CPU picture reader, a tool call and a needle in a 54K-token prompt all pass, card peak 6,992-7,033 MiB of 8,188. PolyStrata's main fixes the engine side (5b080f37b) for its next release.",
|
|
4394
4390
|
"quality": {
|
|
4395
|
-
"score":
|
|
4391
|
+
"score": 47,
|
|
4396
4392
|
"sources": [
|
|
4397
4393
|
{
|
|
4398
4394
|
"type": "intelligence_score",
|
|
4399
|
-
"ref": "catalog/model-matrix/scores.json
|
|
4400
|
-
"date": "2026-11-
|
|
4395
|
+
"ref": "catalog/model-matrix/scores.json v3: installed SimplexAI score of inkling-2-mini/ud-q2_k_xl = 46.6 (AIHOT third-party capability scale minus v3 IRT penalty 8.04 [R3, measured]; gated (MT-Hard -17.0 pp vs ud-q4_k_xl (p=5e-06); tool-loop rate 1.5% > 0.5%); docs/local-models/model-scoring.md, roadmap decisions 33 and 71)",
|
|
4396
|
+
"date": "2026-11-27"
|
|
4401
4397
|
}
|
|
4402
4398
|
]
|
|
4403
4399
|
},
|
|
4404
|
-
"validated_on": [
|
|
4405
|
-
"linux"
|
|
4406
|
-
],
|
|
4407
4400
|
"card_args": [
|
|
4408
4401
|
{
|
|
4409
4402
|
"at_least_bytes": 0,
|
|
@@ -652,17 +652,21 @@ def fetch_hf_repo(
|
|
|
652
652
|
resolved_token = resolve_token("huggingface", token, hub_explicit=hub_explicit)
|
|
653
653
|
web_url = repo_web_url("huggingface", repo_id)
|
|
654
654
|
last_err = ""
|
|
655
|
-
|
|
655
|
+
endpoints = hf_endpoints(explicit_endpoint)
|
|
656
|
+
for idx, endpoint in enumerate(endpoints):
|
|
656
657
|
base = endpoint.rstrip("/")
|
|
657
658
|
meta_url = f"{base}/api/models/{repo_id}" + (
|
|
658
659
|
f"/revision/{urllib.parse.quote(revision, safe='')}" if revision else ""
|
|
659
660
|
)
|
|
660
661
|
ep_token = token_for_endpoint("huggingface", meta_url, resolved_token)
|
|
662
|
+
has_fallback = idx + 1 < len(endpoints)
|
|
661
663
|
try:
|
|
662
664
|
meta = http_json(meta_url, token=ep_token, timeout=timeout)
|
|
663
665
|
if not isinstance(meta, Mapping):
|
|
664
666
|
last_err = "invalid Hugging Face model metadata response"
|
|
665
667
|
continue
|
|
668
|
+
if bool(meta.get("gated")) and resolved_token and ep_token is None and has_fallback:
|
|
669
|
+
continue
|
|
666
670
|
commit = str(meta.get("sha") or revision or "main").strip()
|
|
667
671
|
tree_url = f"{base}/api/models/{repo_id}/tree/{urllib.parse.quote(commit, safe='')}?recursive=true"
|
|
668
672
|
files = _hf_tree_files(
|
|
@@ -670,6 +674,11 @@ def fetch_hf_repo(
|
|
|
670
674
|
)
|
|
671
675
|
except urllib.error.HTTPError as exc:
|
|
672
676
|
if outcome := _http_err_outcome("huggingface", repo_id, web_url, exc, bool(ep_token)):
|
|
677
|
+
if resolved_token and ep_token is None and has_fallback:
|
|
678
|
+
last_err = redact_secrets(
|
|
679
|
+
f"HTTP {exc.code}: {exc.reason}", extra_token=resolved_token
|
|
680
|
+
)
|
|
681
|
+
continue
|
|
673
682
|
return outcome
|
|
674
683
|
last_err = redact_secrets(f"HTTP {exc.code}: {exc.reason}", extra_token=resolved_token)
|
|
675
684
|
continue
|
|
@@ -39,6 +39,7 @@ _MS_TOKEN_RE = re.compile(r"\bms[-_][A-Za-z0-9_-]+\b")
|
|
|
39
39
|
|
|
40
40
|
# Internal unit-test hook ONLY; strictly False in production.
|
|
41
41
|
_ALLOW_INSECURE_LOOPBACK_FOR_TESTS = False
|
|
42
|
+
is_hf_mirror_host = remote_ops_redirect.is_hf_mirror_host
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
def redact_secrets(text: str, *, extra_token: str | None = None) -> str:
|
|
@@ -329,8 +330,8 @@ def _parse_hf_url(url: urllib.parse.SplitResult) -> ParsedRepoSpec:
|
|
|
329
330
|
repo_id = _validate_owner_repo(parts[0], parts[1])
|
|
330
331
|
rev = parts[3] if len(parts) >= 4 and parts[2] in ("blob", "resolve", "tree") else None
|
|
331
332
|
file_name = "/".join(parts[4:]) if len(parts) > 4 and parts[2] in ("blob", "resolve") else None
|
|
332
|
-
host = (url.hostname
|
|
333
|
-
explicit = f"https://{host}" if host
|
|
333
|
+
host = remote_ops_redirect.normalize_host(url.hostname)
|
|
334
|
+
explicit = f"https://{host}" if is_hf_mirror_host(host) else None
|
|
334
335
|
return ParsedRepoSpec(
|
|
335
336
|
"huggingface", repo_id, _validate_revision(rev), None, file_name, explicit
|
|
336
337
|
)
|
|
@@ -415,7 +416,17 @@ def parse_repo_spec(
|
|
|
415
416
|
)
|
|
416
417
|
if lower_raw.startswith("https://"):
|
|
417
418
|
url = urllib.parse.urlsplit(raw)
|
|
418
|
-
|
|
419
|
+
if url.username is not None or url.password is not None:
|
|
420
|
+
raise LibraryError("INVALID_REPO_SPEC", "repository URL must not contain credentials")
|
|
421
|
+
try:
|
|
422
|
+
port = url.port
|
|
423
|
+
except ValueError:
|
|
424
|
+
raise LibraryError("INVALID_REPO_SPEC", "invalid port in repository URL") from None
|
|
425
|
+
if port is not None and port != 443:
|
|
426
|
+
raise LibraryError(
|
|
427
|
+
"INVALID_REPO_SPEC", f"non-standard port {port} is not allowed in repository URL"
|
|
428
|
+
)
|
|
429
|
+
host = remote_ops_redirect.normalize_host(url.hostname)
|
|
419
430
|
if host in HF_HOSTS:
|
|
420
431
|
parsed = _parse_hf_url(url)
|
|
421
432
|
elif host in MS_HOSTS:
|