FabricFabric
ReferenceConfig

Custom endpoints

Connect Fabric Agents to Ollama, LMStudio, OpenRouter, Vercel AI Gateway, vLLM, or any OpenAI- or Anthropic-compatible endpoint via pi_compat connections.

Fabric Agents routes all non-Anthropic-direct providers through the Pi SDK. For endpoints the Pi SDK already knows about (OpenAI, Google, Bedrock, Copilot, etc.) you use providerType: "pi". For anything else — local models, gateways, proxies, self-hosted servers — you use providerType: "pi_compat" and point it at the endpoint yourself.

This is how you connect to Ollama on localhost, to OpenRouter's unified API, to a Vercel AI Gateway, or to a vLLM server running inside your infra.

The config shape

A pi_compat connection sits in config.json alongside your other LLM connections:

{
  "slug": "ollama",
  "name": "Ollama (local)",
  "providerType": "pi_compat",
  "authType": "none",
  "baseUrl": "http://localhost:11434",
  "customEndpoint": {
    "api": "openai-completions",
    "supportsImages": false
  },
  "models": ["llama3:70b", "mistral:7b", "codestral:22b"],
  "defaultModel": "llama3:70b",
  "createdAt": 1710000000000
}

The field that makes it a custom endpoint is customEndpoint:

FieldTypePurpose
api"openai-completions" | "anthropic-messages"Which streaming protocol the endpoint speaks.
supportsImagesbooleantrue to allow image attachments in chat. Defaults to false.

baseUrl is used verbatim — Fabric Agents won't append /v1 or fix up paths. Whatever you put there is what gets hit.

Protocol: openai-completions vs anthropic-messages

Most services speak one of two shapes:

If the endpoint speaks…Set api toExamples
OpenAI's /v1/chat/completions"openai-completions"Ollama, LMStudio, vLLM, OpenRouter, Vercel AI Gateway, most proxies.
Anthropic's /v1/messages"anthropic-messages"Self-hosted Anthropic-compatible gateways.

Almost all OSS model runners speak the OpenAI shape. Pick anthropic-messages only when you know you're pointing at an Anthropic-compatible server.

Auth

Three auth types are valid for pi_compat:

authTypeWhen to useWhat to configure
noneLocal servers with no auth (Ollama, LMStudio, private vLLM).Just baseUrl.
api_key_with_endpointHosted gateways with API keys (OpenRouter, Vercel AI Gateway).baseUrl + an API key via the UI Connect dialog.

The key goes into the credential store (keychain / encrypted file). config.json never contains it.

Models

Fabric Agents doesn't discover the model list for pi_compat endpoints — list the models you have available yourself in the models array.

Each entry can be either a string (just the ID) or a full object:

{
  "models": [
    "llama3:70b",
    {
      "id": "gemma-4",
      "displayName": "Gemma 4",
      "supportsImages": true,
      "contextWindow": 128000
    }
  ]
}

supportsImages on a per-model object overrides the connection-level default — useful when most of your local models are text-only but one is multimodal.

Image support

The top-level customEndpoint.supportsImages controls whether the chat input will let you attach images at all for this connection. Even if it's true, each model also needs to actually support image input — so if you have a mix of text-only and multimodal models behind one endpoint, set supportsImages: true at the connection level and override on individual model entries.

Setup recipes

Ollama (local)

{
  "slug": "ollama",
  "name": "Ollama (local)",
  "providerType": "pi_compat",
  "authType": "none",
  "baseUrl": "http://localhost:11434",
  "customEndpoint": { "api": "openai-completions" },
  "models": ["llama3:70b", "mistral:7b"],
  "defaultModel": "llama3:70b",
  "createdAt": 1710000000000
}

Ollama listens on port 11434 and exposes an OpenAI-compatible endpoint on the same port under /v1. Ollama auto-forwards so a bare http://localhost:11434 works.

LMStudio (local)

{
  "slug": "lmstudio",
  "name": "LMStudio",
  "providerType": "pi_compat",
  "authType": "none",
  "baseUrl": "http://localhost:1234/v1",
  "customEndpoint": { "api": "openai-completions" },
  "models": ["llama-3-8b-instruct"],
  "defaultModel": "llama-3-8b-instruct",
  "createdAt": 1710000000000
}

LMStudio defaults to port 1234 and requires the explicit /v1 suffix.

OpenRouter

{
  "slug": "openrouter",
  "name": "OpenRouter",
  "providerType": "pi_compat",
  "authType": "api_key_with_endpoint",
  "baseUrl": "https://openrouter.ai/api/v1",
  "customEndpoint": { "api": "openai-completions", "supportsImages": true },
  "models": [
    "anthropic/claude-3.5-sonnet",
    "openai/gpt-4o",
    "google/gemini-pro-1.5",
    "meta-llama/llama-3.1-70b-instruct"
  ],
  "defaultModel": "anthropic/claude-3.5-sonnet",
  "createdAt": 1710000000000
}

Get a key from openrouter.ai, paste it into the Connect dialog, and every OpenRouter-hosted model you listed becomes available.

Vercel AI Gateway

{
  "slug": "vercel-ai-gateway",
  "name": "Vercel AI Gateway",
  "providerType": "pi_compat",
  "authType": "api_key_with_endpoint",
  "baseUrl": "https://<your-gateway>.vercel-ai-gateway.com/v1",
  "customEndpoint": { "api": "openai-completions" },
  "models": ["gpt-4o", "claude-3.5-sonnet"],
  "defaultModel": "gpt-4o",
  "createdAt": 1710000000000
}

Vercel Gateway gives you one URL in front of many providers with unified billing, rate limits, and caching. Point Fabric Agents at your gateway's OpenAI-compatible endpoint.

vLLM (self-hosted)

{
  "slug": "vllm",
  "name": "vLLM (internal)",
  "providerType": "pi_compat",
  "authType": "none",
  "baseUrl": "http://vllm.internal:8000/v1",
  "customEndpoint": { "api": "openai-completions" },
  "models": ["mistralai/Mistral-7B-Instruct-v0.2"],
  "defaultModel": "mistralai/Mistral-7B-Instruct-v0.2",
  "createdAt": 1710000000000
}

vLLM exposes an OpenAI-compatible server. Include /v1 in baseUrl. Use api_key_with_endpoint if your internal deployment gates on a bearer token.

Common failure modes

  • Endpoint unreachable — connection test fails at add time. Double-check you can curl the baseUrl from the machine running Fabric Agents. Firewall, VPN, and localhost-vs-0.0.0.0 binding differences are the usual culprits.
  • 401 Unauthorized — key is missing, rotated, or wrong. Click Reconnect on the connection and paste a fresh key.
  • 404 Not FoundbaseUrl is missing the /v1 suffix for a server that requires it, or the path is otherwise off. Hit the endpoint with curl to check.
  • Model not found — the ID in models doesn't exist on the server. For Ollama, ollama list shows what's installed; pull the model with ollama pull <name> and retry.
  • Images silently droppedsupportsImages isn't set to true for the model or connection. Both must agree for image input to flow through.

On this page