# Example (https://www.librechat.ai/docs/configuration/librechat_yaml/example)

## Clean Example

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

This example config includes all documented endpoints (Except Azure, LiteLLM, MLX, and Ollama, which all require additional configurations)

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

cache: true

# Optional deployment-level headers for one self-hosted Langfuse origin or gateway.
# Use environment references for credentials.
# langfuse:
#   headers:
#     CF-Access-Client-Id: '${CF_ACCESS_CLIENT_ID}'
#     CF-Access-Client-Secret: '${CF_ACCESS_CLIENT_SECRET}'

# skillSync:
#   github:
#     enabled: false
#     intervalMinutes: 60
#     runOnStartup: true
#     sources:
#       - id: librechat-skills
#         owner: your-org
#         repo: your-skills-repo
#         ref: main
#         paths:
#           - skills
#         skillDiscoveryDepth: 2
#         token: '${GITHUB_SKILLS_TOKEN}'
#         # credentialKey: production-skills
#         # tenantId: your-tenant-id

interface:
  # MCP Servers UI configuration
  mcpServers:
    placeholder: 'MCP Servers'
    toolsRefreshInterval: 300000
    statusRefreshInterval: 30000

  # Separate regular-chat retention applies only with retentionMode: "all".
  # temporaryChatRetention: 168
  # generalChatRetention: 2160
  # retentionMode: "all"
    # configureObo: false # Permission to configure MCP On-Behalf-Of token exchange

  # Shared Links permissions
  # sharedLinks:
  #   create: true
  #   share: true
  #   public: false
  #   snapshotFiles: true

  # Experimental Scheduled Chats (disabled when omitted)
  # Multi-replica deployments require USE_REDIS_STREAMS=true. A truly
  # single-process deployment without Redis must set SCHEDULES_SINGLE_PROCESS=true.
  # schedules:
  #   use: true
  #   create: true
  #   maxPerUser: 10
  #   minIntervalMinutes: 60
  #   autoDisableAfterFailures: 5
  #   admissionConcurrency: 20
  #   fireConcurrency: 5
  #   mcpPreflightConcurrency: 3
  #   mcpPreflightTimeoutMs: 300000
  #   requireProject: false
  #   # projectId: 'project-id' # Pins every schedule to one project and implies requireProject

  # Skills permissions and activation defaults
  # skills:
  #   use: true
  #   create: true
  #   share: false
  #   public: false
  #   defaultActiveOnShare: false

  # Retention mode: "temporary" applies only to temporary chats; "all" applies to all retained data
  # retentionMode: "temporary"
  # generalChatRetention: 2160 # Regular chats under retentionMode: "all"
  # retainAgentFiles: false # Keep persistent agent resource files when retentionMode is "all"

  # Privacy policy settings
  privacyPolicy:
    externalUrl: 'https://librechat.ai/privacy-policy'
    openNewTab: true

  # Terms of service
  termsOfService:
    externalUrl: 'https://librechat.ai/tos'
    openNewTab: true

  # Context usage and cost display
  # contextUsage: true
  # contextCost: true
  # currency:
  #   code: EUR
  #   rate: 0.92

  # Show the thumbs up/thumbs down feedback buttons on responses (default: true)
  # feedback: true

  # Default prompt-bar pinned tools for users who have not customized pins
  # defaultPinnedTools:
  #   - artifacts
  #   - execute_code
  #   - mcp

registration:
  socialLogins: ['discord', 'facebook', 'github', 'google', 'openid']

# Source-aware content filters are disabled when omitted. This policy is
# base-config-only and cannot be changed through database overrides.
# filters:
#   messages:
#     pii:
#       action: audit # `block` (default) or `audit`
#       fields: [text, summary, attachment_reference]
#       starterPatterns: [sk_prefix, bearer_header, api_key_header]
#   files:
#     pii:
#       fields: [name, content, extracted_text, transcript]
#       uninspectable: allow

endpoints:
  # agents:
  #   maxSubagents: 20 # Default: 10; valid range: 1-50
  #   codeApiUploadConcurrency: 3
  #   codeApiMaxRetryWaitMs: 20000
  #   eventDriven:
  #     selfUrl: 'https://librechat.internal' # Usually omitted; only for trusted internal HTTP admission
  #   # Stateful Code Sessions are highly experimental and opt-in through capabilities.
  #   statefulCodeSessions:
  #     allowedEnvironments: ['user', 'agent-user', 'conversation']
  #     principalWorkers:
  #       enabled: true
  #       maxPerUser: 5
  #     environments:
  #       - id: managed-default
  #         name: Managed Code API
  #         type: managed
  #         baseURL: https://code.example.com/v1
  #         default: true
  #       - id: engineering-vm
  #         name: Engineering VM
  #         type: attached
  #         baseURL: https://code-bridge.example.com/v1
  #         # Pins an administrator-managed environment to one worker.
  #         pairing:
  #           workerId: engineering-vm
  #           tokenEnv: CODE_BRIDGE_ADMIN_TOKEN
  #       - id: personal-workers
  #         name: Personal Code Workers
  #         type: attached
  #         baseURL: https://code-bridge.example.com/v1
  #         configSchema:
  #           limits:
  #             maxCommandTimeoutMs: 120000
  #           permissions:
  #             fileWrite:
  #               allowed: [allow, ask, deny]
  #               default: ask
  #             commandExecution:
  #               allowed: [ask, deny]
  #               default: ask
  #         # Lets authorized users pair owner-bound outbound workers.
  #         pairing:
  #           allowPrincipalWorkers: true
  #           tokenEnv: CODE_BRIDGE_ADMIN_TOKEN
  #   # Automatic completion delivery is on by default. Set false for poll-only background tasks.
  #   backgroundTasks:
  #     completionWakeups: true
  #     ordinaryToolCancellation: false
  #   # Beta machine-to-machine Agent and Skill management API.
  #   managementApi:
  #     auth:
  #       oidc:
  #         issuer: https://idp.example.com
  #         audience: librechat-management
  #       clients:
  #         - clientId: automation-client
  #           userId: '000000000000000000000000'

  custom:
    # Anyscale
    - name: 'Anyscale'
      apiKey: '${ANYSCALE_API_KEY}'
      baseURL: 'https://api.endpoints.anyscale.com/v1'
      models:
        default: ['meta-llama/Llama-2-7b-chat-hf']
        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
    - name: 'APIpie'
      apiKey: '${APIPIE_API_KEY}'
      baseURL: 'https://apipie.ai/v1/'
      models:
        default:
          [
            'gpt-4',
            'gpt-4-turbo',
            'gpt-3.5-turbo',
            'claude-3-opus',
            'claude-3-sonnet',
            'claude-3-haiku',
            'llama-3-70b-instruct',
            'llama-3-8b-instruct',
            'gemini-pro-1.5',
            'gemini-pro',
            'mistral-large',
            'mistral-medium',
            'mistral-small',
            'mistral-tiny',
            'mixtral-8x22b',
          ]
        fetch: false
      titleConvo: true
      titleModel: 'gpt-3.5-turbo'
      dropParams: ['stream']

    #cohere
    - name: 'cohere'
      apiKey: '${COHERE_API_KEY}'
      baseURL: 'https://api.cohere.ai/v1'
      models:
        default:
          [
            'command-r',
            'command-r-plus',
            'command-light',
            'command-light-nightly',
            'command',
            'command-nightly',
          ]
        fetch: false
      modelDisplayLabel: 'cohere'
      titleModel: 'command'
      dropParams: ['stop', 'user', 'frequency_penalty', 'presence_penalty', 'temperature', 'top_p']

    # Fireworks
    - name: 'Fireworks'
      apiKey: '${FIREWORKS_API_KEY}'
      baseURL: 'https://api.fireworks.ai/inference/v1'
      models:
        default: ['accounts/fireworks/models/mixtral-8x7b-instruct']
        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']

    # groq
    - name: 'groq'
      apiKey: '${GROQ_API_KEY}'
      baseURL: 'https://api.groq.com/openai/v1/'
      models:
        default:
          [
            'llama2-70b-4096',
            'llama3-70b-8192',
            'llama3-8b-8192',
            'mixtral-8x7b-32768',
            'gemma-7b-it',
          ]
        fetch: false
      titleConvo: true
      titleModel: 'mixtral-8x7b-32768'
      modelDisplayLabel: 'groq'

    # Mistral AI API
    - name: 'Mistral'
      apiKey: '${MISTRAL_API_KEY}'
      baseURL: 'https://api.mistral.ai/v1'
      models:
        default: ['mistral-tiny', 'mistral-small', 'mistral-medium', 'mistral-large-latest']
        fetch: true
      titleConvo: true
      titleModel: 'mistral-tiny'
      modelDisplayLabel: 'Mistral'
      dropParams: ['stop', 'user', 'frequency_penalty', 'presence_penalty']

    # OpenRouter.ai
    - name: 'OpenRouter'
      apiKey: '${OPENROUTER_KEY}'
      baseURL: 'https://openrouter.ai/api/v1'
      models:
        default: ['openai/gpt-3.5-turbo']
        fetch: true
      titleConvo: true
      titleModel: 'gpt-3.5-turbo'
      summarize: false
      summaryModel: 'gpt-3.5-turbo'
      modelDisplayLabel: 'OpenRouter'

    # Perplexity
    - name: 'Perplexity'
      apiKey: '${PERPLEXITY_API_KEY}'
      baseURL: 'https://api.perplexity.ai/'
      models:
        default:
          [
            'mistral-7b-instruct',
            'sonar-small-chat',
            'sonar-small-online',
            'sonar-medium-chat',
            'sonar-medium-online',
          ]
        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'

    # ShuttleAI API
    - name: 'ShuttleAI'
      apiKey: '${SHUTTLEAI_API_KEY}'
      baseURL: 'https://api.shuttleai.app/v1'
      models:
        default: ['shuttle-1', 'shuttle-turbo']
        fetch: true
      titleConvo: true
      titleModel: 'gemini-pro'
      summarize: false
      summaryModel: 'llama-summarize'
      modelDisplayLabel: 'ShuttleAI'
      dropParams: ['user']

    # together.ai
    - name: 'together.ai'
      apiKey: '${TOGETHERAI_API_KEY}'
      baseURL: 'https://api.together.xyz'
      models:
        default:
          [
            'zero-one-ai/Yi-34B-Chat',
            'Austism/chronos-hermes-13b',
            'DiscoResearch/DiscoLM-mixtral-8x7b-v2',
            'Gryphe/MythoMax-L2-13b',
            'lmsys/vicuna-13b-v1.5',
            'lmsys/vicuna-7b-v1.5',
            'lmsys/vicuna-13b-v1.5-16k',
            'codellama/CodeLlama-13b-Instruct-hf',
            'codellama/CodeLlama-34b-Instruct-hf',
            'codellama/CodeLlama-70b-Instruct-hf',
            'codellama/CodeLlama-7b-Instruct-hf',
            'togethercomputer/llama-2-13b-chat',
            'togethercomputer/llama-2-70b-chat',
            'togethercomputer/llama-2-7b-chat',
            'NousResearch/Nous-Capybara-7B-V1p9',
            'NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO',
            'NousResearch/Nous-Hermes-2-Mixtral-8x7B-SFT',
            'NousResearch/Nous-Hermes-Llama2-70b',
            'NousResearch/Nous-Hermes-llama-2-7b',
            'NousResearch/Nous-Hermes-Llama2-13b',
            'NousResearch/Nous-Hermes-2-Yi-34B',
            'openchat/openchat-3.5-1210',
            'Open-Orca/Mistral-7B-OpenOrca',
            'togethercomputer/Qwen-7B-Chat',
            'snorkelai/Snorkel-Mistral-PairRM-DPO',
            'togethercomputer/alpaca-7b',
            'togethercomputer/falcon-40b-instruct',
            'togethercomputer/falcon-7b-instruct',
            'togethercomputer/GPT-NeoXT-Chat-Base-20B',
            'togethercomputer/Llama-2-7B-32K-Instruct',
            'togethercomputer/Pythia-Chat-Base-7B-v0.16',
            'togethercomputer/RedPajama-INCITE-Chat-3B-v1',
            'togethercomputer/RedPajama-INCITE-7B-Chat',
            'togethercomputer/StripedHyena-Nous-7B',
            'Undi95/ReMM-SLERP-L2-13B',
            'Undi95/Toppy-M-7B',
            'WizardLM/WizardLM-13B-V1.2',
            'garage-bAInd/Platypus2-70B-instruct',
            'mistralai/Mistral-7B-Instruct-v0.1',
            'mistralai/Mistral-7B-Instruct-v0.2',
            'mistralai/Mixtral-8x7B-Instruct-v0.1',
            'teknium/OpenHermes-2-Mistral-7B',
            'teknium/OpenHermes-2p5-Mistral-7B',
            'upstage/SOLAR-10.7B-Instruct-v1.0',
          ]
        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'
```

</Callout>

## Example with Comments

This example configuration file sets up LibreChat with detailed options across several key areas:

- **Caching**: Enabled to improve performance.
- **File Handling**:
  - **File Strategy**: Commented out but hints at possible integration with Firebase for file storage.
  - **File Configurations**: Customizes file upload limits and allowed MIME types for different endpoints, including a global server file size limit and a specific limit for user avatar images.
- **Rate Limiting**: Defines thresholds for the maximum number of file uploads allowed per IP and user within a specified time window, aiming to prevent abuse.
- **Registration**:
  - Allows registration from specified social login providers and email domains, enhancing security and user management.
- **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.
    - 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.

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

```yaml filename="librechat.yaml"
# For more information, see the Configuration Guide:
# https://www.librechat.ai/docs/configuration/librechat_yaml

# Configuration version (required)
version: 1.3.17

# Cache settings: Set to true to enable caching
cache: true

# Custom interface configuration
interface:
  # MCP Servers UI configuration
  mcpServers:
    placeholder: 'MCP Servers'
    toolsRefreshInterval: 300000
    statusRefreshInterval: 30000

  # Experimental Scheduled Chats are disabled when omitted.
  # schedules:
  #   use: true
  #   create: true
  #   maxPerUser: 10
  #   minIntervalMinutes: 60
  #   autoDisableAfterFailures: 5
  #   admissionConcurrency: 20
  #   fireConcurrency: 5
  #   mcpPreflightConcurrency: 3
  #   mcpPreflightTimeoutMs: 300000
  #   requireProject: false
  #   # projectId: 'project-id' # Pins every schedule to one project and implies requireProject

  # Show the thumbs up/thumbs down feedback buttons on responses (default: true)
  # feedback: true

  # Privacy policy settings
  privacyPolicy:
    externalUrl: 'https://librechat.ai/privacy-policy'
    openNewTab: true

  # Terms of service
  termsOfService:
    externalUrl: 'https://librechat.ai/tos'
    openNewTab: true

# Changing the registered email address from Settings > Account.
# Omitted, these fall back to ALLOW_EMAIL_CHANGE and a 15-minute link.
# emailChange:
#   enabled: true
#   tokenTTLSeconds: 900

# Passkey (WebAuthn) enrollment limits.
# Omitted, perUserMax falls back to MAX_PASSKEYS_PER_USER, then 20.
# passkeys:
#   perUserMax: 20

# Example Registration Object Structure (optional)
registration:
  socialLogins: ['github', 'google', 'discord', 'openid', 'facebook']
  # allowedDomains:
  # - "gmail.com"

# rateLimits:
#   agentEvents:
#     userMax: 40
#     userWindowInMinutes: 1
#   fileUploads:
#     ipMax: 100
#     ipWindowInMinutes: 60  # Rate limit window for file uploads per IP
#     userMax: 50
#     userWindowInMinutes: 60  # Rate limit window for file uploads per user
#   conversationsImport:
#     ipMax: 100
#     ipWindowInMinutes: 60  # Rate limit window for conversation imports per IP
#     userMax: 50
#     userWindowInMinutes: 60  # Rate limit window for conversation imports per user
#   # Asking for a change of the registered email, per authenticated user.
#   emailChange:
#     userMax: 3
#     userWindowInMinutes: 2
#   # Opening a verification link. The endpoint is unauthenticated, so the source
#   # address is bounded as well as the account the link names.
#   emailChangeConfirm:
#     ipMax: 20
#     ipWindowInMinutes: 2
#     userMax: 2
#     userWindowInMinutes: 2

# Source-aware content filters are disabled when omitted. `filters` is loaded
# only from the base config; role, group, and user overrides cannot change it.
# filters:
#   messages:
#     unattributedAssistantContent: model_output
#     pii:
#       action: audit # `block` (default) or `audit`
#       fields: [text, summary, attachment_reference]
#       starterPatterns: [sk_prefix, bearer_header, api_key_header]
#   files:
#     pii:
#       fields: [name, content, extracted_text, transcript]
#       uninspectable: allow
#   skills:
#     pii:
#       fields: [name, description, instructions, imported_text, file_text]

# Definition of custom endpoints
endpoints:
  # all:
  #   headers:
  #     X-App: 'librechat'
  # openAI:
  #   headers:
  #     X-Gateway-Metadata: '{"user_email":"{{LIBRECHAT_USER_EMAIL}}"}'
  # anthropic:
  #   headers:
  #     X-Conversation-Id: '{{LIBRECHAT_BODY_CONVERSATIONID}}'
  # google:
  #   headers:
  #     X-Gateway-Metadata: '{"user_id":"{{LIBRECHAT_USER_ID}}"}'

  # assistants:
  #   disableBuilder: false # Disable Assistants Builder Interface by setting to `true`
  #   pollIntervalMs: 750  # Polling interval for checking assistant updates
  #   timeoutMs: 180000  # Timeout for assistant operations
  #   # Should only be one or the other, either `supportedIds` or `excludedIds`
  #   supportedIds: ["asst_supportedAssistantId1", "asst_supportedAssistantId2"]
  #   # excludedIds: ["asst_excludedAssistantId"]
  #   Only show assistants that the user created or that were created externally (e.g. in Assistants playground).
  #   # privateAssistants: false # Does not work with `supportedIds` or `excludedIds`
  #   # (optional) Models that support retrieval, will default to latest known OpenAI models that support the feature
  #   retrievalModels: ["gpt-4-turbo-preview"]
  #   # (optional) Assistant Capabilities available to all users. Omit the ones you wish to exclude. Defaults to list below.
  #   capabilities: ["code_interpreter", "retrieval", "actions", "tools", "image_vision"]
  # agents:
  #   titleTiming: immediate # "immediate" (default) or "final"
  #   maxSubagents: 20 # Maximum explicit subagents per agent; default 10, hard cap 50
  #   codeApiUploadConcurrency: 3
  #   codeApiMaxRetryWaitMs: 20000
  #   maxToolCallArgBytes: 65536 # 64 KiB per streamed tool call; 0 disables the global guard
  #   maxDeltaEventsPerTurn: 100000 # Optional event cap; omitted or 0 disables it
  #   maxToolCallArgBytesByTool:
  #     create_file: 131072 # Overrides the global limit for this tool; 0 disables its guard
  #   eventDriven:
  #     selfUrl: 'https://librechat.internal' # Usually omitted; only for trusted internal HTTP admission
  #   # Automatic completion delivery is on by default. Set false for poll-only background tasks.
  #   backgroundTasks:
  #     completionWakeups: true
  #     ordinaryToolCancellation: false
  #   skills:
  #     maxCatalogSkills: 20
  #   # Beta machine-to-machine Agent and Skill management API.
  #   managementApi:
  #     auth:
  #       oidc:
  #         issuer: https://idp.example.com
  #         audience: librechat-management
  #       clients:
  #         - clientId: automation-client
  #           userId: '000000000000000000000000'
  custom:
    # Anthropic-compatible Example (native /v1/messages API)
    # - name: 'Claude-Compatible'
    #   provider: 'anthropic'
    #   apiKey: '${ANTHROPIC_API_KEY}'
    #   baseURL: 'https://api.anthropic.com'
    #   headers:
    #     anthropic-version: '2023-06-01'
    #   models:
    #     default:
    #       - 'claude-sonnet-4-5'
    #       - 'claude-opus-4-5'
    #     fetch: false
    #   titleConvo: true
    #   titleModel: 'claude-sonnet-4-5'
    #   modelDisplayLabel: 'Claude (Compatible)'

    # Groq Example
    - name: 'groq'
      apiKey: '${GROQ_API_KEY}'
      baseURL: 'https://api.groq.com/openai/v1/'
      models:
        default:
          [
            'llama3-70b-8192',
            'llama3-8b-8192',
            'llama2-70b-4096',
            'mixtral-8x7b-32768',
            'gemma-7b-it',
          ]
        fetch: false
      titleConvo: true
      titleModel: 'mixtral-8x7b-32768'
      modelDisplayLabel: 'groq'

    # Mistral AI Example
    - name: 'Mistral' # Unique name for the endpoint
      # For `apiKey` and `baseURL`, you can use environment variables that you define.
      # recommended environment variables:
      apiKey: '${MISTRAL_API_KEY}'
      baseURL: 'https://api.mistral.ai/v1'

      # Models configuration
      models:
        # List of default models to use. At least one value is required.
        default: ['mistral-tiny', 'mistral-small', 'mistral-medium']
        # Fetch option: Set to true to fetch models from API.
        fetch: true # Defaults to false.

      # Optional configurations

      # Title Conversation setting
      titleConvo: true # Set to true to enable title conversation
      # titleTiming: "immediate" # Generate titles immediately, or use "final" for legacy behavior

      # Title Method: Choose between "completion" or "functions".
      # 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.

      # The label displayed for the AI model in messages.
      modelDisplayLabel: 'Mistral' # Default is "AI" when not set.

      # Add additional parameters to the request. Default params will be overwritten.
      # addParams:
      # safe_prompt: true # This field is specific to Mistral AI: https://docs.mistral.ai/api/

      # Custom endpoint behavior flags, not sent directly as provider params.
      # customParams:
      #   reasoningFormat: reasoning_object # reasoning_effort, reasoning_object, or disabled
      #   reasoningKey: reasoning_content # reasoning or reasoning_content

      # Optional per-model context window and pricing for usage/cost tracking
      # tokenConfig:
      #   mistral-large-latest:
      #     prompt: 2
      #     completion: 6
      #     context: 128000

      # Drop Default params parameters from the request. See default params in guide linked below.
      # 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']

    # OpenRouter Example
    - name: 'OpenRouter'
      # For `apiKey` and `baseURL`, you can use environment variables that you define.
      # recommended environment variables:
      # Known issue: you should not use `OPENROUTER_API_KEY` as it will then override the `openAI` endpoint to use OpenRouter as well.
      apiKey: '${OPENROUTER_KEY}'
      baseURL: 'https://openrouter.ai/api/v1'
      models:
        default: ['meta-llama/llama-3-70b-instruct']
        fetch: true
      titleConvo: true
      titleModel: 'meta-llama/llama-3-70b-instruct'
      # Recommended: Drop the stop parameter from the request as Openrouter models use a variety of stop tokens.
      dropParams: ['stop']
      modelDisplayLabel: 'OpenRouter'

# modelSpecs:
#   list:
#     - name: "default-assistant"
#       label: "Default Assistant"
#       softDefault: true # First-time default only; does not override later user selections
#       showOnLanding: true # Show this spec label/description on the chat landing
#       conversation_starters:
#         - "Draft a project plan"
#         - "Summarize this document"
#       skills:
#         - "brand-guidelines"
#       subagents:
#         enabled: true
#         allowSelf: true
#         agent_ids: []
#       preset:
#         endpoint: "agents"
#         model: "gpt-4o"

# messageFilter:
#   pii:
#     starterPatterns: [sk_prefix, bearer_header, api_key_header]
#     # Custom patterns use RE2 syntax. Backreferences and lookaround are unsupported.
#     # Invalid patterns are rejected when LibreChat loads the configuration.
#     customPatterns:
#       - id: anthropic_api_key
#         label: Anthropic API key
#         regex: "sk-ant-[A-Za-z0-9_-]{20,}"

# Speech, OCR, and web-search connections block private destinations at connect time.
# Use exact private host:port exemptions only for trusted self-hosted services.
# speech:
#   tts:
#     allowedAddresses: ['tts.internal:8080']
#   stt:
#     allowedAddresses: ['stt.internal:8080']
# ocr:
#   allowedAddresses: ['ocr.internal:8080']
# webSearch:
#   allowedAddresses: ['searxng:8080']
#
# A fully keyless Keenable stack (optional keys only raise public rate limits):
# webSearch:
#   searchProvider: keenable
#   scraperProvider: keenable
#   rerankerType: none
#   # keenableApiKey: '${KEENABLE_API_KEY}'
#   # keenableApiUrl: '${KEENABLE_API_URL}' # Search only; fetch uses KEENABLE_FETCH_URL
#   keenableSearchOptions:
#     maxResults: 8
#     # site: example.com
#     # attributionTitle: LibreChat
#     # timeout: 15000
#   keenableScraperOptions:
#     # attributionTitle: LibreChat
#     timeout: 15000

# fileConfig:
#   # Unified upload routing; set legacyFileUploadUX: true to restore the destination chooser.
#   defaultLLMDeliveryPath:
#     fallback: text
#     overrides:
#       "image/*": provider
#       "video/*": none
#   legacyFileUploadUX: false
#   endpoints:
#     assistants:
#       fileLimit: 5
#       fileSizeLimit: 10  # Maximum size for an individual file in MB
#       totalSizeLimit: 50  # Maximum total size for all files in a single request in MB
#       supportedMimeTypes:
#         # RE2 syntax: backreferences and lookaround are unsupported.
#         - "image/.*"
#         - "application/pdf"
#     openAI:
#       disabled: true  # Disables file uploading to the OpenAI endpoint
#     default:
#       totalSizeLimit: 20
#     YourCustomEndpointName:
#       fileLimit: 2
#       fileSizeLimit: 5
#   serverFileSizeLimit: 100  # Global server file size limit in MB
#   avatarSizeLimit: 2  # Limit for user avatar image size in MB
# See the Custom Configuration Guide for more information:
# https://www.librechat.ai/docs/configuration/librechat_yaml
```

</Callout>
