Step 3 · One small roster·Local DeepSeek, honestlyPT-BR
Evidence-first model routing · Visual course

Local DeepSeek, honestly

The registry chooses the transport. A local model without a healthy local server fails closed instead of leaking to the gateway.

Read first (primary source)
Unsloth — DeepSeek-V4 local guide

The guide documents the GGUF sizes and llama.cpp requirements; operational status still comes from this machine's own preflight.

By the end, you can

  • trace a model ID to its registered adapter
  • explain why local never falls back
  • distinguish install evidence from completion evidence
Start simple; open the technical layer only when useful.
1

The big idea


deepseek-v4-flash means local only. If ALEMBIC_LOCAL_URL is absent or unhealthy, Alembic stops with an actionable error.

Think of a labeled power socket. A local-only plug does not secretly draw power from a paid remote outlet. The analogy breaks because software also health-checks the socket before writing.

In the code

getModelById(modelId)?.adapterId selects local or cliproxyapi. An unregistered explicit model ID fails closed, so a typo cannot guess a transport. The selected adapter is health-checked before transcript or memory writes.

2

In one picture


selected model IDadapterId registrylocal | gateway local ALEMBIC_LOCAL_URLhealth check before write cliproxyapi configured gatewayexplicit model local missing → error; never → gateway
The registry is the switch. Availability is a separate Proof Gate.
3

In the code


apps/cli/src/commands.ts
const model = getModelById(modelId);
if (!model) return err(new Error("Model is not registered."));
adapterId = model.adapterId;
adapter = registry.get(adapterId);
if (!adapter && adapterId === "local") {
  return err(new Error("Local models never fall back to cliproxyapi."));
}

How to find or run this

ALEMBIC_LOCAL_URL=http://127.0.0.1:8000 alembic import session.jsonl --format codex --distill --online first health-checks the local endpoint.

4

Try it


Switch the selected model. The transport changes because the registry entry changes—not because a router guesses.

Registry route explorer

adapterId: local

Requires a healthy ALEMBIC_LOCAL_URL. Missing wiring is an error.

adapterId: cliproxyapi

Requires the configured gateway and its token.

Flip the three cards, commit a prediction, then take the check.

GGUF present means completion proven?
No. A healthy server and real completion are separate receipts.
What selects the adapter?
The chosen model's registry entry.
What happens without local URL?
The command fails before any write.
Both gateway and local adapters exist. You select deepseek-v4-flash. Which one runs?
Only the registered local adapter. The gateway is not a fallback.
What is currently proven on this machine?
The route and failure behavior are proven. A local server completion was not run and is not claimed.
You now have the full map: explicit roster, boundary receipts, and honest local routing.

Sources and receipts