Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

feat(local-models): carry and display model card metadata

Dongdong Chene99974a7ee8a
diff --git a/apps/computer/local-daemon/README.md b/apps/computer/local-daemon/README.md
index 207b0bac..61aed934 100644
--- a/apps/computer/local-daemon/README.md
+++ b/apps/computer/local-daemon/README.md
@@ -141,7 +141,11 @@ model.
succeeds, so a transient failure never ends the watch.
- Snapshots. `runner.local_models` carries `library-status/v1` mapped to
`LocalModelsSnapshot` (pools gain `kind` and `gpu_index`; a value outside
- the contract's closed sets makes the read `TOOL_FAILED`). It is sent after
+ the contract's closed sets makes the read `TOOL_FAILED`). Optional model-card
+ fields (`family`, `publisher`, `architecture`, `parameters`,
+ `active_parameters`, `capabilities`, `license`, HTTPS `source_url`,
+ `prompt_tokens_per_second`) follow the same closed-set validation and
+ display-string clipping. It is sent after
every welcome, after every action or job end, and at most every 2 seconds
for progress. When a job enters a phase (download, verify, load, warm) the
Daemon rereads the status, which carries what the phase reserved or freed
diff --git a/apps/computer/local-daemon/internal/localmodels/library_test.go b/apps/computer/local-daemon/internal/localmodels/library_test.go
index cd17df31..8b9ca26e 100644
--- a/apps/computer/local-daemon/internal/localmodels/library_test.go
+++ b/apps/computer/local-daemon/internal/localmodels/library_test.go
@@ -129,7 +129,19 @@ func TestRefreshRejectsStatusOutsideTheContract(t *testing.T) {
// An Agent stores pi_model whole, so one longer than the contract is not cut.
long := model("other:Q4_K_M", "idle")
long["pi_model"] = "localmodels-library/" + strings.Repeat("x", 200)
- for _, entry := range []map[string]any{broken, long} {
+ badFamily := model("bad-family:Q4_K_M", "absent")
+ badFamily["family"] = "unknown_vendor"
+ badArch := model("bad-arch:Q4_K_M", "absent")
+ badArch["architecture"] = "ssm"
+ dupCap := model("dup-cap:Q4_K_M", "absent")
+ dupCap["capabilities"] = []string{"vision", "vision"}
+ badCap := model("bad-cap:Q4_K_M", "absent")
+ badCap["capabilities"] = []string{"audio"}
+ badURL := model("bad-url:Q4_K_M", "absent")
+ badURL["source_url"] = "http://huggingface.co/Qwen/Qwen3-4B"
+ badPromptSpeed := model("bad-speed:Q4_K_M", "loaded")
+ badPromptSpeed["prompt_tokens_per_second"] = -5.0
+ for _, entry := range []map[string]any{broken, long, badFamily, badArch, dupCap, badCap, badURL, badPromptSpeed} {
fake.write("status.json", status(entry))
snapshot := newLibrary(t, fake, &recorder{}, time.Second).Refresh(context.Background())
if snapshot.Available || snapshot.Reason.Code != CodeToolFailed || strings.Contains(snapshot.Reason.Detail, "warming") {
@@ -577,3 +589,36 @@ func TestChangeOfTheLoadedModelsAsksForRuntimeDiagnostics(t *testing.T) {
t.Fatalf("an unload asked for %d diagnostics in all, want 2", record.changes())
}
}
+
+func TestRefreshMapsRichModelCardMetadataAndKeepsItAcrossProgress(t *testing.T) {
+ fake := newFakeTool(t)
+ rich := model(testModel, "absent")
+ rich["family"] = "qwen"
+ rich["publisher"] = " Alibaba Cloud "
+ rich["architecture"] = "moe"
+ rich["parameters"] = "30B"
+ rich["active_parameters"] = "3B"
+ rich["capabilities"] = []string{"tool_use", "reasoning", "coding"}
+ rich["license"] = "Apache-2.0"
+ rich["source_url"] = "https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct"
+ rich["prompt_tokens_per_second"] = 612.5
+ fake.write("status.json", status(rich))
+ library := newLibrary(t, fake, &recorder{}, time.Second)
+ snapshot := library.Refresh(context.Background())
+ got := modelState(snapshot, testModel)
+ if got == nil || got.Family != "qwen" || got.Publisher != "Alibaba Cloud" || got.Architecture != "moe" ||
+ got.Parameters != "30B" || got.ActiveParameters != "3B" ||
+ !slices.Equal(got.Capabilities, []string{"tool_use", "reasoning", "coding"}) ||
+ got.License != "Apache-2.0" ||
+ got.SourceURL != "https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct" ||
+ got.PromptTokensPerSecond == nil || *got.PromptTokensPerSecond != 612.5 {
+ t.Fatalf("rich model = %+v", got)
+ }
+ if !applyProgress(&snapshot, libraryEvent{Event: "progress", Model: json.RawMessage(`"` + testModel + `"`), Phase: "download", Done: 512, Total: 1024, BytesPerSecond: 1024}) {
+ t.Fatal("applyProgress did not update downloading model")
+ }
+ after := modelState(snapshot, testModel)
+ if after.Family != "qwen" || after.Publisher != "Alibaba Cloud" || !slices.Equal(after.Capabilities, []string{"tool_use", "reasoning", "coding"}) {
+ t.Fatalf("progress dropped model card fields: %+v", after)
+ }
+}
diff --git a/apps/computer/local-daemon/internal/localmodels/status.go b/apps/computer/local-daemon/internal/localmodels/status.go
index c4492e53..be91b0f0 100644
--- a/apps/computer/local-daemon/internal/localmodels/status.go
+++ b/apps/computer/local-daemon/internal/localmodels/status.go
@@ -35,7 +35,16 @@ var errorCodes = []string{
"GATEWAY_REGISTRATION_FAILED", "CANCELLED",
}
-var modelIDPattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$`)
+var (
+ families = []string{"qwen", "gemma", "llama", "openai", "deepseek", "mistral", "phi", "glm", "kimi", "claude", "grok", "other"}
+ architectures = []string{"dense", "moe"}
+ capabilities = []string{"vision", "tool_use", "reasoning", "coding", "multilingual"}
+)
+
+var (
+ modelIDPattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$`)
+ sourceURLPattern = regexp.MustCompile(`^https://[A-Za-z0-9._~:/?#\[\]@!$&'()*+,;=%-]+$`)
+)
// ValidModelID reports whether id is a LocalModelId the tool may be given as
// an argument.
@@ -123,6 +132,14 @@ func mapStatus(encoded []byte, now time.Time) (wire.LocalModelsSnapshot, error)
})
}
for _, model := range status.Models {
+ model.Publisher = clip(strings.TrimSpace(model.Publisher), 120)
+ model.Parameters = clip(strings.TrimSpace(model.Parameters), 32)
+ model.ActiveParameters = clip(strings.TrimSpace(model.ActiveParameters), 32)
+ model.License = clip(strings.TrimSpace(model.License), 120)
+ model.SourceURL = strings.TrimSpace(model.SourceURL)
+ if len(model.Capabilities) == 0 {
+ model.Capabilities = nil
+ }
if err := checkModel(model); err != nil {
return wire.LocalModelsSnapshot{}, err
}
@@ -188,9 +205,26 @@ func checkModel(model wire.LocalModel) error {
if len(model.PiModel) > 200 {
return invalid("pi_model", model.PiModel)
}
- if model.TokensPerSecond != nil && (math.IsNaN(*model.TokensPerSecond) || *model.TokensPerSecond < 0) {
+ if model.TokensPerSecond != nil && (math.IsNaN(*model.TokensPerSecond) || math.IsInf(*model.TokensPerSecond, 0) || *model.TokensPerSecond < 0) {
return errors.New("model tokens_per_second is outside the contract")
}
+ if model.Family != "" && !slices.Contains(families, model.Family) {
+ return invalid("family", model.Family)
+ }
+ if model.Architecture != "" && !slices.Contains(architectures, model.Architecture) {
+ return invalid("architecture", model.Architecture)
+ }
+ for index, capability := range model.Capabilities {
+ if !slices.Contains(capabilities, capability) || slices.Contains(model.Capabilities[:index], capability) {
+ return invalid("capabilities", capability)
+ }
+ }
+ if model.SourceURL != "" && (len(model.SourceURL) > 2048 || !sourceURLPattern.MatchString(model.SourceURL)) {
+ return invalid("source_url", model.SourceURL)
+ }
+ if model.PromptTokensPerSecond != nil && (math.IsNaN(*model.PromptTokensPerSecond) || math.IsInf(*model.PromptTokensPerSecond, 0) || *model.PromptTokensPerSecond < 0) {
+ return errors.New("model prompt_tokens_per_second is outside the contract")
+ }
return nil
}
diff --git a/apps/teamhub/internal/app/handlers_local_models.go b/apps/teamhub/internal/app/handlers_local_models.go
index 5dcb6a8e..301ce472 100644
--- a/apps/teamhub/internal/app/handlers_local_models.go
+++ b/apps/teamhub/internal/app/handlers_local_models.go
@@ -21,7 +21,10 @@ import (
// an action; it stays inside the Agent management client's timeout.
const localModelActionLifetime = 10 * time.Second
-var localModelIDPattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$`)
+var (
+ localModelIDPattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$`)
+ localModelSourceURLPattern = regexp.MustCompile(`^https://[A-Za-z0-9._~:/?#\[\]@!$&'()*+,;=%-]+$`)
+)
// localModelRefusalCodes maps the Computer's refusals a Human can act on to
// their own public code; every other refusal is LOCAL_MODEL_ACTION_FAILED.
@@ -302,6 +305,25 @@ func validLocalModelsSnapshot(snapshot teamhubinternal.LocalModelsSnapshot) bool
if !localModelIDPattern.MatchString(model.Id) || seen[model.Id] || !model.State.Valid() || !model.Fit.Valid() {
return false
}
+ if model.Family != nil && !model.Family.Valid() {
+ return false
+ }
+ if model.Architecture != nil && !model.Architecture.Valid() {
+ return false
+ }
+ if model.Capabilities != nil {
+ for index, capability := range *model.Capabilities {
+ if !capability.Valid() || slices.Contains((*model.Capabilities)[:index], capability) {
+ return false
+ }
+ }
+ }
+ if model.SourceUrl != nil && (len(*model.SourceUrl) > 2048 || !localModelSourceURLPattern.MatchString(*model.SourceUrl)) {
+ return false
+ }
+ if model.PromptTokensPerSecond != nil && *model.PromptTokensPerSecond < 0 {
+ return false
+ }
seen[model.Id] = true
}
return true
diff --git a/apps/teamhub/internal/app/handlers_local_models_test.go b/apps/teamhub/internal/app/handlers_local_models_test.go
index a563969b..690b750b 100644
--- a/apps/teamhub/internal/app/handlers_local_models_test.go
+++ b/apps/teamhub/internal/app/handlers_local_models_test.go
@@ -2,6 +2,7 @@ package app
import (
"encoding/json"
+ "slices"
"testing"
"time"
@@ -15,7 +16,10 @@ const storedLocalModelsSnapshotJSON = `{"available":true,"observed_at":"2026-11-
"models":[
{"id":"qwen3-4b:Q4_K_M","name":"Qwen3 4B","description":"","quant":"Q4_K_M","context_tokens":32768,"vision":false,
"download_bytes":10,"memory_bytes":40,"fit":"gpu","recommended":false,"availability":{"downloadable":true},
- "pool":"gpu:0","state":"loaded","endpoint":{"base_url":"http://127.0.0.1:18100/v1"},"pi_model":"localmodels-library/localmodels-lib-qwen3-8-27b-iq3s-ud-iq3-s/Qwen3.8-27B-UD-IQ3_S"},
+ "pool":"gpu:0","state":"loaded","endpoint":{"base_url":"http://127.0.0.1:18100/v1"},"pi_model":"localmodels-library/localmodels-lib-qwen3-8-27b-iq3s-ud-iq3-s/Qwen3.8-27B-UD-IQ3_S",
+ "family":"qwen","publisher":"Alibaba Cloud","architecture":"moe","parameters":"30B","active_parameters":"3B",
+ "capabilities":["tool_use","reasoning","coding"],"license":"Apache-2.0",
+ "source_url":"https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct","prompt_tokens_per_second":612.5},
{"id":"quick-install:Q4","name":"Quick Install","description":"","quant":"Q4","context_tokens":8192,"vision":false,
"download_bytes":10,"memory_bytes":30,"fit":"gpu","recommended":false,"availability":{"downloadable":true},
"pool":"gpu:0","state":"loaded","endpoint":{"base_url":"http://127.0.0.1:18101/v1"},"pi_model":"localmodels/localmodels-agent"},
@@ -60,6 +64,18 @@ func TestLocalModelsViewMatchesAgentsToModelsOnTheComputer(t *testing.T) {
if users := view.Models[0].UsedBy; len(users) != 1 || users[0].AgentId != "agent_1" || users[0].Name != "Ada" {
t.Fatalf("loaded model users=%+v", users)
}
+ first := view.Models[0].Model
+ if first.Family == nil || *first.Family != httpapi.LocalModelFamilyQwen ||
+ first.Publisher == nil || *first.Publisher != "Alibaba Cloud" ||
+ first.Architecture == nil || *first.Architecture != httpapi.LocalModelArchitectureMoe ||
+ first.Parameters == nil || *first.Parameters != "30B" ||
+ first.ActiveParameters == nil || *first.ActiveParameters != "3B" ||
+ first.Capabilities == nil || !slices.Equal(*first.Capabilities, []httpapi.LocalModelCapability{httpapi.LocalModelCapabilityToolUse, httpapi.LocalModelCapabilityReasoning, httpapi.LocalModelCapabilityCoding}) ||
+ first.License == nil || *first.License != "Apache-2.0" ||
+ first.SourceUrl == nil || *first.SourceUrl != "https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct" ||
+ first.PromptTokensPerSecond == nil || *first.PromptTokensPerSecond != 612.5 {
+ t.Fatalf("rich model fields=%+v", first)
+ }
if users := view.Models[1].UsedBy; len(users) != 1 || users[0].AgentId != "agent_2" {
t.Fatalf("Quick Install model users=%+v", users)
}
@@ -143,6 +159,30 @@ func TestValidLocalModelsSnapshot(t *testing.T) {
"unknown unavailable code": func(s *teamhubinternal.LocalModelsSnapshot) {
s.Available, s.Reason = false, &teamhubinternal.LocalModelsUnavailableReason{Code: "X"}
},
+ "unknown family": func(s *teamhubinternal.LocalModelsSnapshot) {
+ f := teamhubinternal.LocalModelFamily("unknown")
+ s.Models[0].Family = &f
+ },
+ "unknown architecture": func(s *teamhubinternal.LocalModelsSnapshot) {
+ a := teamhubinternal.LocalModelArchitecture("ssm")
+ s.Models[0].Architecture = &a
+ },
+ "unknown capability": func(s *teamhubinternal.LocalModelsSnapshot) {
+ c := []teamhubinternal.LocalModelCapability{"audio"}
+ s.Models[0].Capabilities = &c
+ },
+ "duplicate capability": func(s *teamhubinternal.LocalModelsSnapshot) {
+ c := []teamhubinternal.LocalModelCapability{teamhubinternal.LocalModelCapabilityVision, teamhubinternal.LocalModelCapabilityVision}
+ s.Models[0].Capabilities = &c
+ },
+ "non-https source_url": func(s *teamhubinternal.LocalModelsSnapshot) {
+ u := "http://huggingface.co/Qwen/Qwen3-4B"
+ s.Models[0].SourceUrl = &u
+ },
+ "negative prompt_tokens_per_second": func(s *teamhubinternal.LocalModelsSnapshot) {
+ p := float32(-1)
+ s.Models[0].PromptTokensPerSecond = &p
+ },
} {
var copied teamhubinternal.LocalModelsSnapshot
if err := json.Unmarshal([]byte(storedLocalModelsSnapshotJSON), &copied); err != nil {
diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.md
index 5af5f5d8..672a9c2f 100644
--- a/apps/web/AGENTS.md
+++ b/apps/web/AGENTS.md
@@ -22,8 +22,11 @@ build:assets` to check the initial JS budget.
- `src/features/local-models`: Settings › Local models (`settings/local-models?computer=<id>`),
one Computer's model library as TeamHub last stored it. The Computer decides
fit, availability, placement, the recommendation and memory; the page only
- orders and labels them, picks the Make room default, and maps every code to
- English in `local-models-copy.ts`. Without `?computer=` the desktop app opens
+ orders and labels them, picks the Make room default, renders family icons,
+ capability/parameter badges, download speed/ETA and model-card facts from
+ structured `LocalModel` fields in `local-models-rules.ts`, and maps every
+ code and enum label to English in `local-models-copy.ts`. Without `?computer=`
+ the desktop app opens
its own Computer. Only the Computer's owner can act; actions return at once
and progress arrives as `local-models` invalidation hints. A Computer's
detail on the Computers page links here and reads no model state itself.
diff --git a/apps/web/src/features/local-models/local-model-details.tsx b/apps/web/src/features/local-models/local-model-details.tsx
index 27fdba1b..99a7ca8c 100644
--- a/apps/web/src/features/local-models/local-model-details.tsx
+++ b/apps/web/src/features/local-models/local-model-details.tsx
@@ -1,5 +1,9 @@
import { useState, type ReactNode } from "react";
-import { Copy01Icon, Tick02Icon } from "@hugeicons/core-free-icons";
+import {
+ Copy01Icon,
+ LinkSquare02Icon,
+ Tick02Icon,
+} from "@hugeicons/core-free-icons";
import { Button } from "@/components/ui/button";
import { Icon } from "@/components/ui/icon";
@@ -7,6 +11,7 @@ import { ModalDialog } from "@/components/ui/modal-dialog";
import { cn } from "@/lib/cn";
import {
+ capabilityCopy,
modelErrorCopy,
modelNoteCopy,
unavailableCopy,
@@ -16,10 +21,15 @@ import {
agentNames,
contextLabel,
formatGigabytes,
+ modelCapabilities,
+ modelSourceLabel,
+ parametersLabel,
placeName,
poolFreeBytes,
poolLabel,
poolOf,
+ safeModelSourceUrl,
+ speedLabel,
type ModelEntry,
} from "./local-models-rules";
@@ -71,8 +81,30 @@ export function ModelFacts({
const pool = poolOf(view, model.pool);
const plannedPlace =
status === "available" ? placeName(view, model.pool) : undefined;
+ const capabilities = modelCapabilities(model);
+ const parameters = parametersLabel(model);
+ const speed = speedLabel(model);
+ const sourceUrl = safeModelSourceUrl(model.source_url);
return (
<div className="divide-y divide-border">
+ {model.publisher ? (
+ <Fact label="Publisher">{model.publisher}</Fact>
+ ) : null}
+ {parameters ? <Fact label="Parameters">{parameters}</Fact> : null}
+ {capabilities.length ? (
+ <Fact label="Capabilities">
+ <span className="flex flex-wrap gap-1.5">
+ {capabilities.map((capability) => (
+ <span
+ className="rounded-full bg-muted px-2 py-0.5 text-xs text-secondary-foreground"
+ key={capability}
+ >
+ {capabilityCopy(capability)}
+ </span>
+ ))}
+ </span>
+ </Fact>
+ ) : null}
<Fact label="Version">{model.quant}</Fact>
<Fact label="Memory">
{formatGigabytes(model.memory_bytes)}
@@ -86,9 +118,19 @@ export function ModelFacts({
{formatGigabytes(model.download_bytes)}
</Fact>
<Fact label="Context">{contextLabel(model.context_tokens)}</Fact>
- {model.tokens_per_second ? (
- <Fact label="Speed">
- {Math.round(model.tokens_per_second)} tokens/s
+ {speed ? <Fact label="Speed">{speed}</Fact> : null}
+ {model.license ? <Fact label="License">{model.license}</Fact> : null}
+ {sourceUrl ? (
+ <Fact label="Source">
+ <a
+ className="inline-flex max-w-full items-center gap-1 text-foreground underline underline-offset-2"
+ href={sourceUrl}
+ rel="noopener noreferrer"
+ target="_blank"
+ >
+ <span className="truncate">{modelSourceLabel(sourceUrl)}</span>
+ <Icon className="shrink-0" icon={LinkSquare02Icon} size={14} />
+ </a>
</Fact>
) : null}
{onComputer ? (
diff --git a/apps/web/src/features/local-models/local-model-row.tsx b/apps/web/src/features/local-models/local-model-row.tsx
index 3abcaf9e..fe108714 100644
--- a/apps/web/src/features/local-models/local-model-row.tsx
+++ b/apps/web/src/features/local-models/local-model-row.tsx
@@ -1,21 +1,55 @@
-import { AiChipIcon, ArrowDown01Icon } from "@hugeicons/core-free-icons";
+import {
+ AiChipIcon,
+ ArrowDown01Icon,
+ ChatGptIcon,
+ ClaudeIcon,
+ DeepseekIcon,
+ GoogleGeminiIcon,
+ GrokIcon,
+ KimiAiIcon,
+ MetaIcon,
+ MicrosoftIcon,
+ MistralIcon,
+ QwenIcon,
+} from "@hugeicons/core-free-icons";
import { useId, type MouseEvent } from "react";
import { Button } from "@/components/ui/button";
-import { Icon } from "@/components/ui/icon";
+import { Icon, type IconSvgElement } from "@/components/ui/icon";
import { cn } from "@/lib/cn";
import { ModelFacts } from "./local-model-details";
import { unavailableShortCopy } from "./local-models-copy";
-import type { LocalModelsView } from "./local-models-queries";
+import type { LocalModel, LocalModelsView } from "./local-models-queries";
import {
downloadPercent,
+ downloadStatusDetail,
formatGigabytes,
placeName,
+ rowBadges,
type ModelEntry,
type ModelStatus,
} from "./local-models-rules";
+const familyIcons: Record<NonNullable<LocalModel["family"]>, IconSvgElement> = {
+ claude: ClaudeIcon,
+ deepseek: DeepseekIcon,
+ gemma: GoogleGeminiIcon,
+ glm: AiChipIcon,
+ grok: GrokIcon,
+ kimi: KimiAiIcon,
+ llama: MetaIcon,
+ mistral: MistralIcon,
+ openai: ChatGptIcon,
+ other: AiChipIcon,
+ phi: MicrosoftIcon,
+ qwen: QwenIcon,
+};
+
+function familyIcon(family: LocalModel["family"]) {
+ return family ? familyIcons[family] : AiChipIcon;
+}
+
/**
* The status word every row shows under its name, with the dot that colors
* it. Models not on the Computer carry no dot, like an unconnected Connector.
@@ -73,14 +107,14 @@ export function ModelRow({
const tag = statusTags[status];
const progress = downloadPercent(model);
const download = formatGigabytes(model.download_bytes);
+ const badges = rowBadges(model);
const detail = {
available: model.recommended
? `${download} · Recommended`
: model.fit === "system"
? `${download} · runs slower`
: download,
- downloading:
- model.download?.step === "verify" ? "checking file" : `${progress}%`,
+ downloading: downloadStatusDetail(model),
failed: null,
idle: model.note ? "no room to load yet" : null,
loaded: [
@@ -126,8 +160,11 @@ export function ModelRow({
onClick={handlers.onToggle}
type="button"
>
- <span className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-card text-foreground shadow-outline">
- <Icon icon={AiChipIcon} size={20} />
+ <span
+ className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-card text-foreground shadow-outline"
+ data-family={model.family ?? "other"}
+ >
+ <Icon icon={familyIcon(model.family)} size={20} />
</span>
<span className="min-w-0 flex-1">
<span className="block truncate text-sm font-medium text-foreground">
@@ -151,6 +188,18 @@ export function ModelRow({
</span>
</span>
</button>
+ {badges.length ? (
+ <span className="flex shrink-0 items-center gap-1.5">
+ {badges.map((badge) => (
+ <span
+ className="rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground"
+ key={badge}
+ >
+ {badge}
+ </span>
+ ))}
+ </span>
+ ) : null}
{action ? (
<Button
aria-label={`${action[0]} ${model.name}`}
diff --git a/apps/web/src/features/local-models/local-models-copy.ts b/apps/web/src/features/local-models/local-models-copy.ts
index 802bf7f3..6080c3b7 100644
--- a/apps/web/src/features/local-models/local-models-copy.ts
+++ b/apps/web/src/features/local-models/local-models-copy.ts
@@ -154,3 +154,28 @@ export function libraryUnavailableCopy(
const copy = libraryUnavailable[code ?? "NOT_REPORTED"];
return { body: copy.body, title: copy.title(computer) };
}
+
+const capabilityLabels: Record<Schemas["LocalModelCapability"], string> = {
+ coding: "Coding",
+ multilingual: "Multilingual",
+ reasoning: "Reasoning",
+ tool_use: "Tool use",
+ vision: "Vision",
+};
+
+/** Human-readable badge label for a verified model capability. */
+export function capabilityCopy(capability: Schemas["LocalModelCapability"]) {
+ return capabilityLabels[capability];
+}
+
+const architectureLabels: Record<Schemas["LocalModelArchitecture"], string> = {
+ dense: "Dense",
+ moe: "MoE",
+};
+
+/** Human-readable architecture label for display in model details. */
+export function architectureCopy(
+ architecture: Schemas["LocalModelArchitecture"],
+) {
+ return architectureLabels[architecture];
+}
diff --git a/apps/web/src/features/local-models/local-models-page.test.tsx b/apps/web/src/features/local-models/local-models-page.test.tsx
index 0ee8fab5..63ff9c21 100644
--- a/apps/web/src/features/local-models/local-models-page.test.tsx
+++ b/apps/web/src/features/local-models/local-models-page.test.tsx
@@ -812,4 +812,78 @@ describe("LocalModelsPage", () => {
expect(statuses()[0]).toBe("GPT-OSS 20B: Loaded · Memory · 14.3 GB"),
);
});
+
+ it("shows rich model card icons, capability badges, and expanded metadata", async () => {
+ const richLab = withModel(labView(), "qwen3-coder-30b:Q4_K_M", {
+ active_parameters: "3B",
+ architecture: "moe",
+ capabilities: ["coding", "tool_use", "reasoning"],
+ family: "qwen",
+ license: "Apache-2.0",
+ parameters: "30B",
+ prompt_tokens_per_second: 612.5,
+ publisher: "Alibaba Cloud",
+ source_url: "https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct",
+ });
+ const visionLab = withModel(richLab, "gemma3-4b:Q4_K_M", {
+ family: "gemma",
+ vision: true,
+ });
+ renderPage(setup([visionLab]));
+ await findModels();
+
+ const coderCard = card("Qwen3 Coder 30B");
+ expect(coderCard.querySelector('[data-family="qwen"]')).toBeInTheDocument();
+ expect(within(coderCard).getByText("3B active")).toBeVisible();
+ expect(within(coderCard).getByText("Tool use")).toBeVisible();
+ expect(within(coderCard).getByText("Reasoning")).toBeVisible();
+ expect(within(coderCard).getByText("+1")).toBeVisible();
+
+ const gemmaCard = card("Gemma 3 4B");
+ expect(
+ gemmaCard.querySelector('[data-family="gemma"]'),
+ ).toBeInTheDocument();
+ expect(within(gemmaCard).getByText("Vision")).toBeVisible();
+
+ fireEvent.click(screen.getByRole("button", { name: "Qwen3 Coder 30B" }));
+ const details = screen.getByRole("region", {
+ name: "Qwen3 Coder 30B details",
+ });
+ expect(details).toHaveTextContent("PublisherAlibaba Cloud");
+ expect(details).toHaveTextContent("Parameters30B · 3B active (MoE)");
+ expect(details).toHaveTextContent("Coding");
+ expect(details).toHaveTextContent("46 tokens/s · 613 prompt tokens/s");
+ expect(details).toHaveTextContent("LicenseApache-2.0");
+ const link = within(details).getByRole("link", {
+ name: "huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct",
+ });
+ expect(link).toHaveAttribute(
+ "href",
+ "https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct",
+ );
+ expect(link).toHaveAttribute("target", "_blank");
+ expect(link).toHaveAttribute("rel", "noopener noreferrer");
+ });
+
+ it("shows live download rate and ETA when bytes_per_second is reported", async () => {
+ const mb = 1024 * 1024;
+ renderPage(
+ setup([
+ withModel(labView(), "gpt-oss-20b:Q4_K_M", {
+ download: {
+ bytes_per_second: 50 * mb,
+ done_bytes: 5_000 * mb,
+ step: "download",
+ total_bytes: 20_000 * mb,
+ },
+ state: "downloading",
+ }),
+ ]),
+ );
+ await findModels();
+
+ expect(statuses()).toContain(
+ "GPT-OSS 20B: Downloading · 25% · 50 MB/s · 5m left",
+ );
+ });
});
diff --git a/apps/web/src/features/local-models/local-models-rules.test.ts b/apps/web/src/features/local-models/local-models-rules.test.ts
index a46efedd..0fe272e0 100644
--- a/apps/web/src/features/local-models/local-models-rules.test.ts
+++ b/apps/web/src/features/local-models/local-models-rules.test.ts
@@ -2,14 +2,21 @@ import { describe, expect, it } from "vitest";
import {
downloadPercent,
+ downloadStatusDetail,
formatGigabytes,
loadCheck,
makeRoomSelection,
makesRoom,
memorySummary,
+ modelCapabilities,
modelEntries,
+ modelSourceLabel,
+ parametersLabel,
placeName,
poolLabel,
+ rowBadges,
+ safeModelSourceUrl,
+ speedLabel,
} from "./local-models-rules";
import {
gb,
@@ -146,4 +153,98 @@ describe("local models rules", () => {
).toBe(33);
expect(downloadPercent(localModel({ id: "m", name: "m" }))).toBe(0);
});
+
+ it("unites legacy vision with structured capabilities in display order", () => {
+ expect(
+ modelCapabilities(
+ localModel({
+ capabilities: ["coding", "vision", "tool_use"],
+ id: "m",
+ name: "m",
+ vision: true,
+ }),
+ ),
+ ).toEqual(["vision", "tool_use", "coding"]);
+ expect(
+ modelCapabilities(localModel({ id: "m", name: "m", vision: true })),
+ ).toEqual(["vision"]);
+ });
+
+ it("formats parameter scale, architecture, and collapsed row badges", () => {
+ const moe = localModel({
+ active_parameters: "3B",
+ architecture: "moe",
+ capabilities: ["coding", "reasoning", "tool_use", "vision"],
+ id: "qwen3-coder-30b:Q4_K_M",
+ name: "Qwen3 Coder 30B",
+ parameters: "30B",
+ vision: true,
+ });
+ expect(parametersLabel(moe)).toBe("30B · 3B active (MoE)");
+ expect(rowBadges(moe)).toEqual(["3B active", "Vision", "Tool use", "+2"]);
+
+ const dense = localModel({
+ architecture: "dense",
+ capabilities: ["tool_use"],
+ id: "qwen3-4b:Q4_K_M",
+ name: "Qwen3 4B",
+ parameters: "4B",
+ });
+ expect(parametersLabel(dense)).toBe("4B (Dense)");
+ // Avoid repeating "4B" next to a model whose title already includes it.
+ expect(rowBadges(dense)).toEqual(["Tool use"]);
+
+ expect(
+ rowBadges(
+ localModel({
+ id: "llama3.3:Q4_K_M",
+ name: "Llama 3.3",
+ parameters: "70B",
+ }),
+ ),
+ ).toEqual(["70B"]);
+ });
+
+ it("formats live download speed, ETA, prompt speed, and safe source URLs", () => {
+ const mb = 1024 * 1024;
+ expect(
+ downloadStatusDetail(
+ localModel({
+ download: {
+ bytes_per_second: 50 * mb,
+ done_bytes: 5_000 * mb,
+ step: "download",
+ total_bytes: 20_000 * mb,
+ },
+ id: "m",
+ name: "m",
+ state: "downloading",
+ }),
+ ),
+ ).toBe("25% · 50 MB/s · 5m left");
+ expect(
+ downloadStatusDetail(
+ localModel({
+ download: { done_bytes: 100, step: "verify", total_bytes: 100 },
+ id: "m",
+ name: "m",
+ state: "downloading",
+ }),
+ ),
+ ).toBe("checking file");
+ expect(
+ speedLabel(
+ localModel({
+ id: "m",
+ name: "m",
+ prompt_tokens_per_second: 612.4,
+ tokens_per_second: 46.2,
+ }),
+ ),
+ ).toBe("46 tokens/s · 612 prompt tokens/s");
+ expect(safeModelSourceUrl("http://example.com/model")).toBeUndefined();
+ const safe = safeModelSourceUrl("https://huggingface.co/Qwen/Qwen3-4B/");
+ expect(safe).toBe("https://huggingface.co/Qwen/Qwen3-4B/");
+ expect(modelSourceLabel(safe!)).toBe("huggingface.co/Qwen/Qwen3-4B");
+ });
});
diff --git a/apps/web/src/features/local-models/local-models-rules.ts b/apps/web/src/features/local-models/local-models-rules.ts
index d5932103..b560ffd2 100644
--- a/apps/web/src/features/local-models/local-models-rules.ts
+++ b/apps/web/src/features/local-models/local-models-rules.ts
@@ -1,3 +1,6 @@
+import { formatBytes } from "@/lib/format-bytes";
+
+import { architectureCopy, capabilityCopy } from "./local-models-copy";
import type {
LocalModel,
LocalModelPool,
@@ -199,3 +202,112 @@ export function contextLabel(tokens: number) {
export function agentNames(entry: Pick<LocalModelView, "used_by">) {
return entry.used_by.map((user) => user.name).join(", ");
}
+
+export type LocalModelCapability = NonNullable<
+ LocalModel["capabilities"]
+>[number];
+
+export const capabilityOrder: readonly LocalModelCapability[] = [
+ "vision",
+ "tool_use",
+ "reasoning",
+ "coding",
+ "multilingual",
+];
+
+/** Ordered capabilities of a model, uniting `capabilities` with legacy `vision`. */
+export function modelCapabilities(model: LocalModel): LocalModelCapability[] {
+ const present = new Set<LocalModelCapability>(model.capabilities ?? []);
+ if (model.vision) present.add("vision");
+ return capabilityOrder.filter((capability) => present.has(capability));
+}
+
+/** Parameter scale and activation topology for details: "30B · 3B active (MoE)". */
+export function parametersLabel(model: LocalModel) {
+ const scale = [
+ model.parameters,
+ model.active_parameters ? `${model.active_parameters} active` : undefined,
+ ]
+ .filter(Boolean)
+ .join(" · ");
+ const arch = model.architecture
+ ? architectureCopy(model.architecture)
+ : undefined;
+ if (scale && arch) return `${scale} (${arch})`;
+ return scale || arch;
+}
+
+/** Concise badges for the collapsed row: parameter scale (when distinct) and capabilities. */
+export function rowBadges(model: LocalModel): string[] {
+ const badges: string[] = [];
+ if (model.active_parameters) {
+ badges.push(`${model.active_parameters} active`);
+ } else if (
+ model.parameters &&
+ !model.name.toLowerCase().includes(model.parameters.toLowerCase())
+ ) {
+ badges.push(model.parameters);
+ }
+ for (const capability of modelCapabilities(model)) {
+ badges.push(capabilityCopy(capability));
+ }
+ if (badges.length > 3) {
+ return [...badges.slice(0, 3), `+${badges.length - 3}`];
+ }
+ return badges;
+}
+
+function formatRemainingTime(seconds: number) {
+ if (seconds < 60) return `${seconds}s left`;
+ if (seconds < 3600) return `${Math.ceil(seconds / 60)}m left`;
+ const hours = Math.floor(seconds / 3600);
+ const minutes = Math.ceil((seconds % 3600) / 60);
+ if (minutes >= 60) return `${hours + 1}h left`;
+ return minutes > 0 ? `${hours}h ${minutes}m left` : `${hours}h left`;
+}
+
+/** Live download progress summary: "checking file", or "25% · 50 MB/s · 5m left". */
+export function downloadStatusDetail(model: LocalModel) {
+ const download = model.download;
+ if (download?.step === "verify") return "checking file";
+ const parts = [`${downloadPercent(model)}%`];
+ if (download?.bytes_per_second && download.bytes_per_second > 0) {
+ parts.push(`${formatBytes(download.bytes_per_second)}/s`);
+ const remaining = download.total_bytes - download.done_bytes;
+ if (remaining > 0) {
+ parts.push(
+ formatRemainingTime(Math.ceil(remaining / download.bytes_per_second)),
+ );
+ }
+ }
+ return parts.join(" · ");
+}
+
+/** Measured generation and prompt-processing throughput for model details. */
+export function speedLabel(model: LocalModel) {
+ const parts: string[] = [];
+ if (model.tokens_per_second && model.tokens_per_second > 0) {
+ parts.push(`${Math.round(model.tokens_per_second)} tokens/s`);
+ }
+ if (model.prompt_tokens_per_second && model.prompt_tokens_per_second > 0) {
+ parts.push(`${Math.round(model.prompt_tokens_per_second)} prompt tokens/s`);
+ }
+ return parts.length ? parts.join(" · ") : undefined;
+}
+
+/** Returns `url` only when it parses as an `https:` URL. */
+export function safeModelSourceUrl(url: string | undefined) {
+ if (!url) return undefined;
+ try {
+ const parsed = new URL(url);
+ return parsed.protocol === "https:" ? parsed.href : undefined;
+ } catch {
+ return undefined;
+ }
+}
+
+/** Compact display label for a validated `https:` model card URL. */
+export function modelSourceLabel(url: string) {
+ const parsed = new URL(url);
+ return `${parsed.host}${parsed.pathname.replace(/\/+$/, "")}`;
+}
diff --git a/contracts/README.md b/contracts/README.md
index 662fdc3a..96dc419f 100644
--- a/contracts/README.md
+++ b/contracts/README.md
@@ -97,7 +97,10 @@ Progress and outcomes travel back only as snapshots:
from `localmodels.library-status/v1`: after `runner.hello`, after every
library change, and at most every 2 seconds while a download or load runs.
A Computer without the tool reports `available: false` with
- `TOOL_NOT_INSTALLED`.
+ `TOOL_NOT_INSTALLED`. Each `LocalModel` may also carry optional model-card
+ metadata (`family`, `publisher`, `architecture`, `parameters`,
+ `active_parameters`, `capabilities`, `license`, `source_url`,
+ `prompt_tokens_per_second`).
2. Agent Service records it through TeamHub `recordAgentRuntimeLocalModels`
(`POST /v0/agent-runtime/local-computers/local-models`). TeamHub keeps the
latest snapshot per Computer, so an offline Computer shows what it last
diff --git a/contracts/generated/go/runnergateway/wire.gen.go b/contracts/generated/go/runnergateway/wire.gen.go
index e46b82a8..19ef9012 100644
--- a/contracts/generated/go/runnergateway/wire.gen.go
+++ b/contracts/generated/go/runnergateway/wire.gen.go
@@ -1157,25 +1157,34 @@ func (LocalModelNote) RequiredFields() []string { return []string{"code"} }
// LocalModel mirrors the LocalModel schema shape.
type LocalModel struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Description string `json:"description"`
- Quant string `json:"quant"`
- ContextTokens uint64 `json:"context_tokens"`
- Vision bool `json:"vision"`
- DownloadBytes uint64 `json:"download_bytes"`
- MemoryBytes uint64 `json:"memory_bytes"`
- Fit string `json:"fit"`
- Recommended bool `json:"recommended"`
- Availability LocalModelAvailability `json:"availability"`
- Pool string `json:"pool,omitempty"`
- State string `json:"state"`
- Download *LocalModelDownloadProgress `json:"download,omitempty"`
- Endpoint *LocalModelEndpoint `json:"endpoint,omitempty"`
- PiModel string `json:"pi_model,omitempty"`
- TokensPerSecond *float64 `json:"tokens_per_second,omitempty"`
- Error *LocalModelError `json:"error,omitempty"`
- Note *LocalModelNote `json:"note,omitempty"`
+ ID string `json:"id"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ Quant string `json:"quant"`
+ ContextTokens uint64 `json:"context_tokens"`
+ Vision bool `json:"vision"`
+ DownloadBytes uint64 `json:"download_bytes"`
+ MemoryBytes uint64 `json:"memory_bytes"`
+ Fit string `json:"fit"`
+ Recommended bool `json:"recommended"`
+ Availability LocalModelAvailability `json:"availability"`
+ Pool string `json:"pool,omitempty"`
+ State string `json:"state"`
+ Download *LocalModelDownloadProgress `json:"download,omitempty"`
+ Endpoint *LocalModelEndpoint `json:"endpoint,omitempty"`
+ PiModel string `json:"pi_model,omitempty"`
+ TokensPerSecond *float64 `json:"tokens_per_second,omitempty"`
+ Error *LocalModelError `json:"error,omitempty"`
+ Note *LocalModelNote `json:"note,omitempty"`
+ Family string `json:"family,omitempty"`
+ Publisher string `json:"publisher,omitempty"`
+ Architecture string `json:"architecture,omitempty"`
+ Parameters string `json:"parameters,omitempty"`
+ ActiveParameters string `json:"active_parameters,omitempty"`
+ Capabilities []string `json:"capabilities,omitempty"`
+ License string `json:"license,omitempty"`
+ SourceURL string `json:"source_url,omitempty"`
+ PromptTokensPerSecond *float64 `json:"prompt_tokens_per_second,omitempty"`
}
// FixedFields lists the keys whose value the schema fixes for a LocalModel.
diff --git a/contracts/generated/go/teamhubinternal/openapi.gen.go b/contracts/generated/go/teamhubinternal/openapi.gen.go
index 79c63eed..39d6348d 100644
--- a/contracts/generated/go/teamhubinternal/openapi.gen.go
+++ b/contracts/generated/go/teamhubinternal/openapi.gen.go
@@ -752,6 +752,24 @@ func (e FinishAgentLocalRunRequestTerminalType) Valid() bool {
}
}
+// Defines values for LocalModelArchitecture.
+const (
+ LocalModelArchitectureDense LocalModelArchitecture = "dense"
+ LocalModelArchitectureMoe LocalModelArchitecture = "moe"
+)
+
+// Valid indicates whether the value is a known member of the LocalModelArchitecture enum.
+func (e LocalModelArchitecture) Valid() bool {
+ switch e {
+ case LocalModelArchitectureDense:
+ return true
+ case LocalModelArchitectureMoe:
+ return true
+ default:
+ return false
+ }
+}
+
// Defines values for LocalModelAvailabilityReasonCode.
const (
LocalModelAvailabilityDiskInsufficient LocalModelAvailabilityReasonCode = "DISK_INSUFFICIENT"
@@ -773,6 +791,33 @@ func (e LocalModelAvailabilityReasonCode) Valid() bool {
}
}
+// Defines values for LocalModelCapability.
+const (
+ LocalModelCapabilityCoding LocalModelCapability = "coding"
+ LocalModelCapabilityMultilingual LocalModelCapability = "multilingual"
+ LocalModelCapabilityReasoning LocalModelCapability = "reasoning"
+ LocalModelCapabilityToolUse LocalModelCapability = "tool_use"
+ LocalModelCapabilityVision LocalModelCapability = "vision"
+)
+
+// Valid indicates whether the value is a known member of the LocalModelCapability enum.
+func (e LocalModelCapability) Valid() bool {
+ switch e {
+ case LocalModelCapabilityCoding:
+ return true
+ case LocalModelCapabilityMultilingual:
+ return true
+ case LocalModelCapabilityReasoning:
+ return true
+ case LocalModelCapabilityToolUse:
+ return true
+ case LocalModelCapabilityVision:
+ return true
+ default:
+ return false
+ }
+}
+
// Defines values for LocalModelDownloadProgressStep.
const (
LocalModelDownloadStepDownload LocalModelDownloadProgressStep = "download"
@@ -851,6 +896,54 @@ func (e LocalModelErrorCode) Valid() bool {
}
}
+// Defines values for LocalModelFamily.
+const (
+ LocalModelFamilyClaude LocalModelFamily = "claude"
+ LocalModelFamilyDeepseek LocalModelFamily = "deepseek"
+ LocalModelFamilyGemma LocalModelFamily = "gemma"
+ LocalModelFamilyGlm LocalModelFamily = "glm"
+ LocalModelFamilyGrok LocalModelFamily = "grok"
+ LocalModelFamilyKimi LocalModelFamily = "kimi"
+ LocalModelFamilyLlama LocalModelFamily = "llama"
+ LocalModelFamilyMistral LocalModelFamily = "mistral"
+ LocalModelFamilyOpenai LocalModelFamily = "openai"
+ LocalModelFamilyOther LocalModelFamily = "other"
+ LocalModelFamilyPhi LocalModelFamily = "phi"
+ LocalModelFamilyQwen LocalModelFamily = "qwen"
+)
+
+// Valid indicates whether the value is a known member of the LocalModelFamily enum.
+func (e LocalModelFamily) Valid() bool {
+ switch e {
+ case LocalModelFamilyClaude:
+ return true
+ case LocalModelFamilyDeepseek:
+ return true
+ case LocalModelFamilyGemma:
+ return true
+ case LocalModelFamilyGlm:
+ return true
+ case LocalModelFamilyGrok:
+ return true
+ case LocalModelFamilyKimi:
+ return true
+ case LocalModelFamilyLlama:
+ return true
+ case LocalModelFamilyMistral:
+ return true
+ case LocalModelFamilyOpenai:
+ return true
+ case LocalModelFamilyOther:
+ return true
+ case LocalModelFamilyPhi:
+ return true
+ case LocalModelFamilyQwen:
+ return true
+ default:
+ return false
+ }
+}
+
// Defines values for LocalModelFit.
const (
LocalModelFitGpu LocalModelFit = "gpu"
@@ -3017,7 +3110,15 @@ type ListRecentlyUsedAgentRuntimeContextsResult struct {
// LocalModel One validated chat model of the catalog on this platform and its state on this Computer. Sizes are bytes; readers format them.
type LocalModel struct {
- Availability LocalModelAvailability `json:"availability"`
+ // ActiveParameters Parameters active per token on an moe model, such as 3B.
+ ActiveParameters *string `json:"active_parameters,omitempty"`
+
+ // Architecture Weight activation topology: dense activates all parameters per token; moe activates a subset.
+ Architecture *LocalModelArchitecture `json:"architecture,omitempty"`
+ Availability LocalModelAvailability `json:"availability"`
+
+ // Capabilities Capabilities verified by localmodels on this platform.
+ Capabilities *[]LocalModelCapability `json:"capabilities,omitempty"`
ContextTokens int64 `json:"context_tokens"`
Description string `json:"description"`
Download *LocalModelDownloadProgress `json:"download,omitempty"`
@@ -3025,27 +3126,45 @@ type LocalModel struct {
Endpoint *LocalModelEndpoint `json:"endpoint,omitempty"`
Error *LocalModelError `json:"error,omitempty"`
+ // Family Model family for brand presentation; never inferred from name.
+ Family *LocalModelFamily `json:"family,omitempty"`
+
// Fit Where the model can live, judged on total capacity so it stays stable across loads. system means localmodels can run it from RAM, slower.
Fit LocalModelFit `json:"fit"`
// Id Stable localmodels library id: catalog id and variant, such as qwen3-4b:Q4_K_M.
Id LocalModelId `json:"id"`
+ // License SPDX identifier or license name, such as Apache-2.0 or Gemma Terms of Use.
+ License *string `json:"license,omitempty"`
+
// MemoryBytes Footprint when loaded at its context policy, from the localmodels estimator.
MemoryBytes int64 `json:"memory_bytes"`
Name string `json:"name"`
Note *LocalModelNote `json:"note,omitempty"`
+ // Parameters Total parameter scale for display, such as 30B or 4B.
+ Parameters *string `json:"parameters,omitempty"`
+
// PiModel The runtime_model an Agent on runtime pi stores for this model, <pi provider>/<pi model id>; present while the model is on the Computer.
PiModel *string `json:"pi_model,omitempty"`
// Pool A place a model can live: gpu:<index>, system (RAM beside GPUs), or unified (RAM of a host without discrete GPUs).
- Pool *LocalModelPoolId `json:"pool,omitempty"`
- Quant string `json:"quant"`
+ Pool *LocalModelPoolId `json:"pool,omitempty"`
+
+ // PromptTokensPerSecond Warm prompt-processing speed in tokens/s measured at the last load; absent when unknown.
+ PromptTokensPerSecond *float32 `json:"prompt_tokens_per_second,omitempty"`
+
+ // Publisher Organization or author that published the weights.
+ Publisher *string `json:"publisher,omitempty"`
+ Quant string `json:"quant"`
// Recommended True on at most one model, an absent downloadable one.
Recommended bool `json:"recommended"`
+ // SourceUrl HTTPS model card or repository URL.
+ SourceUrl *string `json:"source_url,omitempty"`
+
// State absent: not on disk. idle: on disk, holding no memory. loading reserves its memory before it finishes; loaded is registered with the local gateway and Pi.
State LocalModelState `json:"state"`
@@ -3054,6 +3173,9 @@ type LocalModel struct {
Vision bool `json:"vision"`
}
+// LocalModelArchitecture Weight activation topology: dense activates all parameters per token; moe activates a subset.
+type LocalModelArchitecture string
+
// LocalModelAvailability defines model for LocalModelAvailability.
type LocalModelAvailability struct {
Downloadable bool `json:"downloadable"`
@@ -3070,6 +3192,9 @@ type LocalModelAvailabilityReason struct {
// LocalModelAvailabilityReasonCode defines model for LocalModelAvailabilityReason.Code.
type LocalModelAvailabilityReasonCode string
+// LocalModelCapability Model capability verified by localmodels on this platform.
+type LocalModelCapability string
+
// LocalModelDownloadProgress defines model for LocalModelDownloadProgress.
type LocalModelDownloadProgress struct {
BytesPerSecond *int64 `json:"bytes_per_second,omitempty"`
@@ -3098,6 +3223,9 @@ type LocalModelError struct {
// LocalModelErrorCode Closed localmodels library error set. It is extended only together with the localmodels library contract.
type LocalModelErrorCode string
+// LocalModelFamily Model family for brand presentation; never inferred from name.
+type LocalModelFamily string
+
// LocalModelFit Where the model can live, judged on total capacity so it stays stable across loads. system means localmodels can run it from RAM, slower.
type LocalModelFit string
diff --git a/contracts/generated/go/teamhubpublic/openapi.gen.go b/contracts/generated/go/teamhubpublic/openapi.gen.go
index dcf08f27..2a873400 100644
--- a/contracts/generated/go/teamhubpublic/openapi.gen.go
+++ b/contracts/generated/go/teamhubpublic/openapi.gen.go
@@ -2015,6 +2015,24 @@ func (e LocalModelActionRequestAction) Valid() bool {
}
}
+// Defines values for LocalModelArchitecture.
+const (
+ LocalModelArchitectureDense LocalModelArchitecture = "dense"
+ LocalModelArchitectureMoe LocalModelArchitecture = "moe"
+)
+
+// Valid indicates whether the value is a known member of the LocalModelArchitecture enum.
+func (e LocalModelArchitecture) Valid() bool {
+ switch e {
+ case LocalModelArchitectureDense:
+ return true
+ case LocalModelArchitectureMoe:
+ return true
+ default:
+ return false
+ }
+}
+
// Defines values for LocalModelAvailabilityReasonCode.
const (
LocalModelAvailabilityDiskInsufficient LocalModelAvailabilityReasonCode = "DISK_INSUFFICIENT"
@@ -2036,6 +2054,33 @@ func (e LocalModelAvailabilityReasonCode) Valid() bool {
}
}
+// Defines values for LocalModelCapability.
+const (
+ LocalModelCapabilityCoding LocalModelCapability = "coding"
+ LocalModelCapabilityMultilingual LocalModelCapability = "multilingual"
+ LocalModelCapabilityReasoning LocalModelCapability = "reasoning"
+ LocalModelCapabilityToolUse LocalModelCapability = "tool_use"
+ LocalModelCapabilityVision LocalModelCapability = "vision"
+)
+
+// Valid indicates whether the value is a known member of the LocalModelCapability enum.
+func (e LocalModelCapability) Valid() bool {
+ switch e {
+ case LocalModelCapabilityCoding:
+ return true
+ case LocalModelCapabilityMultilingual:
+ return true
+ case LocalModelCapabilityReasoning:
+ return true
+ case LocalModelCapabilityToolUse:
+ return true
+ case LocalModelCapabilityVision:
+ return true
+ default:
+ return false
+ }
+}
+
// Defines values for LocalModelDownloadProgressStep.
const (
LocalModelDownloadStepDownload LocalModelDownloadProgressStep = "download"
@@ -2114,6 +2159,54 @@ func (e LocalModelErrorCode) Valid() bool {
}
}
+// Defines values for LocalModelFamily.
+const (
+ LocalModelFamilyClaude LocalModelFamily = "claude"
+ LocalModelFamilyDeepseek LocalModelFamily = "deepseek"
+ LocalModelFamilyGemma LocalModelFamily = "gemma"
+ LocalModelFamilyGlm LocalModelFamily = "glm"
+ LocalModelFamilyGrok LocalModelFamily = "grok"
+ LocalModelFamilyKimi LocalModelFamily = "kimi"
+ LocalModelFamilyLlama LocalModelFamily = "llama"
+ LocalModelFamilyMistral LocalModelFamily = "mistral"
+ LocalModelFamilyOpenai LocalModelFamily = "openai"
+ LocalModelFamilyOther LocalModelFamily = "other"
+ LocalModelFamilyPhi LocalModelFamily = "phi"
+ LocalModelFamilyQwen LocalModelFamily = "qwen"
+)
+
+// Valid indicates whether the value is a known member of the LocalModelFamily enum.
+func (e LocalModelFamily) Valid() bool {
+ switch e {
+ case LocalModelFamilyClaude:
+ return true
+ case LocalModelFamilyDeepseek:
+ return true
+ case LocalModelFamilyGemma:
+ return true
+ case LocalModelFamilyGlm:
+ return true
+ case LocalModelFamilyGrok:
+ return true
+ case LocalModelFamilyKimi:
+ return true
+ case LocalModelFamilyLlama:
+ return true
+ case LocalModelFamilyMistral:
+ return true
+ case LocalModelFamilyOpenai:
+ return true
+ case LocalModelFamilyOther:
+ return true
+ case LocalModelFamilyPhi:
+ return true
+ case LocalModelFamilyQwen:
+ return true
+ default:
+ return false
+ }
+}
+
// Defines values for LocalModelFit.
const (
LocalModelFitGpu LocalModelFit = "gpu"
@@ -6110,7 +6203,15 @@ type LocalIdentityProof struct {
// LocalModel One validated chat model of the catalog on this platform and its state on this Computer. Sizes are bytes; readers format them.
type LocalModel struct {
- Availability LocalModelAvailability `json:"availability"`
+ // ActiveParameters Parameters active per token on an moe model, such as 3B.
+ ActiveParameters *string `json:"active_parameters,omitempty"`
+
+ // Architecture Weight activation topology: dense activates all parameters per token; moe activates a subset.
+ Architecture *LocalModelArchitecture `json:"architecture,omitempty"`
+ Availability LocalModelAvailability `json:"availability"`
+
+ // Capabilities Capabilities verified by localmodels on this platform.
+ Capabilities *[]LocalModelCapability `json:"capabilities,omitempty"`
ContextTokens int64 `json:"context_tokens"`
Description string `json:"description"`
Download *LocalModelDownloadProgress `json:"download,omitempty"`
@@ -6118,27 +6219,45 @@ type LocalModel struct {
Endpoint *LocalModelEndpoint `json:"endpoint,omitempty"`
Error *LocalModelError `json:"error,omitempty"`
+ // Family Model family for brand presentation; never inferred from name.
+ Family *LocalModelFamily `json:"family,omitempty"`
+
// Fit Where the model can live, judged on total capacity so it stays stable across loads. system means localmodels can run it from RAM, slower.
Fit LocalModelFit `json:"fit"`
// Id Stable localmodels library id: catalog id and variant, such as qwen3-4b:Q4_K_M.
Id LocalModelId `json:"id"`
+ // License SPDX identifier or license name, such as Apache-2.0 or Gemma Terms of Use.
+ License *string `json:"license,omitempty"`
+
// MemoryBytes Footprint when loaded at its context policy, from the localmodels estimator.
MemoryBytes int64 `json:"memory_bytes"`
Name string `json:"name"`
Note *LocalModelNote `json:"note,omitempty"`
+ // Parameters Total parameter scale for display, such as 30B or 4B.
+ Parameters *string `json:"parameters,omitempty"`
+
// PiModel The runtime_model an Agent on runtime pi stores for this model, <pi provider>/<pi model id>; present while the model is on the Computer.
PiModel *string `json:"pi_model,omitempty"`
// Pool A place a model can live: gpu:<index>, system (RAM beside GPUs), or unified (RAM of a host without discrete GPUs).
- Pool *LocalModelPoolId `json:"pool,omitempty"`
- Quant string `json:"quant"`
+ Pool *LocalModelPoolId `json:"pool,omitempty"`
+
+ // PromptTokensPerSecond Warm prompt-processing speed in tokens/s measured at the last load; absent when unknown.
+ PromptTokensPerSecond *float32 `json:"prompt_tokens_per_second,omitempty"`
+
+ // Publisher Organization or author that published the weights.
+ Publisher *string `json:"publisher,omitempty"`
+ Quant string `json:"quant"`
// Recommended True on at most one model, an absent downloadable one.
Recommended bool `json:"recommended"`
+ // SourceUrl HTTPS model card or repository URL.
+ SourceUrl *string `json:"source_url,omitempty"`
+
// State absent: not on disk. idle: on disk, holding no memory. loading reserves its memory before it finishes; loaded is registered with the local gateway and Pi.
State LocalModelState `json:"state"`
@@ -6172,6 +6291,9 @@ type LocalModelActionRequest struct {
// LocalModelActionRequestAction defines model for LocalModelActionRequest.Action.
type LocalModelActionRequestAction string
+// LocalModelArchitecture Weight activation topology: dense activates all parameters per token; moe activates a subset.
+type LocalModelArchitecture string
+
// LocalModelAvailability defines model for LocalModelAvailability.
type LocalModelAvailability struct {
Downloadable bool `json:"downloadable"`
@@ -6188,6 +6310,9 @@ type LocalModelAvailabilityReason struct {
// LocalModelAvailabilityReasonCode defines model for LocalModelAvailabilityReason.Code.
type LocalModelAvailabilityReasonCode string
+// LocalModelCapability Model capability verified by localmodels on this platform.
+type LocalModelCapability string
+
// LocalModelDownloadProgress defines model for LocalModelDownloadProgress.
type LocalModelDownloadProgress struct {
BytesPerSecond *int64 `json:"bytes_per_second,omitempty"`
@@ -6216,6 +6341,9 @@ type LocalModelError struct {
// LocalModelErrorCode Closed localmodels library error set. It is extended only together with the localmodels library contract.
type LocalModelErrorCode string
+// LocalModelFamily Model family for brand presentation; never inferred from name.
+type LocalModelFamily string
+
// LocalModelFit Where the model can live, judged on total capacity so it stays stable across loads. system means localmodels can run it from RAM, slower.
type LocalModelFit string
diff --git a/contracts/generated/typescript/src/generated/runner-gateway/schema.ts b/contracts/generated/typescript/src/generated/runner-gateway/schema.ts
index 6114ab3d..3721d334 100644
--- a/contracts/generated/typescript/src/generated/runner-gateway/schema.ts
+++ b/contracts/generated/typescript/src/generated/runner-gateway/schema.ts
@@ -2140,6 +2140,36 @@ export const runnerGatewayEnvelopeSchema = {
},
},
},
+ LocalModelFamily: {
+ description:
+ "Model family for brand presentation; never inferred from name.",
+ type: "string",
+ enum: [
+ "qwen",
+ "gemma",
+ "llama",
+ "openai",
+ "deepseek",
+ "mistral",
+ "phi",
+ "glm",
+ "kimi",
+ "claude",
+ "grok",
+ "other",
+ ],
+ },
+ LocalModelArchitecture: {
+ description:
+ "Weight activation topology: dense activates all parameters per token; moe activates a subset.",
+ type: "string",
+ enum: ["dense", "moe"],
+ },
+ LocalModelCapability: {
+ description: "Model capability verified by localmodels on this platform.",
+ type: "string",
+ enum: ["vision", "tool_use", "reasoning", "coding", "multilingual"],
+ },
LocalModel: {
description:
"One validated chat model of the catalog on this platform, with its state on this Computer. Bytes everywhere; the reader formats them.",
@@ -2248,6 +2278,59 @@ export const runnerGatewayEnvelopeSchema = {
"Present only when idle and the automatic load after download was skipped.",
$ref: "#/$defs/LocalModelNote",
},
+ family: {
+ $ref: "#/$defs/LocalModelFamily",
+ },
+ publisher: {
+ description: "Organization or author that published the weights.",
+ type: "string",
+ minLength: 1,
+ maxLength: 120,
+ },
+ architecture: {
+ $ref: "#/$defs/LocalModelArchitecture",
+ },
+ parameters: {
+ description: "Total parameter scale for display, such as 30B or 4B.",
+ type: "string",
+ minLength: 1,
+ maxLength: 32,
+ },
+ active_parameters: {
+ description:
+ "Parameters active per token on an moe model, such as 3B.",
+ type: "string",
+ minLength: 1,
+ maxLength: 32,
+ },
+ capabilities: {
+ description: "Capabilities verified by localmodels on this platform.",
+ type: "array",
+ uniqueItems: true,
+ items: {
+ $ref: "#/$defs/LocalModelCapability",
+ },
+ },
+ license: {
+ description:
+ "SPDX identifier or license name, such as Apache-2.0 or Gemma Terms of Use.",
+ type: "string",
+ minLength: 1,
+ maxLength: 120,
+ },
+ source_url: {
+ description: "HTTPS model card or repository URL.",
+ type: "string",
+ minLength: 1,
+ maxLength: 2048,
+ pattern: "^https://[A-Za-z0-9._~:/?#\\[\\]@!$&'()*+,;=%-]+$",
+ },
+ prompt_tokens_per_second: {
+ description:
+ "Warm prompt-processing speed in tokens/s measured at the last load; absent when unknown.",
+ type: "number",
+ minimum: 0,
+ },
},
},
LocalModelsUnavailableReason: {
diff --git a/contracts/generated/typescript/src/generated/runner-gateway/types.ts b/contracts/generated/typescript/src/generated/runner-gateway/types.ts
index 4be9b5d1..4328769e 100644
--- a/contracts/generated/typescript/src/generated/runner-gateway/types.ts
+++ b/contracts/generated/typescript/src/generated/runner-gateway/types.ts
@@ -316,6 +316,35 @@ export type LocalModelErrorCode =
| "MODEL_FILES_MISSING"
| "GATEWAY_REGISTRATION_FAILED"
| "CANCELLED";
+/**
+ * Model family for brand presentation; never inferred from name.
+ */
+export type LocalModelFamily =
+ | "qwen"
+ | "gemma"
+ | "llama"
+ | "openai"
+ | "deepseek"
+ | "mistral"
+ | "phi"
+ | "glm"
+ | "kimi"
+ | "claude"
+ | "grok"
+ | "other";
+/**
+ * Weight activation topology: dense activates all parameters per token; moe activates a subset.
+ */
+export type LocalModelArchitecture = "dense" | "moe";
+/**
+ * Model capability verified by localmodels on this platform.
+ */
+export type LocalModelCapability =
+ | "vision"
+ | "tool_use"
+ | "reasoning"
+ | "coding"
+ | "multilingual";
export type AgentRunnerReady = AgentRunnerWireIdentity & {
type: "agent_runner.state";
runner_pid: PositiveInteger;
@@ -1306,6 +1335,36 @@ export interface LocalModel {
tokens_per_second?: number;
error?: LocalModelError;
note?: LocalModelNote;
+ family?: LocalModelFamily;
+ /**
+ * Organization or author that published the weights.
+ */
+ publisher?: string;
+ architecture?: LocalModelArchitecture;
+ /**
+ * Total parameter scale for display, such as 30B or 4B.
+ */
+ parameters?: string;
+ /**
+ * Parameters active per token on an moe model, such as 3B.
+ */
+ active_parameters?: string;
+ /**
+ * Capabilities verified by localmodels on this platform.
+ */
+ capabilities?: LocalModelCapability[];
+ /**
+ * SPDX identifier or license name, such as Apache-2.0 or Gemma Terms of Use.
+ */
+ license?: string;
+ /**
+ * HTTPS model card or repository URL.
+ */
+ source_url?: string;
+ /**
+ * Warm prompt-processing speed in tokens/s measured at the last load; absent when unknown.
+ */
+ prompt_tokens_per_second?: number;
}
export interface LocalModelAvailability {
downloadable: boolean;
diff --git a/contracts/generated/typescript/src/generated/teamhub-internal/types.ts b/contracts/generated/typescript/src/generated/teamhub-internal/types.ts
index 742c80bc..fc68a481 100644
--- a/contracts/generated/typescript/src/generated/teamhub-internal/types.ts
+++ b/contracts/generated/typescript/src/generated/teamhub-internal/types.ts
@@ -2616,6 +2616,38 @@ export interface components {
/** @enum {string} */
code: "NO_ROOM_TO_LOAD";
};
+ /**
+ * @description Model family for brand presentation; never inferred from name.
+ * @enum {string}
+ */
+ LocalModelFamily:
+ | "qwen"
+ | "gemma"
+ | "llama"
+ | "openai"
+ | "deepseek"
+ | "mistral"
+ | "phi"
+ | "glm"
+ | "kimi"
+ | "claude"
+ | "grok"
+ | "other";
+ /**
+ * @description Weight activation topology: dense activates all parameters per token; moe activates a subset.
+ * @enum {string}
+ */
+ LocalModelArchitecture: "dense" | "moe";
+ /**
+ * @description Model capability verified by localmodels on this platform.
+ * @enum {string}
+ */
+ LocalModelCapability:
+ | "vision"
+ | "tool_use"
+ | "reasoning"
+ | "coding"
+ | "multilingual";
/** @description One validated chat model of the catalog on this platform and its state on this Computer. Sizes are bytes; readers format them. */
LocalModel: {
id: components["schemas"]["LocalModelId"];
@@ -2651,6 +2683,22 @@ export interface components {
error?: components["schemas"]["LocalModelError"];
/** @description Present only when idle and the automatic load after download was skipped. */
note?: components["schemas"]["LocalModelNote"];
+ family?: components["schemas"]["LocalModelFamily"];
+ /** @description Organization or author that published the weights. */
+ publisher?: string;
+ architecture?: components["schemas"]["LocalModelArchitecture"];
+ /** @description Total parameter scale for display, such as 30B or 4B. */
+ parameters?: string;
+ /** @description Parameters active per token on an moe model, such as 3B. */
+ active_parameters?: string;
+ /** @description Capabilities verified by localmodels on this platform. */
+ capabilities?: components["schemas"]["LocalModelCapability"][];
+ /** @description SPDX identifier or license name, such as Apache-2.0 or Gemma Terms of Use. */
+ license?: string;
+ /** @description HTTPS model card or repository URL. */
+ source_url?: string;
+ /** @description Warm prompt-processing speed in tokens/s measured at the last load; absent when unknown. */
+ prompt_tokens_per_second?: number;
};
/** @description A Computer's model library as its Daemon reported it in runner.local_models, mapped from localmodels.library-status/v1. When available is false only reason and observed_at carry meaning and the lists are empty. */
LocalModelsSnapshot: {
diff --git a/contracts/generated/typescript/src/generated/teamhub-public/types.ts b/contracts/generated/typescript/src/generated/teamhub-public/types.ts
index e6cab50c..01284482 100644
--- a/contracts/generated/typescript/src/generated/teamhub-public/types.ts
+++ b/contracts/generated/typescript/src/generated/teamhub-public/types.ts
@@ -4584,6 +4584,38 @@ export interface components {
/** @enum {string} */
code: "NO_ROOM_TO_LOAD";
};
+ /**
+ * @description Model family for brand presentation; never inferred from name.
+ * @enum {string}
+ */
+ LocalModelFamily:
+ | "qwen"
+ | "gemma"
+ | "llama"
+ | "openai"
+ | "deepseek"
+ | "mistral"
+ | "phi"
+ | "glm"
+ | "kimi"
+ | "claude"
+ | "grok"
+ | "other";
+ /**
+ * @description Weight activation topology: dense activates all parameters per token; moe activates a subset.
+ * @enum {string}
+ */
+ LocalModelArchitecture: "dense" | "moe";
+ /**
+ * @description Model capability verified by localmodels on this platform.
+ * @enum {string}
+ */
+ LocalModelCapability:
+ | "vision"
+ | "tool_use"
+ | "reasoning"
+ | "coding"
+ | "multilingual";
/** @description One validated chat model of the catalog on this platform and its state on this Computer. Sizes are bytes; readers format them. */
LocalModel: {
id: components["schemas"]["LocalModelId"];
@@ -4619,6 +4651,22 @@ export interface components {
error?: components["schemas"]["LocalModelError"];
/** @description Present only when idle and the automatic load after download was skipped. */
note?: components["schemas"]["LocalModelNote"];
+ family?: components["schemas"]["LocalModelFamily"];
+ /** @description Organization or author that published the weights. */
+ publisher?: string;
+ architecture?: components["schemas"]["LocalModelArchitecture"];
+ /** @description Total parameter scale for display, such as 30B or 4B. */
+ parameters?: string;
+ /** @description Parameters active per token on an moe model, such as 3B. */
+ active_parameters?: string;
+ /** @description Capabilities verified by localmodels on this platform. */
+ capabilities?: components["schemas"]["LocalModelCapability"][];
+ /** @description SPDX identifier or license name, such as Apache-2.0 or Gemma Terms of Use. */
+ license?: string;
+ /** @description HTTPS model card or repository URL. */
+ source_url?: string;
+ /** @description Warm prompt-processing speed in tokens/s measured at the last load; absent when unknown. */
+ prompt_tokens_per_second?: number;
};
/** @description An Agent whose runtime model is this model on this Computer. */
LocalModelUser: {
diff --git a/contracts/openapi/components/local-models.yaml b/contracts/openapi/components/local-models.yaml
index f759e30d..68dd90f4 100644
--- a/contracts/openapi/components/local-models.yaml
+++ b/contracts/openapi/components/local-models.yaml
@@ -320,6 +320,58 @@ components:
LocalModelFitSystem,
LocalModelFitNone,
]
+ LocalModelFamily:
+ description: Model family for brand presentation; never inferred from name.
+ type: string
+ enum:
+ [
+ qwen,
+ gemma,
+ llama,
+ openai,
+ deepseek,
+ mistral,
+ phi,
+ glm,
+ kimi,
+ claude,
+ grok,
+ other,
+ ]
+ x-enum-varnames:
+ [
+ LocalModelFamilyQwen,
+ LocalModelFamilyGemma,
+ LocalModelFamilyLlama,
+ LocalModelFamilyOpenai,
+ LocalModelFamilyDeepseek,
+ LocalModelFamilyMistral,
+ LocalModelFamilyPhi,
+ LocalModelFamilyGlm,
+ LocalModelFamilyKimi,
+ LocalModelFamilyClaude,
+ LocalModelFamilyGrok,
+ LocalModelFamilyOther,
+ ]
+ LocalModelArchitecture:
+ description: >-
+ Weight activation topology: dense activates all parameters per token;
+ moe activates a subset.
+ type: string
+ enum: [dense, moe]
+ x-enum-varnames: [LocalModelArchitectureDense, LocalModelArchitectureMoe]
+ LocalModelCapability:
+ description: Model capability verified by localmodels on this platform.
+ type: string
+ enum: [vision, tool_use, reasoning, coding, multilingual]
+ x-enum-varnames:
+ [
+ LocalModelCapabilityVision,
+ LocalModelCapabilityToolUse,
+ LocalModelCapabilityReasoning,
+ LocalModelCapabilityCoding,
+ LocalModelCapabilityMultilingual,
+ ]
LocalModel:
description: >-
One validated chat model of the catalog on this platform and its state
@@ -406,6 +458,46 @@ components:
note:
$ref: "#/components/schemas/LocalModelNote"
description: Present only when idle and the automatic load after download was skipped.
+ family:
+ $ref: "#/components/schemas/LocalModelFamily"
+ publisher:
+ description: Organization or author that published the weights.
+ type: string
+ minLength: 1
+ maxLength: 120
+ architecture:
+ $ref: "#/components/schemas/LocalModelArchitecture"
+ parameters:
+ description: Total parameter scale for display, such as 30B or 4B.
+ type: string
+ minLength: 1
+ maxLength: 32
+ active_parameters:
+ description: Parameters active per token on an moe model, such as 3B.
+ type: string
+ minLength: 1
+ maxLength: 32
+ capabilities:
+ description: Capabilities verified by localmodels on this platform.
+ type: array
+ uniqueItems: true
+ items:
+ $ref: "#/components/schemas/LocalModelCapability"
+ license:
+ description: SPDX identifier or license name, such as Apache-2.0 or Gemma Terms of Use.
+ type: string
+ minLength: 1
+ maxLength: 120
+ source_url:
+ description: HTTPS model card or repository URL.
+ type: string
+ minLength: 1
+ maxLength: 2048
+ pattern: "^https://[A-Za-z0-9._~:/?#\\[\\]@!$&'()*+,;=%-]+$"
+ prompt_tokens_per_second:
+ description: Warm prompt-processing speed in tokens/s measured at the last load; absent when unknown.
+ type: number
+ minimum: 0
LocalModelsUnavailableReason:
type: object
additionalProperties: false
diff --git a/contracts/runner-gateway/envelope.schema.json b/contracts/runner-gateway/envelope.schema.json
index cea18c48..449bb9e5 100644
--- a/contracts/runner-gateway/envelope.schema.json
+++ b/contracts/runner-gateway/envelope.schema.json
@@ -2122,6 +2122,34 @@
}
}
},
+ "LocalModelFamily": {
+ "description": "Model family for brand presentation; never inferred from name.",
+ "type": "string",
+ "enum": [
+ "qwen",
+ "gemma",
+ "llama",
+ "openai",
+ "deepseek",
+ "mistral",
+ "phi",
+ "glm",
+ "kimi",
+ "claude",
+ "grok",
+ "other"
+ ]
+ },
+ "LocalModelArchitecture": {
+ "description": "Weight activation topology: dense activates all parameters per token; moe activates a subset.",
+ "type": "string",
+ "enum": ["dense", "moe"]
+ },
+ "LocalModelCapability": {
+ "description": "Model capability verified by localmodels on this platform.",
+ "type": "string",
+ "enum": ["vision", "tool_use", "reasoning", "coding", "multilingual"]
+ },
"LocalModel": {
"description": "One validated chat model of the catalog on this platform, with its state on this Computer. Bytes everywhere; the reader formats them.",
"type": "object",
@@ -2222,6 +2250,56 @@
"note": {
"description": "Present only when idle and the automatic load after download was skipped.",
"$ref": "#/$defs/LocalModelNote"
+ },
+ "family": {
+ "$ref": "#/$defs/LocalModelFamily"
+ },
+ "publisher": {
+ "description": "Organization or author that published the weights.",
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 120
+ },
+ "architecture": {
+ "$ref": "#/$defs/LocalModelArchitecture"
+ },
+ "parameters": {
+ "description": "Total parameter scale for display, such as 30B or 4B.",
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 32
+ },
+ "active_parameters": {
+ "description": "Parameters active per token on an moe model, such as 3B.",
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 32
+ },
+ "capabilities": {
+ "description": "Capabilities verified by localmodels on this platform.",
+ "type": "array",
+ "uniqueItems": true,
+ "items": {
+ "$ref": "#/$defs/LocalModelCapability"
+ }
+ },
+ "license": {
+ "description": "SPDX identifier or license name, such as Apache-2.0 or Gemma Terms of Use.",
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 120
+ },
+ "source_url": {
+ "description": "HTTPS model card or repository URL.",
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 2048,
+ "pattern": "^https://[A-Za-z0-9._~:/?#\\[\\]@!$&'()*+,;=%-]+$"
+ },
+ "prompt_tokens_per_second": {
+ "description": "Warm prompt-processing speed in tokens/s measured at the last load; absent when unknown.",
+ "type": "number",
+ "minimum": 0
}
}
},
diff --git a/scripts/runner-gateway-contract.test.ts b/scripts/runner-gateway-contract.test.ts
index 0c2533bd..e9cca19e 100644
--- a/scripts/runner-gateway-contract.test.ts
+++ b/scripts/runner-gateway-contract.test.ts
@@ -417,6 +417,14 @@ const localModelsSnapshot = {
endpoint: { base_url: "http://127.0.0.1:18100/v1" },
pi_model: "localmodels-library/qwen3-4b",
tokens_per_second: 142.5,
+ family: "qwen",
+ publisher: "Alibaba Cloud",
+ architecture: "dense",
+ parameters: "4B",
+ capabilities: ["tool_use", "reasoning", "coding"],
+ license: "Apache-2.0",
+ source_url: "https://huggingface.co/Qwen/Qwen3-4B",
+ prompt_tokens_per_second: 980.4,
},
{
id: "qwen3-235b:Q4_K_M",
@@ -1170,6 +1178,42 @@ describe("Runner Gateway contract", () => {
],
},
},
+ {
+ ...localModelsSnapshot,
+ local_models: {
+ ...localModelsSnapshot.local_models,
+ models: [
+ {
+ ...localModelsSnapshot.local_models.models[0],
+ family: "unknown_vendor",
+ },
+ ],
+ },
+ },
+ {
+ ...localModelsSnapshot,
+ local_models: {
+ ...localModelsSnapshot.local_models,
+ models: [
+ {
+ ...localModelsSnapshot.local_models.models[0],
+ capabilities: ["vision", "vision"],
+ },
+ ],
+ },
+ },
+ {
+ ...localModelsSnapshot,
+ local_models: {
+ ...localModelsSnapshot.local_models,
+ models: [
+ {
+ ...localModelsSnapshot.local_models.models[0],
+ source_url: "http://huggingface.co/Qwen/Qwen3-4B",
+ },
+ ],
+ },
+ },
];
for (const envelope of invalid) {
expect(() => parseRunnerGatewayEnvelope(envelope)).toThrow(