Skip to main content
LibreChat is joining ClickHouse to power the open-source Agentic Data Stack 🎉 Learn more
LibreChat

Shared Endpoint Settings

This page describes the shared configuration settings for all endpoints. The settings highlighted here are available to all configurations under the "Endpoints" field unless noted otherwise.

Example Configuration

endpoints:
  # Individual endpoint configurations
  openAI:
    streamRate: 25
    titleModel: 'gpt-4o-mini'
    titleMethod: 'completion'
    titleTiming: 'immediate'
    titlePrompt: "Create a concise title for this conversation:\n\n{convo}"
    headers:
      X-Gateway-Metadata: '{"user_email":"{{LIBRECHAT_USER_EMAIL}}"}'

  azureOpenAI:
    streamRate: 35
    titleModel: 'grok-3'
    titleMethod: 'structured'
    titlePrompt: |
      Analyze this conversation and provide:
      1. A concise title in the detected language (5 words or less, no punctuation or quotation)
      2. Always provide a relevant emoji at the start of the title

      {convo}
    titleConvo: true

  anthropic:
    streamRate: 25
    titleModel: 'claude-3-5-haiku-20241022'
    titleMethod: 'completion'
    headers:
      X-Conversation-Id: '{{LIBRECHAT_BODY_CONVERSATIONID}}'

  bedrock:
    streamRate: 25
    titleModel: 'us.amazon.nova-lite-v1:0'
    titleEndpoint: 'anthropic'

  google:
    streamRate: 25
    titleModel: 'gemini-2.0-flash-lite'
    titlePromptTemplate: "Human: {input}\nAssistant: {output}"
    headers:
      X-Gateway-Metadata: '{"user_id":"{{LIBRECHAT_USER_ID}}"}'

  assistants:
    streamRate: 30

  azureAssistants:
    streamRate: 30

  agents:
    activityLabel: true
    activityEndpoint: 'openAI'
    activityModel: 'gpt-4.1-nano'
    activityMaxPerRun: 20
    activityCharLimit: 600
    activityPhaseLabel: true
    activityPhaseMaxPerRun: 5

  # Global configuration using 'all' - this applies shared settings across endpoints.
  # Most defined values override endpoint defaults; headers are merged and endpoint values win on collisions.
  all:
    headers:
      X-App: 'librechat'
    titleConvo: true
    titleModel: 'gpt-4.1-nano'
    titleTiming: 'immediate'
    titlePrompt: |
      Analyze this conversation and provide:
      1. The detected language of the conversation
      2. A concise title in the detected language (5 words or less, no punctuation or quotation)
      3. Always provide a relevant emoji at the start of the title
      {convo}

Important: When using the all configuration, most shared properties you define apply across endpoints. In the example above, the all configuration would apply titleConvo, titleModel, and titlePrompt to all endpoints, while individual streamRate settings would be preserved since it's not defined in all. headers are merged separately: values from endpoints.all.headers apply globally, and endpoint-level headers win on key collisions. Activity settings resolve field by field in the same order, so an unrelated all setting does not hide an endpoint's activity configuration.

streamRate

Key:

KeyTypeDescriptionExample
streamRateNumberThe rate at which data is streamed from the endpoint. Useful for controlling the pace of streaming data.streamRate: 25

Default: Provider-dependent. OpenAI, custom endpoints, Anthropic, Google, Bedrock, and Agents SDK-backed streams use adaptive smoothing with a 25 ms target. Legacy Assistants and Ollama handlers retain their per-provider-chunk behavior, with a 1 ms default.

Adaptive smoothing emits the first text token without delay, increases chunk size when a stream falls behind, and preserves tool-call and metadata ordering. Set streamRate to a non-negative millisecond target; streamRate: 0 disables adaptive smoothing on the SDK-backed providers listed above.

An endpoint-specific value is preserved when endpoints.all exists without streamRate. Defining endpoints.all.streamRate overrides endpoint values, including an explicit 0.

titleConvo

Key:

KeyTypeDescriptionExample
titleConvoBooleanEnables automatic conversation title generation for this endpoint.titleConvo: true

Default: false

Notes:

  • When enabled, titles will be generated automatically using the configured title settings
  • Must be used in conjunction with titleModel or the endpoint must have a default model available

Example:

titleConvo: true

titleTiming

Key:

KeyTypeDescriptionExample
titleTimingStringControls when conversation titles are generated. Valid values: "immediate" or "final".titleTiming: "immediate"

Default: "immediate"

Available Values:

  • "immediate" - Generates the title as soon as the request starts, in parallel with the model response, using the user's first message. Titles usually appear within a second or two.
  • "final" - Defers title generation until the full response completes. This preserves the legacy behavior.

Example:

endpoints:
  all:
    titleTiming: 'immediate'

titleModel

Key:

KeyTypeDescriptionExample
titleModelStringSpecifies the model to use for titles.Defaults to system default for the current endpoint if omitted. May cause issues if the system default model is not available. You can also dynamically use the current conversation model by setting it to "current_model".

Default: System default for the current endpoint

titleMethod

Key:

KeyTypeDescriptionExample
titleMethodStringControls the method used for generating conversation titles.Valid values: "completion" (default), "structured", "functions" (legacy alias for "structured")

Default: "completion"

Available Methods:

  • "completion" - Uses standard completion API without tools/functions. Compatible with most LLMs.
  • "structured" - Uses structured output for title generation. Requires provider/model support.
  • "functions" - Legacy alias for "structured". Functionally identical.

Example:

titleMethod: 'completion'

titlePrompt

Key:

KeyTypeDescriptionExample
titlePromptStringCustom prompt for title generation. Must include {convo} placeholder.Allows full control over how titles are generated.

Default:

Analyze this conversation and provide:
1. The detected language of the conversation
2. A concise title in the detected language (5 words or less, no punctuation or quotation)

{convo}

Notes:

  • Must always include the {convo} placeholder
  • The {convo} placeholder will be replaced with the formatted conversation
  • Can be placed anywhere in the prompt

Example:

titlePrompt: "Create a brief, descriptive title for the following conversation:\n\n{convo}\n\nTitle:"

titlePromptTemplate

Key:

KeyTypeDescriptionExample
titlePromptTemplateStringTemplate for formatting the conversation content that replaces {convo} in titlePrompt.Must include {input} and {output} placeholders.

Default: "User: {input}\nAI: {output}"

Notes:

  • Must include both {input} and {output} placeholders
  • {input} is replaced with the user's initial message
  • {output} is replaced with the AI's response
  • The formatted result replaces {convo} in the titlePrompt

Example:

titlePromptTemplate: "Human: {input}\n\nAssistant: {output}"

titleEndpoint

Key:

KeyTypeDescriptionExample
titleEndpointStringSpecifies an alternative endpoint to use for title generation.Allows using a different, potentially cheaper model/endpoint for titles.

Default: Uses the current conversation's endpoint

Accepted Values:

  • openAI
  • azureOpenAI
  • google
  • anthropic
  • bedrock
  • For custom endpoints: use the exact custom endpoint name

Example:

# Use Anthropic for titles even when chatting with OpenAI
endpoints:
  openAI:
    titleEndpoint: 'anthropic'
    # Will use anthropic's configuration for title generation

Agent Activity Groups

Activity groups make long Agent runs easier to scan by collapsing each contiguous block of reasoning and tool calls under a generated one-line header. Header generation runs outside the main model-response path, but it is still a model call and its usage is recorded and billed.

With parent phase labels enabled, short progress text stays inside the active phase. A phase closes before substantial answer text so the result remains outside the collapsed summary, and a later block of reasoning or tool calls can begin another phase in the same run. LibreChat also rebases saved phase boundaries when malformed or omitted content is compacted, preserving their alignment after reload.

KeyTypeDescriptionExample
activityLabelBooleanEnables generated activity-group headers for Agent runs using this endpoint.false
activityModelStringModel used to generate headers. Falls back to titleModel, then the Agent run model. Use current_model to select the run model explicitly.
activityEndpointStringEndpoint whose credentials are used for header generation. Defaults to the Agent model provider.
activityPromptStringOverrides the prompt used to generate the one-line header.
activityMaxPerRunPositive integerMaximum generated activity headers per response, limiting additional model calls.20
activityCharLimitPositive integerMaximum characters from each tool input or output entry included in the header prompt.600
activityPhaseLabelBooleanGenerates a collapsed parent summary for each run phase containing at least two activities.false
activityPhaseModelStringModel used for parent phase summaries. Falls back to activityModel, titleModel, then the Agent run model.
activityPhaseEndpointStringEndpoint whose credentials are used for phase summaries. Falls back to activityEndpoint, then the Agent provider.
activityPhasePromptStringOverrides the prompt used to generate parent phase summaries.
activityPhaseMaxPerRunPositive integerMaximum generated parent phase summaries per response.5
endpoints:
  agents:
    activityLabel: true
    activityEndpoint: 'openAI'
    activityModel: 'gpt-4.1-nano'
    activityMaxPerRun: 20
    activityCharLimit: 600
    activityPhaseLabel: true
    activityPhaseMaxPerRun: 5

You can also set these fields under endpoints.all or a backing provider/custom endpoint. Values resolve independently, with the first defined value winning in this order: endpoints.all, the public agents endpoint, then the backing provider or custom endpoint. If activityEndpoint is unknown, LibreChat logs a warning and uses the Agent's provider instead.

Parent phase summaries are independent of child activity labels: activityPhaseLabel can be enabled with or without activityLabel. LibreChat spends a phase-summary model call only for a phase containing at least two logical activities. activityCharLimit also bounds the evidence used for phase summaries. Phase model selection resolves through activityPhaseModel, activityModel, the originating endpoint's titleModel, then the current run model; phase endpoint selection resolves through activityPhaseEndpoint, activityEndpoint, then the Agent provider. An unknown configured phase endpoint logs a warning and falls back to the Agent provider.

maxToolResultChars

Key:

KeyTypeDescriptionExample
maxToolResultCharsNumberLimits the maximum number of characters in tool call results sent to the model. Must be a positive number.maxToolResultChars: 50000

Default: No limit

Notes:

  • Helps prevent excessively large tool outputs from consuming too many tokens
  • Applies to all tool call results for the endpoint

Example:

endpoints:
  all:
    maxToolResultChars: 50000

headers

Key:

KeyTypeDescriptionExample
headersObject/DictionaryCustom request headers forwarded to supported built-in provider endpoints.Useful for AI gateways and reverse proxies that consume metadata headers while LibreChat keeps provider-native request formatting.

Supported endpoints: openAI, anthropic, google, and all.

Example:

endpoints:
  all:
    headers:
      X-App: 'librechat'
  anthropic:
    headers:
      X-Conversation-Id: '{{LIBRECHAT_BODY_CONVERSATIONID}}'

Notes:

  • Values support ${ENV_VAR}, {{LIBRECHAT_USER_*}}, and request-body placeholders such as {{LIBRECHAT_BODY_CONVERSATIONID}}.
  • At the final outbound resolution step, recognized user, request-body, and OpenID placeholders without a value become empty strings instead of being forwarded as template text. Unknown placeholder names remain unchanged so configuration typos are visible.
  • Endpoint-level headers override endpoints.all.headers on key collisions.
  • Provider-managed auth and required beta/protocol headers remain authoritative. Anthropic beta values are merged so custom beta flags do not clobber required provider flags.
  • Headers are also forwarded for supported provider model-list requests.
  • Use metadata headers behind a gateway or reverse proxy that consumes them. Native provider APIs typically ignore unknown headers.

Notes:

  • All settings shown on this page can be configured individually per endpoint or globally using the all key
  • When using the all configuration, it will override the corresponding settings in ALL individual endpoints
  • The all key does not accept baseURL
  • Settings not defined in all will preserve their individual endpoint values
  • For streamRate: Values between 25-40 are recommended where endpoint-specific smoothing is desired
  • Using a higher stream rate is a must when serving the app to many users at scale

Example of Override Behavior:

endpoints:
  openAI:
    streamRate: 25 # This will be preserved
    titleModel: 'gpt-4' # This will be overridden
    titleConvo: false # This will be overridden

  all:
    titleConvo: true
    titleModel: 'gpt-3.5-turbo'
    # streamRate not defined here, so individual values are kept

Endpoint Settings

How is this guide?