---
title: "What the model managers already on this machine hold"
method: GET
path: "/v1/models/foreign-libraries"
tags: ["Models"]
---

# What the model managers already on this machine hold

`GET /v1/models/foreign-libraries`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/models/foreign-libraries`
- Auth: HTTP bearer

Per-library report of the models an existing manager (Ollama, LM Studio, Jan, the HuggingFace cache) already holds, so a switcher can see what would come across before anything is adopted. Read-only: nothing is copied, linked or changed. Each library folds independently, so one unreadable root cannot silence the others, and "no library installed" is a successful body rather than an error.

## Response `200`

Per-library report. Returned even when no library is installed.

- object
  - `libraries` object[], required
    - `provider` string, required: Which manager the bytes were sitting in (ollama | lmstudio | jan | huggingface-cache; tolerate unknown values).
    - `displayName` string, required
    - `installed` boolean, required: Whether a root for this library was found at all
    - `modelCount` integer, required
    - `totalBytes` integer, required
    - `totalFormatted` string, required: Human-readable byte count, file style
    - `root` string: Resolved library root. Omitted when there is none; `installed` carries the presence answer.
    - `models` object[], required
      - `name` string, required
      - `sizeBytes` integer, required
      - `sizeFormatted` string, required
      - `companionCount` integer, required: Sibling files adopted with this model
      - `templateFidelity` 'embeddedInWeights' | 'ollamaTemplateOnly' | 'none', required: Whether the GGUF carries its own chat template. A model with only the foreign manager's template still adopts, but falls back to a generic chat format.
      - `modelfileAuthored` boolean, required
      - `embeddingOnly` boolean, required
      - `hasSystemPrompt` boolean, required
      - `architecture` string: From the GGUF header. Omitted when the header did not state it.
      - `quantization` string: From the GGUF header. Omitted rather than guessed when the file type is unknown.
      - `parameters` string: Parameter size label from the GGUF header, when stated.
      - `revision` string: Exact revision. Only the HuggingFace cache can answer this; omitted for every other library.
    - `skipped` object[], required: Models named rather than silently dropped, each with its reason
      - `name` string, required
      - `reason` string, required
    - `health` 'not-installed' | 'healthy' | 'no-adoptable-models' | 'unreadable', required: Four states, none of them silence. `unreadable` means the root is present and we stopped parsing it, which is what an upstream layout change looks like from the user's side.
    - `healthMessage` string, required: User-facing rendering of `health`
    - `layoutLastVerified` string, date, required: ISO-8601 date this layout was last confirmed
    - `layoutEvidence` 'live-install' | 'documented', required: What the layout was confirmed against. `documented` reports stale from the day it ships.
    - `layoutStale` boolean, required: Whether the layout is past its 90-day revalidation cadence
  - `modelCount` integer, required: Adoptable models across every library
  - `totalBytes` integer, required
  - `totalFormatted` string, required
  - `hostTuning` object[], required: OLLAMA_* host tuning read from this process's environment. Each variable is mapped or dropped, never approximated.
    - `variable` string, required
    - `value` string, required
    - `mappedTo` string: ToolPiper equivalent. Omitted when there is none.
    - `droppedReason` string: Why it was dropped. Omitted when it was mapped.
  - `adoptionDisclosure` string, required: Shared-storage consequence, stated at the decision it is about: adopted models are hardlinked, so removing one in the other manager will not free disk until it is removed here too.
  - `reversibility` string, required: The reversibility promise shown before the first adopt

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
