Custom Endpoint Object Structure
Each endpoint in the custom array should have the following structure:
Example
Endpoint Object Structure
endpoints:
custom:
# Example using Mistral AI API
- name: "Mistral"
apiKey: "${YOUR_ENV_VAR_KEY}"
baseURL: "https://api.mistral.ai/v1"
models:
default: ["mistral-tiny", "mistral-small", "mistral-medium", "mistral-large-latest"]
titleConvo: true
titleModel: "mistral-tiny"
modelDisplayLabel: "Mistral"
# addParams:
# safe_prompt: true # Mistral specific value for moderating messages
# NOTE: For Mistral, it is necessary to drop the following parameters or you will encounter a 422 Error:
dropParams: ["stop", "user", "frequency_penalty", "presence_penalty"]name
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| name | String | A unique name for the endpoint. | Will be used as the "title" in the Endpoints Selector |
Required
Example:
endpoints / custom / name
name: "Mistral"apiKey
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| apiKey | String (apiKey | "user_provided") | Your API key for the service. Can reference an environment variable, or allow user to provide the value. | It's highly recommended to use the env. variable reference for this field, i.e. `${YOUR_VARIABLE}` |
Required
Example:
endpoints / custom / apiKey
apiKey: "${MISTRAL_API_KEY}"or
endpoints / custom / apiKey
apiKey: "your_api_key"or
endpoints / custom / apiKey
apiKey: "user_provided"baseURL
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| baseURL | String (baseURL | "user_provided") | Base URL for the API. Can reference an environment variable, or allow user to provide the value. | It's highly recommended to use the env. variable reference for this field, i.e. `${YOUR_VARIABLE}` |
Required
Example:
endpoints / custom / baseURL
baseURL: "https://api.mistral.ai/v1"or
endpoints / custom / baseURL
baseURL: "${MISTRAL_BASE_URL}"or
endpoints / custom / baseURL
baseURL: "user_provided"iconURL
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| iconURL | String | The URL to use as the Endpoint Icon. |
Default: ""
Example:
endpoints / custom / iconURL
iconURL: https://github.com/danny-avila/LibreChat/raw/main/docs/assets/LibreChat.svgNotes:
- If you want to use existing project icons, define the endpoint
nameas one of the main endpoints (case-sensitive):- “openAI” | “azureOpenAI” | “google” | “anthropic” | “assistants” | “gptPlugins”
- There are also “known endpoints” (case-insensitive), which have icons provided. If your endpoint
namematches the following names, you should omit this field:- “Mistral"
- "OpenRouter"
- "Groq"
- "APIpie"
- "Anyscale"
- "Fireworks"
- "Perplexity"
- "together.ai"
- "Ollama"
- "MLX”
models
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| models | Object | Configuration for models. |
Required
Properties:
default
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| default | Array of Strings | An array of strings indicating the default models to use. | If fetching models fails, these defaults are used as a fallback. |
Required
Example:
endpoints / custom / models / default
default:
- "mistral-tiny"
- "mistral-small"
- "mistral-medium"fetch
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| fetch | Boolean | When set to `true`, attempts to fetch a list of models from the API. | May cause slowdowns during initial use of the app if the response is delayed. Defaults to `false`. |
Default: false
Example:
endpoints / custom / models / fetch
fetch: trueuserIdQuery
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| userIdQuery | Boolean | When set to `true`, adds the LibreChat user ID as a query parameter to the API models request. |
Default: false
Example:
endpoints / custom / models / userIdQuery
userIdQuery: truetitleConvo
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| titleConvo | Boolean | Enables title conversation when set to `true`. |
Default: false
Example:
endpoints / custom / titleConvo
titleConvo: truetitleMethod
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| titleMethod | String ("completion" | "functions") | Chooses between "completion" or "functions" for title method. | Defaults to "completion" if omitted. |
Default: "completion"
Example:
endpoints / custom / titleMethod
titleMethod: "completion"titleModel
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| titleModel | String | Specifies the model to use for titles. | Defaults to "gpt-3.5-turbo" if omitted. May cause issues if "gpt-3.5-turbo" is not available. You can also dynamically use the current conversation model by setting it to "current_model". |
Default: "gpt-3.5-turbo"
Example:
endpoints / custom / titleModel
titleModel: "mistral-tiny"or
endpoints / custom / titleModel
titleModel: "current_model"summarize
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| summarize | Boolean | Enables summarization when set to `true`. | This feature requires an OpenAI Functions compatible API |
Default: false
Example:
endpoints / custom / summarize
summarize: falsesummaryModel
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| summaryModel | String | Specifies the model to use if summarization is enabled. | Defaults to "gpt-3.5-turbo" if omitted. May cause issues if "gpt-3.5-turbo" is not available. |
Default: "gpt-3.5-turbo"
Example:
endpoints / custom / summaryModel
summaryModel: "mistral-tiny"forcePrompt
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| forcePrompt | Boolean | If `true`, sends a `prompt` parameter instead of `messages`. | Combines all messages into a single text payload or "prompt", following OpenAI format, which uses the `/completions` endpoint of your baseURL rather than `/chat/completions`. |
Default: false
Example:
endpoints / custom / forcePrompt
forcePrompt: falsemodelDisplayLabel
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| modelDisplayLabel | String | The label displayed in messages next to the Icon for the current AI model. | The display order is: 1. Custom name set via preset (if available), 2. Label derived from the model name (if applicable), 3. This value is used if the above are not specified. Defaults to "AI". |
Default: "AI"
Example:
endpoints / custom / modelDisplayLabel
modelDisplayLabel: "Mistral"addParams
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| addParams | Object/Dictionary | Adds additional parameters to requests. | Adds/Overrides parameters. Useful for specifying API-specific options. |
Example:
endpoints / custom / addParams
addParams:
safe_prompt: truedropParams
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| dropParams | Array/List of Strings | Removes default parameters from requests. | Excludes specified default parameters. Useful for APIs that do not accept or recognize certain parameters. |
Example:
endpoints / custom / dropParams
dropParams:
- "stop"
- "user"
- "frequency_penalty"
- "presence_penalty"Note: For a list of default parameters sent with every request, see the “Default Parameters” section.
headers
Key:
| Key | Type | Description | Example |
|---|---|---|---|
| headers | Object/Dictionary | Adds additional headers to requests. Can reference an environment variable | The `headers` object specifies custom headers for requests. Useful for authentication and setting content types. |
Example:
endpoints / custom / headers
headers:
x-api-key: "${ENVIRONMENT_VARIABLE}"
Content-Type: "application/json"Note: Supports dynamic environment variable values, which use the format: "${VARIABLE_NAME}".