Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 10 additions & 21 deletions content/docs/configuration/librechat_yaml/example.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ icon: FileCode

<Callout type="example" title="Example" collapsible>

This example config includes all documented endpoints (Except Azure, LiteLLM, MLX, and Ollama, which all require additional configurations)
This is a condensed example, not a complete configuration. It covers the pre-configured endpoints and a selection of common settings (Azure, LiteLLM, MLX, and Ollama need additional configuration and are omitted). For every available option, see the [full example file](https://github.com/LibreChat-AI/LibreChat/blob/main/librechat.example.yaml) in the LibreChat repository and the [object structure reference](/docs/configuration/librechat_yaml/object_structure/config).

```yaml filename="librechat.yaml"
version: 1.3.18

cache: true

# Other top-level blocks not shown in this condensed example. Each is documented
# in the object structure reference:
# balance: { enabled: true, startBalance: 20000, autoRefillEnabled: false }
# memory: { disabled: false, tokenLimit: 10000 }
# summarization: { enabled: true }
# mcpServers: {} # see the MCP Servers Object Structure page

# Optional deployment-level headers for one self-hosted Langfuse origin or gateway.
# Use environment references for credentials.
# langfuse:
Expand Down Expand Up @@ -198,8 +205,6 @@ endpoints:
fetch: true
titleConvo: true
titleModel: 'meta-llama/Llama-2-7b-chat-hf'
summarize: false
summaryModel: 'meta-llama/Llama-2-7b-chat-hf'
modelDisplayLabel: 'Anyscale'

# APIpie
Expand Down Expand Up @@ -258,8 +263,6 @@ endpoints:
fetch: true
titleConvo: true
titleModel: 'accounts/fireworks/models/llama-v2-7b-chat'
summarize: false
summaryModel: 'accounts/fireworks/models/llama-v2-7b-chat'
modelDisplayLabel: 'Fireworks'
dropParams: ['user']

Expand Down Expand Up @@ -302,8 +305,6 @@ endpoints:
fetch: true
titleConvo: true
titleModel: 'gpt-3.5-turbo'
summarize: false
summaryModel: 'gpt-3.5-turbo'
modelDisplayLabel: 'OpenRouter'

# Perplexity
Expand All @@ -322,8 +323,6 @@ endpoints:
fetch: false # fetching list of models is not supported
titleConvo: true
titleModel: 'sonar-medium-chat'
summarize: false
summaryModel: 'sonar-medium-chat'
dropParams: ['stop', 'frequency_penalty']
modelDisplayLabel: 'Perplexity'

Expand All @@ -336,8 +335,6 @@ endpoints:
fetch: true
titleConvo: true
titleModel: 'gemini-pro'
summarize: false
summaryModel: 'llama-summarize'
modelDisplayLabel: 'ShuttleAI'
dropParams: ['user']

Expand Down Expand Up @@ -396,8 +393,6 @@ endpoints:
fetch: false # fetching list of models is not supported
titleConvo: true
titleModel: 'togethercomputer/llama-2-7b-chat'
summarize: false
summaryModel: 'togethercomputer/llama-2-7b-chat'
modelDisplayLabel: 'together.ai'
```

Expand All @@ -417,7 +412,7 @@ This example configuration file sets up LibreChat with detailed options across s
- **Endpoints**:
- **Assistants**: Configures the assistants' endpoint with a polling interval and a timeout for operations, and provides an option to disable the builder interface.
- **Custom Endpoints**:
- Configures two external AI service endpoints, Mistral and OpenRouter, including API keys, base URLs, model handling, and specific feature toggles like conversation titles, summarization, and parameter adjustments.
- Configures two external AI service endpoints, Mistral and OpenRouter, including API keys, base URLs, model handling, and specific feature toggles like conversation titles and parameter adjustments.
- For Mistral, it enables dynamic model fetching, applies additional parameters for safe prompts, and explicitly drops unsupported parameters.
- For OpenRouter, it sets up a basic configuration without dynamic model fetching and specifies a model for conversation titles.

Expand Down Expand Up @@ -641,13 +636,7 @@ endpoints:
# titleMethod: "completion" # Defaults to "completion" if omitted.

# Title Model: Specify the model to use for titles.
titleModel: 'mistral-tiny' # Defaults to "gpt-3.5-turbo" if omitted.

# Summarize setting: Set to true to enable summarization.
# summarize: false

# Summary Model: Specify the model to use if summarization is enabled.
# summaryModel: "mistral-tiny" # Defaults to "gpt-3.5-turbo" if omitted.
titleModel: 'mistral-tiny' # Defaults to the conversation's model if omitted.

# The label displayed for the AI model in messages.
modelDisplayLabel: 'Mistral' # Default is "AI" when not set.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/configuration/librechat_yaml/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ If your server exits immediately after starting, this is likely a configuration

1. Check server logs: `docker compose logs api`
2. Validate your YAML syntax with the [YAML Validator](/toolkit/yaml_checker)
3. Common errors: incorrect indentation, missing colons, unknown keys, invalid values
3. Common errors: incorrect indentation, missing colons, invalid values, and unknown keys. An unknown or misspelled top-level key fails validation and stops the server. Inside nested blocks, strict ones (such as `telemetry`) reject unknown keys the same way, while others silently ignore them

**Temporary workaround** (not recommended for production):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ The `balance` object allows administrators to configure how token credit balance
- `refillIntervalValue`
- `refillIntervalUnit`
- `refillAmount`
- `refillMode`
- `reservationTtlMs`
- `display`

**Notes:**

Expand All @@ -34,6 +37,9 @@ balance:
refillIntervalValue: 30
refillIntervalUnit: "days"
refillAmount: 10000
refillMode: "add"
reservationTtlMs: 1800000
display: "credits"
```


Expand Down Expand Up @@ -123,7 +129,7 @@ balance:

<OptionTable
options={[
['refillIntervalUnit', 'String', 'Specifies the time unit for the refill interval (e.g., "days", "hours").', 'Indicates the unit of time for refillIntervalValue.'],
['refillIntervalUnit', 'String', 'Specifies the time unit for the refill interval. One of "seconds", "minutes", "hours", "days", "weeks", or "months".', 'Indicates the unit of time for refillIntervalValue.'],
]}
/>

Expand Down Expand Up @@ -154,4 +160,68 @@ balance:
```yaml filename="balance / refillAmount"
balance:
refillAmount: 10000
```
```


## refillMode

**Key:**

<OptionTable
options={[
['refillMode', 'String', 'Controls what a refill does. "add" adds refillAmount to the current balance; "reset" replaces the balance with refillAmount once the interval is due.', '"reset" requires refillIntervalValue to be a positive integer.'],
]}
/>

**Default:** `"add"`

**Example:**

```yaml filename="balance / refillMode"
balance:
autoRefillEnabled: true
refillMode: "reset"
refillIntervalValue: 1
refillIntervalUnit: "months"
refillAmount: 500000
```


## reservationTtlMs

**Key:**

<OptionTable
options={[
['reservationTtlMs', 'Integer', 'How long, in milliseconds, an unreleased in-flight balance reservation keeps counting against the balance.', 'Minimum: 10000. Live reservations are renewed every half interval.'],
]}
/>

**Default:** `1800000` (30 minutes)

**Example:**

```yaml filename="balance / reservationTtlMs"
balance:
reservationTtlMs: 1800000
```


## display

**Key:**

<OptionTable
options={[
['display', 'String', 'How the UI presents the balance. "credits" shows the raw figure, "currency" shows its currency value, and "percent" shows the share of the period\'s allotment already spent.', 'One of "credits", "currency", or "percent".'],
]}
/>

**Default:** `"credits"`

**Example:**

```yaml filename="balance / display"
balance:
display: "currency"
```
Loading
Loading