@simplexai/localmodels-darwin-arm64 0.1.0-dev.42 → 0.1.0-dev.44
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 +40 -39
- package/modules/localmodels/__init__.py +1 -1
- package/modules/localmodels/auth_proxy.py +285 -82
- package/modules/localmodels/bifrost_models.py +9 -2
- package/modules/localmodels/bifrost_provider.py +42 -7
- package/modules/localmodels/catalog.json +8 -0
- package/modules/localmodels/debug_mode.py +2 -18
- package/modules/localmodels/engines.py +19 -6
- package/modules/localmodels/gateway_bifrost.py +10 -1
- package/modules/localmodels/harness.py +3 -1
- package/modules/localmodels/library_convert.py +491 -57
- package/modules/localmodels/library_gateway.py +15 -7
- package/modules/localmodels/library_pricing.py +159 -31
- package/modules/localmodels/library_status.py +29 -4
- package/modules/localmodels/probe.py +42 -9
- package/modules/localmodels/runtime_args.py +2 -1
- package/modules/localmodels/runtime_auth.py +75 -25
- package/modules/localmodels/runtime_cli.py +9 -9
- package/modules/localmodels/runtime_install.py +55 -22
- package/modules/localmodels/runtime_io.py +76 -210
- package/modules/localmodels/runtime_process.py +15 -7
- package/modules/localmodels/runtime_windows_acl.py +196 -0
- package/modules/localmodels/source_byok.py +116 -30
- package/modules/localmodels/source_byok_probe.py +57 -141
- package/modules/localmodels/source_cli.py +11 -17
- package/modules/localmodels/stack.py +12 -1
- package/modules/localmodels/stack_client_settings.py +8 -1
- package/modules/localmodels/stack_compose.py +1 -0
- package/modules/localmodels/stack_route.py +1 -5
- package/modules/localmodels/stack_up.py +20 -1
- package/modules/localmodels/vision.py +2 -1
- package/modules/localmodels/web/view/view.css +1 -1
- package/modules/{simplex_localmodels-0.1.0.dev42.dist-info → simplex_localmodels-0.1.0.dev44.dist-info}/METADATA +1 -1
- package/modules/{simplex_localmodels-0.1.0.dev42.dist-info → simplex_localmodels-0.1.0.dev44.dist-info}/RECORD +37 -36
- package/package.json +1 -1
- package/tool.json +1 -1
- /package/modules/{simplex_localmodels-0.1.0.dev42.dist-info → simplex_localmodels-0.1.0.dev44.dist-info}/WHEEL +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev42.dist-info → simplex_localmodels-0.1.0.dev44.dist-info}/entry_points.txt +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev42.dist-info → simplex_localmodels-0.1.0.dev44.dist-info}/licenses/NOTICE +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev42.dist-info → simplex_localmodels-0.1.0.dev44.dist-info}/licenses/localmodels/HERMES-LICENSE +0 -0
|
@@ -37,8 +37,9 @@ def _version(text: str | None) -> tuple[int, ...]:
|
|
|
37
37
|
return tuple(int(x) for x in re.findall(r"\d+", text or "")[:2])
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
def _cuda_tuple(version: str) -> tuple[int,
|
|
41
|
-
|
|
40
|
+
def _cuda_tuple(version: str) -> tuple[int, int]:
|
|
41
|
+
parts = [int(x) for x in re.findall(r"\d+", version)[:2]]
|
|
42
|
+
return (parts[0], parts[1] if len(parts) > 1 else 0) if parts else (0, 0)
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
def engine_lock_path(tag: str | None = None) -> Path:
|
|
@@ -75,9 +76,12 @@ def select_engine_build(
|
|
|
75
76
|
for b in lock["builds"]
|
|
76
77
|
if b["platform"] == platform and b["arch"] == facts.get("arch") and b["backend"] in accepted
|
|
77
78
|
]
|
|
78
|
-
|
|
79
|
+
platform_builds = builds
|
|
80
|
+
driver_cuda = ""
|
|
81
|
+
driver = (0, 0)
|
|
79
82
|
if backend == "cuda":
|
|
80
|
-
|
|
83
|
+
driver_cuda = ((facts.get("nvidia") or {}).get("cuda_version") or "").strip()
|
|
84
|
+
driver = _cuda_tuple(driver_cuda)
|
|
81
85
|
builds = [b for b in builds if _cuda_tuple(b["min_cuda"]) <= driver]
|
|
82
86
|
builds.sort(
|
|
83
87
|
key=lambda b: (_cuda_tuple(b.get("min_cuda", "")), _version(b.get("min_glibc"))),
|
|
@@ -102,9 +106,18 @@ def select_engine_build(
|
|
|
102
106
|
"host; this tool does not install system packages"
|
|
103
107
|
)
|
|
104
108
|
if not builds:
|
|
109
|
+
detail = ""
|
|
110
|
+
if backend == "cuda" and platform_builds:
|
|
111
|
+
oldest = min((b["min_cuda"] for b in platform_builds), key=_cuda_tuple)
|
|
112
|
+
if driver == (0, 0):
|
|
113
|
+
detail = f" (could not detect the driver's CUDA version; requires CUDA >= {oldest})"
|
|
114
|
+
else:
|
|
115
|
+
detail = (
|
|
116
|
+
f" (the driver supports CUDA {driver_cuda}, "
|
|
117
|
+
f"older than the required CUDA >= {oldest})"
|
|
118
|
+
)
|
|
105
119
|
raise PlanError(
|
|
106
|
-
f"no {lock['tag']} prebuilt engine for {platform}/{facts.get('arch')}/{backend}"
|
|
107
|
-
+ (" (the driver supports too old a CUDA version)" if for_platform else "")
|
|
120
|
+
f"no {lock['tag']} prebuilt engine for {platform}/{facts.get('arch')}/{backend}{detail}"
|
|
108
121
|
)
|
|
109
122
|
return {"tag": lock["tag"], "commit": lock["commit"], **builds[0]}
|
|
110
123
|
|
|
@@ -135,7 +135,14 @@ def plan_notes(has_decision: bool) -> list[str]:
|
|
|
135
135
|
return notes
|
|
136
136
|
|
|
137
137
|
|
|
138
|
-
def adopt(
|
|
138
|
+
def adopt(
|
|
139
|
+
plan: HarnessPlan,
|
|
140
|
+
state: ToolState,
|
|
141
|
+
has_decision: bool,
|
|
142
|
+
context: int | None,
|
|
143
|
+
*,
|
|
144
|
+
vision: bool = False,
|
|
145
|
+
) -> None:
|
|
139
146
|
"""Make ``harness.plan_harness``'s gateway plan this tool's Bifrost: its address, the pi
|
|
140
147
|
model it sets, and pi's and the clients' current defaults as their own settings name them
|
|
141
148
|
(not as a Magpie shows them)."""
|
|
@@ -152,6 +159,8 @@ def adopt(plan: HarnessPlan, state: ToolState, has_decision: bool, context: int
|
|
|
152
159
|
)
|
|
153
160
|
if context:
|
|
154
161
|
gw["context"] = context
|
|
162
|
+
if vision:
|
|
163
|
+
gw["vision"] = True
|
|
155
164
|
for name, seen in gw.get("clients", {}).items():
|
|
156
165
|
environment = harness.gateway_environment(plan)
|
|
157
166
|
seen["model"] = bifrost_clients.current_model(name, environment)
|
|
@@ -190,6 +190,7 @@ class _GatewayOptional(TypedDict, total=False):
|
|
|
190
190
|
llm_fast_key_file: str # private deployment credential, never its content
|
|
191
191
|
llm_key_file: str # direct readiness credential path, only present on two-LLM plans
|
|
192
192
|
context: int # the LLM's context window per request, for the clients' model entries
|
|
193
|
+
vision: bool # True when the served LLM reads images (vision.reads_pictures), for clients
|
|
193
194
|
|
|
194
195
|
|
|
195
196
|
class GatewayPlan(_GatewayOptional):
|
|
@@ -404,6 +405,7 @@ def plan_harness(
|
|
|
404
405
|
clients: bool = False,
|
|
405
406
|
gateway_kind: str = "magpie",
|
|
406
407
|
context: int | None = None,
|
|
408
|
+
vision: bool = False,
|
|
407
409
|
) -> HarnessPlan:
|
|
408
410
|
"""``plan_tools``, plus the native clients when asked, and the stack's gateway wiring."""
|
|
409
411
|
if gateway_kind not in GATEWAYS:
|
|
@@ -470,7 +472,7 @@ def plan_harness(
|
|
|
470
472
|
if gateway_kind == "bifrost":
|
|
471
473
|
from localmodels import gateway_bifrost
|
|
472
474
|
|
|
473
|
-
gateway_bifrost.adopt(plan, state, decision is not None, context)
|
|
475
|
+
gateway_bifrost.adopt(plan, state, decision is not None, context, vision=vision)
|
|
474
476
|
return plan
|
|
475
477
|
|
|
476
478
|
|