Skip to main content
MetrixLLM supports any OpenAI-compatible endpoint as a custom provider. This lets you route traffic to local models (Ollama, vLLM, LM Studio) or third-party APIs that implement the OpenAI chat completions format.

What is a Custom Provider?

A custom provider is a per-workspace configuration that tells the MetrixLLM gateway to route requests to your own endpoint instead of built-in providers. Custom providers:
  • Are per-workspace — each workspace can have its own custom endpoints
  • Support the OpenAI chat completions format (/v1/chat/completions)
  • Can be local (no API key needed) or remote (with authentication)
  • Appear alongside built-in providers in routing configuration
  • Support model registration so you can track costs and capabilities

Supported Servers

Any server implementing the OpenAI API format works:

Setup

1. Add a Custom Provider

Navigate to Settings > Custom Providers in your workspace dashboard and click Add provider. Fill in:
  • Provider Name — A human-readable label (e.g., “My Local Llama”)
  • Base URL — The server’s base URL (e.g., http://localhost:11434/v1)
  • API Key — Optional. Leave empty for local servers without authentication

2. Register Models

After adding a provider, expand it and click Add model. For each model:
  • Model ID — The model name the server expects (e.g., llama-3.3-70b)
  • Display Name — A human-friendly name (e.g., “Llama 3.3 70B (Local)”)
  • Context Window — Maximum context length (e.g., 128K)

3. Test the Connection

Click Test on your provider to verify connectivity. The gateway will hit the /v1/models endpoint to confirm the server is reachable and list available models.

Using Custom Providers

Via the Gateway API

Send requests to the MetrixLLM gateway with your registered model name:
The gateway automatically routes to your custom provider based on the model name.

Via the Dashboard Playground

  1. Go to Playground
  2. Select your custom model from the model dropdown
  3. Send a test message

Via the Drop-in Endpoint

Use the OpenAI SDK with the MetrixLLM base URL:

How Routing Works

When a request arrives at the gateway:
  1. The gateway looks up the model name in admin_models (built-in providers)
  2. If not found, it checks your workspace’s custom providers
  3. If a match is found, the request is forwarded to your custom endpoint
  4. The response is parsed using OpenAI format and returned to the client
Custom providers use BYOK mode by default — your endpoint’s API key is used directly (if configured).

Caching and Invalidation

Custom provider configurations are cached in the gateway for 60 seconds. When you update a provider in the dashboard, the cache is invalidated immediately via NATS pub/sub.

Limitations

  • Custom providers only support the chat completions format (/v1/chat/completions)
  • Embedding endpoints are not yet supported for custom providers
  • Web search injection is not available for custom provider models
  • Custom provider models are workspace-scoped — other workspaces cannot see them

API Reference

List Custom Providers

Create Custom Provider

Update Custom Provider

Delete Custom Provider

Test Connection

Add Model

Delete Model