Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/manusapis/Agix/llms.txt

Use this file to discover all available pages before exploring further.

The custom provider ID exists for situations where none of the three managed providers fits your needs. If you run a self-hosted model, use Azure OpenAI, or have any other service that speaks the OpenAI /chat/completions format, you can point Agix directly at it by supplying a baseUrl in the sidebar. No changes to the source code are needed. Under the hood, custom maps to the same OpenAIProvider class as openai and openrouter, so the request and response contract is identical.

How the factory routes custom configs

The createProvider() factory maps the "custom" provider ID to OpenAIProvider:
export function createProvider(config: AIProviderConfig): IAIProvider {
  switch (config.id) {
    case "openai":
    case "openrouter":
    case "custom":
      return new OpenAIProvider(config);   // Same /chat/completions implementation
    case "claude":
      return new ClaudeProvider(config);
    default:
      throw new Error(`Unknown AI provider: ${(config as { id: ProviderId }).id}`);
  }
}
This means any server that accepts a POST to <baseUrl>/chat/completions with an OpenAI-shaped body will work with the custom provider.

Default configuration

The custom entry in the default provider registry ships disabled and with empty strings for baseUrl and defaultModel, because these values are always site-specific:
{
  id: "custom",
  name: "Custom Endpoint",
  apiKey: "",
  baseUrl: "",
  defaultModel: "",
  enabled: false,
}
enabled: false means the entry does not appear in the ProviderSelector dropdown until you configure and save it.

Setting up a custom endpoint in the sidebar

1

Open the Agix sidebar

In Excel, click Home → Agix. In Google Sheets, open the Agix add-on from the Extensions menu.
2

Select the Custom Endpoint provider

In the Provider dropdown, choose Custom Endpoint. If it is not visible, you may need to enable it by saving a config first (see the example below).
3

Enter your base URL

Paste the base URL of your server into the Base URL field, without a trailing /chat/completions path — Agix appends that automatically.
4

Enter your API key

If your endpoint requires authentication, enter the key or token in the API Key field. It will be sent as a Bearer token in the Authorization header.
5

Enter the model name

Type the model name your server expects in the Model field (e.g. llama3, mistral, gpt-4).
6

Save

Click Save. Agix calls settingsStore.save() to persist the full AIProviderConfig.

Example: connecting to a local Ollama server

Ollama exposes an OpenAI-compatible endpoint at http://localhost:11434/v1. The corresponding AIProviderConfig looks like this:
{
  id: "custom",
  name: "Custom Endpoint",
  apiKey: "your-key",           // Ollama does not require auth by default
  baseUrl: "http://localhost:11434/v1",
  defaultModel: "llama3",
  enabled: true
}
Agix will POST to http://localhost:11434/v1/chat/completions with the standard OpenAI body. Any model you have pulled with ollama pull <name> can be used as the defaultModel.

Other compatible endpoints

ServiceExample baseUrlNotes
Ollamahttp://localhost:11434/v1No API key required by default
Azure OpenAIhttps://<resource>.openai.azure.com/openai/deployments/<deployment>Use your Azure API key
llama.cpp serverhttp://localhost:8080/v1Start with --api-key to require auth
LM Studiohttp://localhost:1234/v1Built-in OpenAI-compatible server

Request parameters

Because custom uses OpenAIProvider, the same parameters apply as for the OpenAI provider:
model
string
required
The model name your endpoint expects, e.g. llama3 or mistral.
messages
ChatMessage[]
required
Full conversation history with system, user, and assistant roles.
temperature
number
default:"0.7"
Response randomness. Defaults to 0.7 when not specified.
max_tokens
number
Maximum response tokens. Omitted from the request when not provided.
Your endpoint must implement the OpenAI /chat/completions request and response format exactly. Agix reads choices[0].message.content from the response body. Endpoints with a different response shape will cause Agix to display an empty or error response. Consult your server’s documentation to confirm compatibility before connecting.

Build docs developers (and LLMs) love