Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .mailmap

This file was deleted.

90 changes: 90 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,96 @@ Unreleased changes live in [`changelog.d/`](changelog.d/README.md), one file per

## [Unreleased]

## [2.40.0] - 2026-11-27

### Added

- **Vision routes take memory modes, load-time quantization and video soundtracks** (`server/vision_endpoints.py`,
`server/capability_generation.py`). Every image, edit, upscale and video route, and each job, declares `memory_mode`
(`default`, `low`, `lowest`) and `quantize` (bits, or `none`); the video routes also declare `soundscape`, `music`,
`generate_audio` and `audio_shift` (MiniMax-H3). They reach AbstractVision as typed request fields, and the backend
decides what it honours: a value it refuses is answered with 422 and
`{"error": {"code": "capability_not_supported", "field", "supported", "message"}}` before any model loads, and the
refused request leaves nothing loaded or cached. A value the backend rejects as invalid (an unknown mode name, a
top-level value and `extra` that disagree) is 400 `invalid_request`; a value of the wrong type is refused with 422
`validation_error` and its `field` (400 on a form). `extra` reaches the backend unchanged; a key named like an option is that option only for
a backend that lists it. The OpenAI-compatible remote lane forwards requests as before and refuses the typed fields
with 422 (`supported: []`).
- **Video responses describe their soundtrack** (`audio`, AbstractVision's `audio_summary()`: `present`, `sample_rate`,
`channels`, `codec`, `muxed`, `duration_seconds`, and the track as `wav` when the engine could not mux it;
`{"present": false}` without one), on each item and at the top level. `memory_mode_used` is the memory mode the
backend recorded for the run. A succeeded job's `result` is the synchronous response body; a failed job carries the
synchronous route's `error_code` (`capability_not_supported` with `error_field` and `error_supported`, or
`invalid_request`).
- **Cancelling a vision job** (`POST /v1/vision/jobs/{job_id}/cancel`, 404 for an unknown job). The job's cancel event
is the backend request's `cancel_event`: MLX-Gen stops at its next step and the job ends `cancelled`. A synchronous
request is cancelled the same way when its client disconnects.
- **Vision discovery lists what each model honours** (`GET /v1/vision/models`): every entry carries `memory_modes`,
`supports_audio` and `audio_fields`, and its `routed_model` is what a request sends to run it on the backend it
states (an MLX-Gen package found in the cache is published as `mlx-gen/<repo>`, no longer as the bare repo id the
router sends to Diffusers); `memory_modes_by_provider` and `defaults` (per task, the model a request that
names none runs in process, listed as `default`) are added, and `detail=true` relays AbstractVision's measured
`memory_peaks` for each entry as it returns them. `llm.vision.memory_peaks(model)` reaches the same
call from Python.
- **MiniMax-H3 in the downloads catalog** (`assets/model_downloads_catalog.json`): `AbstractFramework/minimax-h3-8bit`
(the row's pre-selected package), `-bf16` and `-4bit`, sizes and revisions read from the Hugging Face API, each with
mlx-gen's measured `default`-mode footprint as `resident`. The packages are `gated` (a new catalog artifact field) under
the MiniMax H3 Community License; the row is never a starter nor a `--recommended` download, so nothing downloads it
implicitly.

### Changed

- **The vision test images carry no location or serial number.** The GPS data of four images and the camera serial
number of one were blanked in place in `tests/vision_examples/`; every other byte, including the pictures
themselves, is unchanged. The Portkey provider's notes no longer name a specific gateway.
- **In-process vision generation runs one request at a time** (`server/vision_endpoints.py`), across the synchronous
routes and the jobs: a synchronous request waits for its turn, and a job is refused with 409 while a generation runs.
The remote lane is not limited.
- **A configured vision route's options are split into backend settings and request defaults** (one table per backend
kind). Backend settings (`base_model`, `device`, upstream paths, ...) only build the backend and no longer reach the
request's `extra`; every other option (`steps`, upscale `resolution`, `memory_mode`, ...) is a request default for
requests that name the route's model or none, on the synchronous routes and the jobs alike, and the backend checks
it like a request value.
- **`POST /acore/models/load` preloads a vision model with its route's `memory_mode` and `quantize` defaults** (checked
by AbstractVision as a request's are; a default the model cannot honour is refused with the structured 422, leaving a
model already loaded as it was) and pins
it, so a request naming nothing runs on that instance; a pinned model is never evicted. The loaded state
`GET /acore/models/loaded` reports is the backend's own `has_loaded_model()`: a `low` or `lowest` run drops the model,
and a pinned model dropped that way keeps its pin and is loaded again by its next request.
- **Every HTTP error body has `error.code`** (`server/app.py`), and `error.field` when one field is at fault; a structured
detail passes through with the status's code added when it has none.
- **The upscale routes pass `quantize` to SeedVR2 as sent** (an integer as bits): the backend decides, and `none`,
`0`, `false`, `off` and `no` load it unquantized; the server's own list of accepted widths is gone.
- **AbstractVision 0.3.37 is the floor** (base dependency, the `apple` / `gpu` settings and the `vision-*` aliases).

### Fixed

- **No vision or residency response carries a filesystem path** (`server/vision_endpoints.py`). A model loaded from a
local folder is listed by the folder's name (`diffusers/<name>` selects it again) and a configured local default
as `default`; cache and snapshot
directories are no longer published, and an unexpected engine error returns its type only (the server log has the
message).
- **A video model a request loaded is listed under its task**: `GET /acore/models/loaded?task=text_to_video` left out
a loaded MiniMax-H3 or Wan model.
- **A refusal the vision backend raises is 422, not 500.**
- **A refused `NaN` no longer breaks the validation error response** (`server/app.py`).
- **The OpenAI API is recognised by AbstractVision's rule** (`looks_like_openai_api`: the parsed host is
`api.openai.com` or a regional `*.api.openai.com`), not a substring of the URL.
- **A model a failed or cancelled run left loaded is listed and can be unloaded**: the server keeps a backend after its
run when the run succeeded or the backend still holds its model, and only a request refused before anything loaded
leaves no entry.
- **A local engine missing or outside AbstractVision's version bounds is 501 with AbstractVision's message** (MLX-Gen:
`mlx-gen>=0.40.1,<0.41` with AbstractVision 0.3.37, `mlx-gen>=0.40.3,<0.41` from 0.3.38, and `mlx>=0.32.4` on
macOS).
- **A gated Hugging Face repository is reported as gated** (`download.py`). `GatedRepoError` subclasses
`RepositoryNotFoundError`, so a gated model was reported as not found; the message now names the model page where the
licence is accepted and the token to retry with.
- **A shell session never returns a previous command's output after a timeout** (`tools/shell_session.py`). A
timed-out command that kept running through the interrupt could leave its output to the next command. The session
now interrupts again with a new sync marker until one is seen, and is closed when none is (that call reports it and
the next `shell_exec` starts a new session). The terminal is also set up before the shell starts: on a loaded machine
the shell could echo every command it ran into the output.

## [2.39.0] - 2026-11-25

### Added
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
Unified LLM Interface
> Write once, run everywhere

What's new in 2.40.0: the server's vision routes take a memory mode (`default`, `low`, `lowest`), a load-time `quantize` and, for MiniMax-H3, soundtrack fields; discovery lists each model's memory modes, sound support and measured memory peaks; a running generation job can be cancelled; responses carry no filesystem paths and every error has an `error.code`. See [CHANGELOG.md](CHANGELOG.md#2400---2026-11-27).

What's new in 2.39.0: on Windows, agents' shell commands run inside the command sandbox under every workspace setting ("Allow everything, refuse listed workspaces" read & write or read-only by default, and "Deny everything, allow listed workspaces"); a drive that stores no permissions (exFAT, FAT, a network share) is named in each command's result as not protected. In 2.38.0: the first Windows sandbox, for the read & write default. See the [changelog](CHANGELOG.md#2390---2026-11-25).

What's new in 2.37.0: with `stream=True`, a native tool call arrives once and complete from OpenAI, OpenAI-compatible (vLLM, LM Studio, OpenRouter, Portkey) and Anthropic streams; a tool call the model did not finish (output stopped at its limit) is reported in `metadata["unparsed_tool_call"]` instead of being delivered with empty arguments, streamed or not; and the registry covers the Thinking Machines Inkling family (Inkling 2 Mini, Inkling 2 Small, Inkling, Inkling Small) with native tool calling. See the [changelog](CHANGELOG.md#2370---2026-11-23).
Expand Down
88 changes: 87 additions & 1 deletion abstractcore/assets/model_downloads_catalog.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "./model_downloads_catalog.schema.json",
"schema": "model_downloads_catalog_v1",
"version": "2026-10-30",
"version": "2026-11-25",
"notes": "Curated download catalog. Sizes are bytes observed in real engine stores/caches (size_source=catalog) or null (unknown). verified=true means the artifact id was seen on a real engine or cache when the seed was built; other ids follow each engine's naming convention and are checked by presence probes and by the post-download verification in model_materializer. upstream={method, checked, revision?} records an id verified to exist upstream on that date (hf_api: HfApi.model_info(files_metadata=True), download_bytes = the weight files; ollama_registry: the registry manifest, download_bytes = the sum of its layers); such an artifact must carry its verified size. options carries route options the recommendation copies (the MTP builds: speculation). resident={bytes, source} (optional, per artifact) is the MEASURED memory the engine needs while it runs, for models whose working memory is not their file size (video generation): the fit verdict uses it instead of download_bytes, and `source` says where and at which profile it was measured. route={key, provider, model} (optional, per artifact) names the capability route that runs the artifact when its engine is not the download provider (AbstractVoice's faster-whisper runs `base`, fetched as a Hugging Face repo): what a surface shows and writes for that route, and how a route stored with the download pair is repaired (capability_defaults.repair_download_pair_routes).",
"companion_sizes": {
"mlx-community/Qwen3.5-4B-MTP-4bit": {
Expand Down Expand Up @@ -5749,6 +5749,92 @@
},
"notes": "Wan2.2 A14B image-to-video (MoE, two 14B experts), run by AbstractVision through MLX-Gen (Apple silicon only). Its memory need is measured at AbstractVision's default canvas (832x480)."
},
{
"id": "minimax-h3",
"family": "minimax-h3",
"display_name": "MiniMax-H3 (video with a stereo soundtrack)",
"vendor": "MiniMax",
"params_total": null,
"params_active": null,
"license": "minimax-h3-community-license",
"capabilities_key": null,
"tags": [
"video",
"large"
],
"starter": false,
"artifacts": [
{
"provider": "mlx-gen",
"artifact": "AbstractFramework/minimax-h3-8bit",
"quant": "8bit",
"download_bytes": 69010605065,
"size_source": "catalog",
"verified": true,
"upstream": {
"method": "hf_api",
"checked": "2026-11-25",
"revision": "bbe22953c7e08315523ed58eb643d3ab7acd1006"
},
"gated": true,
"recommended": true,
"resident": {
"bytes": 39679465288,
"source": "mlx-gen 0.40.1 measured_runs: the whole-process physical footprint of a clip at 960x544, 124 frames, with memory_mode default. The peaks of the other memory modes: GET /v1/vision/models?detail=true (memory_peaks).",
"measured_with": "mlx-gen at 960x544x124 with memory_mode default"
},
"note": "8-bit transformer and conditioner."
},
{
"provider": "mlx-gen",
"artifact": "AbstractFramework/minimax-h3-bf16",
"quant": "bf16",
"download_bytes": 123599877029,
"size_source": "catalog",
"verified": true,
"upstream": {
"method": "hf_api",
"checked": "2026-11-25",
"revision": "3fa65eaa09a1fde5ecc0409fabb4d071d5ab35e1"
},
"gated": true,
"resident": {
"bytes": 58438371168,
"source": "mlx-gen 0.40.1 measured_runs: the whole-process physical footprint of a clip at 960x544, 124 frames, with memory_mode default. The peaks of the other memory modes: GET /v1/vision/models?detail=true (memory_peaks).",
"measured_with": "mlx-gen at 960x544x124 with memory_mode default"
},
"note": "The released 16-bit weights, repacked."
},
{
"provider": "mlx-gen",
"artifact": "AbstractFramework/minimax-h3-4bit",
"quant": "4bit",
"download_bytes": 48164094121,
"size_source": "catalog",
"verified": true,
"upstream": {
"method": "hf_api",
"checked": "2026-11-25",
"revision": "49f35d7c06e79c3be3048e34c5d6ba875a48780f"
},
"gated": true,
"resident": {
"bytes": 34894207480,
"source": "mlx-gen 0.40.1 measured_runs: the whole-process physical footprint of a clip at 960x544, 124 frames, with memory_mode default. The peaks of the other memory modes: GET /v1/vision/models?detail=true (memory_peaks).",
"measured_with": "mlx-gen at 960x544x124 with memory_mode default"
},
"note": "Mixed package: 4-bit conditioner, 6-bit transformer."
}
],
"capabilities_override": {
"text": false,
"vision": false,
"video_generation": true,
"text_to_video": true,
"image_to_video": true
},
"notes": "MiniMax-H3: video with a synchronized stereo soundtrack (text-to-video and first-frame image-to-video), run by AbstractVision through MLX-Gen (Apple silicon only). The packages hold the base weights; the Turbo schedules also need their adapter, which `abstractvision download AbstractFramework/minimax-h3-8bit --base-model minimax-h3-turbo-544p` fetches. The MiniMax H3 Community License's grant excludes the European Union, the United Kingdom, the Republic of Korea and the United States of America. Its memory need is measured at 960x544, 124 frames."
},
{
"id": "faster-whisper-base",
"family": "whisper",
Expand Down
1 change: 1 addition & 0 deletions abstractcore/assets/model_downloads_catalog.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"size_source": {"type": "string", "enum": ["catalog", "unknown"]},
"verified": {"type": "boolean", "description": "The id was seen on a real engine store or cache when the seed was built."},
"recommended": {"type": "boolean", "description": "The portable (non-Apple-silicon) curated pre-selection. On Apple silicon the text-tier rows pre-select model_catalog.APPLE_TEXT_TIERS instead."},
"gated": {"type": "boolean", "description": "The Hugging Face repository is gated: its license must be accepted on the model page, signed in, before the account's token can download it."},
"options": {
"type": "object",
"description": "Route options a recommendation copies with this artifact (the MTP builds: speculation, validated by providers/speculation.py).",
Expand Down
13 changes: 13 additions & 0 deletions abstractcore/capabilities/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1712,6 +1712,19 @@ def list_provider_adapters(
out = method(model=model, task=task, provider=provider)
return list(out or [])

def memory_peaks(self, model: str) -> List[Dict[str, Any]]:
"""The vision plugin's measured peak memory rows for one model, as it returns them."""
backend = self._registry.get_vision()
method = getattr(backend, "memory_peaks", None)
if not callable(method):
raise CapabilityUnavailableError(
capability="vision",
reason="The selected vision capability backend does not expose memory_peaks(model).",
install_hint=self._registry._default_install_hint("vision"),
details={"backend_id": getattr(backend, "backend_id", None)},
)
return list(method(model))

def available_providers(self, *, task: Optional[str] = None) -> Dict[str, Any]:
"""Return lightweight provider availability for vision backends."""
backend = self._registry.get_vision()
Expand Down
15 changes: 15 additions & 0 deletions abstractcore/capabilities/vision_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,21 @@ def _discover_local_diffusers_models(model_dirs: list[Path]) -> list[str]:
return sorted(out)


def local_diffusers_model_path(name: str) -> Optional[str]:
"""The local Diffusers folder a published model name stands for, or None.

A folder that is not named `org__name` is published by its folder name (a server lists no
filesystem path); that name, alone, selects the folder again.
"""
wanted = str(name or "").strip()
if not wanted or "/" in wanted:
return None
for model_id in _discover_local_diffusers_models(_default_local_diffusers_model_dirs()):
if Path(model_id).is_absolute() and Path(model_id).name == wanted:
return model_id
return None


def _default_lmstudio_model_dirs() -> list[Path]:
dirs: list[str] = []
for key in ("LMSTUDIO_MODELS_DIR", "LMSTUDIO_MODEL_DIR", "LM_STUDIO_MODELS_DIR"):
Expand Down
5 changes: 4 additions & 1 deletion abstractcore/config/model_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ def validate_catalog(data: Any) -> List[str]:
"capabilities_key", "tags", "starter", "artifacts")
required_art = ("provider", "artifact", "quant", "download_bytes", "size_source", "verified")
allowed_row = set(required_row) | {"notes", "capabilities_override", "kv_geometry"}
allowed_art = set(required_art) | {"recommended", "options", "upstream", "note", "resident", "route"}
allowed_art = set(required_art) | {"recommended", "gated", "options", "upstream", "note", "resident", "route"}
seen: set = set()
for i, row in enumerate(rows):
where = f"rows[{i}]"
Expand Down Expand Up @@ -883,6 +883,8 @@ def validate_catalog(data: Any) -> List[str]:
errors.extend(_validate_upstream(aw, art, size))
if "note" in art and (not isinstance(art.get("note"), str) or not art.get("note")):
errors.append(f"{aw}.note must be a non-empty string")
if "gated" in art and not isinstance(art.get("gated"), bool):
errors.append(f"{aw}.gated must be a boolean")
if "resident" in art:
errors.extend(_validate_resident(aw, art.get("resident")))
if "route" in art:
Expand Down Expand Up @@ -1836,6 +1838,7 @@ def _build_artifact(
"loadable": False if unloadable_reason else (True if gguf_architecture and engine == "llamacpp" and _llamacpp_known(gguf_architecture) else None),
"unloadable_reason": unloadable_reason,
"recommended": bool(art.get("recommended")),
"gated": bool(art.get("gated")),
"verified": bool(art.get("verified")),
"cli_download": f"abstractcore models download {provider} {artifact}",
**({"inventory": _inventory_descriptor(installed, {"status": presence.status})} if installed else {}),
Expand Down
Loading
Loading