Privacy & Security Guide

Local and Private AI Models for Developers

Sometimes code genuinely cannot leave an approved environment — because of NDAs, air-gapped infrastructure, regulated data, or a need to control network paths. This guide covers local AI model tooling, what must be verified before sensitive use, and when to use local versus cloud.

Last reviewed: Sep 22 2026


When Local Makes Sense

Local AI models make sense when one or more of these apply:

If none of these apply, compare the actual quality, cost, latency and operational burden before choosing. Model capability changes quickly; do not assume that either local or cloud is universally better for your task.


The Main Tools

Ollama — Developer-first CLI

Ollama provides a CLI for downloading and serving models, and a local HTTP API. Treat the default local endpoint as a service boundary: confirm its bind address, firewall exposure, authentication needs and outbound traffic before sending sensitive material. Its OpenAI-compatible API can simplify some integrations, but confirm the endpoint and feature compatibility in the client you use.

# Install from the current official Ollama instructions, then verify the
# downloaded installer according to your organisation's software policy.

# Pull and run a model after confirming its tag, licence and storage location.
ollama pull your-verified-model-tag
ollama run your-verified-model-tag "Explain this function: ..."

# Or run as a local API server (http://localhost:11434)
ollama serve

The OpenAI-compatible endpoint means you can point the official OpenAI SDK at Ollama and use local models from existing code:

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'http://localhost:11434/v1',
  apiKey: 'ollama',  // required by the library, not used by Ollama
});

const response = await client.chat.completions.create({
  model: 'your-verified-model-tag',
  messages: [{ role: 'user', content: 'Review this code...' }],
});

LM Studio — GUI with model browser

LM Studio provides a desktop GUI for browsing, downloading, and running models. It also exposes local REST and compatibility APIs. The documented default server address is http://localhost:1234; if you enable network access, configure authentication and verify the bind address and firewall before loading sensitive material.

Jan — Privacy-first, offline-first

Jan is an open-source desktop option with offline-oriented workflows. Downloading models, updates, extensions and any optional online features are separate network and retention questions; verify the installed version and configuration rather than treating the product label as a security guarantee.


Choose a Model by Measured Fit

A model name is not a durable recommendation. Local quality and speed depend on the exact model tag, quantisation, context length, runtime version, concurrency, GPU offload and hardware. Start with a representative task set, not a leaderboard.

Build a Small Acceptance Set

Record the Whole Configuration

Do Not Infer Quality from Deployment Type

“Local” describes where inference runs, not whether a model is accurate, safe or suitable. Compare local and managed candidates on the same acceptance set and keep human review for changes whose failure would matter.


Connecting VS Code to a Local Model

Some coding extensions can use Ollama directly or an OpenAI-compatible endpoint. Support differs by feature: chat, edits, autocomplete and agents may use different providers. Verify each workflow rather than assuming that one base URL redirects the whole product.

With Continue

Continue supports local providers. Its current local configuration file is ~/.continue/config.yaml on macOS and Linux or %USERPROFILE%\.continue\config.yaml on Windows. A minimal chat and edit configuration is:

name: Local Ollama
version: 1.0.0
schema: v1
models:
  - name: Local coding model
    provider: ollama
    model: your-verified-model-tag
    roles:
      - chat
      - edit
      - apply

Check the current Continue schema before copying this example. Start the runtime, open a non-sensitive test repository and confirm in runtime logs that the request reached the intended local model.

With Cursor

Cursor's provider settings, endpoint routing and supported features can change independently. Use its current documentation and settings rather than a copied menu path. Test chat, edits, autocomplete and agent actions separately, and inspect the local server logs: a model appearing in the interface does not prove that every feature uses that endpoint. Repeat the test after editor upgrades.


Handling Slow Inference

Do not estimate latency from parameter count alone. Prompt length, output length, quantisation, memory bandwidth, GPU offload and concurrent users all matter. Measure the exact workload on the intended machine.


Private Cloud as a Middle Option

A managed service or a model hosted in your cloud account creates a different trust boundary; it is not automatically equivalent to local or air-gapped operation. Evaluate it against the same data-flow requirements.

Obtain the current service terms and architecture documents for the exact region and plan. A product family name is not evidence that your required residency, retention or access controls are enabled.


Local Model Decision Guide

Official Sources and Review Trigger

Review this guide again by Oct 22 2026, or earlier if Ollama, LM Studio, Continue or an editor integration changes its endpoint, authentication, configuration schema or routing behaviour.

Related Guides

Sanitizing Code and Data Before Sending to AI

What to scrub from code, logs, and customer data before using cloud AI — and when to switch to local.

VS Code & Cursor with AI

Configure your editor for AI-first development — including custom model endpoints for local setups.

Back to Home
→