사용자 지정 endpoint 객체 구조
custom 배열의 각 endpoint는 다음 구조를 가져야 합니다:
예시
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
titleTiming: 'immediate'
titleModel: 'mistral-tiny'
modelDisplayLabel: 'Mistral'
# customParams:
# reasoningFormat: reasoning_object
# reasoningKey: reasoning_content
# tokenConfig:
# mistral-large-latest:
# prompt: 2
# completion: 6
# context: 128000
# 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']
# Example using the native Anthropic 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)'name
키:
| Key | Type | Description | Example |
|---|---|---|---|
| name | String | endpoint의 고유한 이름입니다. | Will be used as the "title" in the Endpoints Selector |
필수
예시:
name: 'Mistral'apiKey
키:
| Key | Type | Description | Example |
|---|---|---|---|
| apiKey | String (apiKey | "user_provided") | 해당 서비스의 API 키입니다. 환경 변수를 참조하거나 사용자가 값을 직접 입력하도록 설정할 수 있습니다. | It's highly recommended to use the env. variable reference for this field, i.e. `${YOUR_VARIABLE}` |
필수
예시:
apiKey: '${MISTRAL_API_KEY}'또는
apiKey: 'your_api_key'또는
apiKey: 'user_provided'baseURL
키:
| Key | Type | Description | Example |
|---|---|---|---|
| baseURL | String (baseURL | "user_provided") | API의 Base URL입니다. 환경 변수를 참조하거나 사용자가 값을 직접 입력하도록 허용할 수 있습니다. | It's highly recommended to use the env. variable reference for this field, i.e. `${YOUR_VARIABLE}` |
필수
예시:
baseURL: 'https://api.mistral.ai/v1'또는
baseURL: '${MISTRAL_BASE_URL}'또는
baseURL: 'user_provided'참고:
- 설정한
baseURL이 전체 completions 엔드포인트인 경우, directEndpoint 필드를true로 설정하여 직접 사용할 수 있습니다.- 앱이 기본적으로
baseURL뒤에 "/chat/completions" 또는 "/completion"을 추가하기 때문에 이 작업이 필요합니다.
- 앱이 기본적으로
provider: anthropic를 사용할 때는,baseURL을 Anthropic SDK가 호출해야 하는 API 루트(예:https://api.anthropic.com또는 사용 중인 게이트웨이 루트)로 설정하세요. LibreChat은 해당 provider에 대해 기본 Anthropic/v1/messages경로를 사용합니다.
provider
키:
| Key | Type | Description | Example |
|---|---|---|---|
| provider | String | 기본 OpenAI 호환 클라이언트 대신 네이티브 제공자 클라이언트를 통해 사용자 지정 endpoint를 라우팅합니다. | Currently supports `anthropic`. |
기본값: 생략됨. 이 경우 OpenAI 호환 커스텀 endpoint 경로를 사용합니다.
지원되는 값:
"anthropic"- 이 엔드포인트의baseURL,apiKey,headers,addParams,dropParams및customParams.paramDefinitions와 함께 네이티브 Anthropic/v1/messages클라이언트를 사용합니다.
예시:
endpoints:
custom:
- 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)'참고:
- Anthropic 자체 또는 네이티브 Messages API를 사용하는 Anthropic 호환 게이트웨이의 경우
provider: anthropic을 사용하세요. models.default아래에 모델을 명시적으로 나열하세요. OpenAI 스타일의models.fetch는 네이티브 Anthropic 커스텀 endpoint에는 사용되지 않습니다.customParams.defaultParamsEndpoint를 명시적으로 다르게 설정하지 않는 한, 해당 provider는 Anthropic UI 매개변수를 의미합니다.provider가 없는 endpoint는 OpenAI 호환 동작을 유지합니다.
iconURL
키:
| Key | Type | Description | Example |
|---|---|---|---|
| iconURL | String | 엔드포인트 아이콘으로 사용할 이미지 URL, 공개 에셋 경로 또는 내장 엔드포인트 아이콘 키입니다. |
기본값: ""
예시:
iconURL: https://github.com/danny-avila/LibreChat/raw/main/docs/assets/LibreChat.svg또는 내장된 endpoint 아이콘을 재사용하세요:
iconURL: openAI참고:
- 사용자 지정 endpoint
name을 아이콘을 재사용하기 위해 기본 제공 endpoint 이름으로 설정하지 마십시오. 사용자 지정 endpoint 이름은 고유해야 하며 다음과 같은 기본 endpoint 값을 사용해서는 안 됩니다:- "openAI" | "azureOpenAI" | "google" | "anthropic" | "assistants" | "azureAssistants" | "agents" | "bedrock"
- 프로젝트에 포함된 endpoint 아이콘을 사용하려면, 커스텀 endpoint
name을 고유하게 유지하고iconURL을 내장된 endpoint 키 중 하나로 설정하세요.- "openAI" | "azureOpenAI" | "google" | "anthropic" | "assistants" | "azureAssistants" | "agents" | "bedrock"
- 사용자 지정 이미지를 사용하려면
iconURL을 이미지 URL 또는/assets/my-icon.svg와 같이 LibreChat에서 제공하는 경로로 설정하세요. - 또한 아이콘이 제공되는 "알려진 엔드포인트(known endpoints)"(대소문자 구분 없음)가 있습니다. 엔드포인트
name이 다음 이름들과 일치하는 경우, 이 필드를 생략해야 합니다:- Anyscale
- APIpie
- Cohere
- Deepseek
- Fireworks
- groq
- Helicone
- Huggingface
- Mistral
- MLX
- Moonshot
- ollama
- OpenRouter
- Perplexity
- Qwen
- ShuttleAI
- together.ai
- 통합
- xai
models
키:
| Key | Type | Description | Example |
|---|---|---|---|
| models | Object | 모델을 위한 구성. |
필수
속성:
default
키:
| Key | Type | Description | Example |
|---|---|---|---|
| default | Array of Strings | 사용할 기본 모델을 나타내는 문자열 배열입니다. | If fetching models fails, these defaults are used as a fallback. |
필수
예시:
default:
- 'mistral-tiny'
- 'mistral-small'
- 'mistral-medium'fetch
키:
| Key | Type | Description | Example |
|---|---|---|---|
| fetch | Boolean | `true`로 설정하면 API에서 모델 목록을 가져오려고 시도합니다. | May cause slowdowns during initial use of the app if the response is delayed. Defaults to `false`. |
기본값: false
예시:
fetch: trueuserIdQuery
키:
| Key | Type | Description | Example |
|---|---|---|---|
| userIdQuery | Boolean | `true`로 설정하면 LibreChat 사용자 ID를 API 모델 요청의 쿼리 매개변수로 추가합니다. |
기본값: false
예시:
userIdQuery: truetitleConvo
키:
| Key | Type | Description | Example |
|---|---|---|---|
| titleConvo | Boolean | `true`로 설정하면 대화 제목 생성을 활성화합니다. |
기본값: false
예시:
titleConvo: truetitleTiming
키:
| Key | Type | Description | Example |
|---|---|---|---|
| titleTiming | String | 대화 제목이 생성되는 시점을 제어합니다. 유효한 값: "immediate" 또는 "final". | Defaults to "immediate". |
기본값: "immediate"
사용 가능한 값:
"immediate"- 요청이 시작되자마자 사용자의 첫 번째 메시지를 사용하여 모델 응답과 병렬로 제목을 생성합니다."final"- 전체 응답이 완료될 때까지 제목 생성을 지연합니다. 이는 기존의 레거시 동작을 유지합니다.
예시:
titleTiming: 'final'titleMethod
키:
| Key | Type | Description | Example |
|---|---|---|---|
| titleMethod | String | 대화 제목을 생성하는 데 사용되는 방식을 제어합니다. | Valid values: "completion" (default), "structured", "functions" (legacy alias for "structured") |
기본값: "completion"
사용 가능한 메서드:
"completion"- 도구/함수 없이 표준 completion API를 사용합니다. 대부분의 LLM과 호환됩니다."structured"- 제목 생성에 구조화된 출력(structured output)을 사용합니다. 공급자/모델의 지원이 필요합니다."functions"- "structured"에 대한 레거시 별칭입니다. 기능적으로 동일합니다.
예시:
titleMethod: 'completion'titleModel
키:
| Key | Type | Description | Example |
|---|---|---|---|
| titleModel | String | 제목에 사용할 모델을 지정합니다. | 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". |
기본값: "gpt-3.5-turbo"
예시:
titleModel: 'mistral-tiny'titleModel: 'current_model'titlePrompt
키:
| Key | Type | Description | Example |
|---|---|---|---|
| titlePrompt | String | 제목 생성을 위한 사용자 지정 프롬프트입니다. {convo} 플레이스홀더를 반드시 포함해야 합니다. | Allows full control over how titles are generated. |
기본값:
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}참고:
- 항상
{convo}플레이스홀더를 포함해야 합니다. {convo}플레이스홀더는 포맷된 대화 내용으로 대체됩니다.
예시:
titlePrompt: "Create a brief, descriptive title for the following conversation:\n\n{convo}\n\nTitle:"titlePromptTemplate
키:
| Key | Type | Description | Example |
|---|---|---|---|
| titlePromptTemplate | String | titlePrompt 내의 {convo}를 대체하는 대화 내용 서식 지정용 템플릿입니다. | Must include {input} and {output} placeholders. |
기본값: "User: {input}\nAI: {output}"
참고:
{input}및{output}자리 표시자를 모두 포함해야 합니다.titlePrompt에 삽입될 때 대화가 어떻게 포맷팅되는지 제어합니다.
예시:
titlePromptTemplate: "Human: {input}\n\nAssistant: {output}"titleEndpoint
키:
| Key | Type | Description | Example |
|---|---|---|---|
| titleEndpoint | String | 제목 생성에 사용할 대체 endpoint를 지정합니다. | Allows using a different model/endpoint for titles. |
기본값: 현재 사용자 지정 endpoint를 사용합니다.
허용되는 값:
openAIazureOpenAIgoogleanthropicbedrock- 또 다른 사용자 지정 endpoint 이름
예시:
# Use a different custom endpoint for titles
endpoints:
custom:
- name: 'my-chat-endpoint'
apiKey: '${CHAT_API_KEY}'
baseURL: 'https://api.example.com/v1/chat'
models:
default: ['gpt-4']
titleEndpoint: 'my-title-endpoint'
- name: 'my-title-endpoint'
apiKey: '${TITLE_API_KEY}'
baseURL: 'https://api.example.com/v1/title'
models:
default: ['gpt-3.5-turbo']modelDisplayLabel
키:
| Key | Type | Description | Example |
|---|---|---|---|
| modelDisplayLabel | String | 현재 AI 모델 아이콘 옆 메시지에 표시되는 라벨입니다. | 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". |
기본값: "AI"
예시:
modelDisplayLabel: 'Mistral'addParams
키:
| Key | Type | Description | Example |
|---|---|---|---|
| addParams | Object/Dictionary | 요청에 추가 매개변수를 추가합니다. 값은 문자열, 숫자, 불리언, 배열 또는 중첩된 객체일 수 있습니다. `web_search: true` 및 Google `url_context: true`와 같은 공급자 도구 토글을 지원합니다. | Adds/Overrides parameters. Useful for specifying API-specific options. |
예시:
addParams:
safe_prompt: true
max_tokens: 2048참고:
addParams필드를 사용하면 기본 페이로드( "Default Parameters" 섹션 참조)에 포함되지 않은 추가 매개변수를 포함할 수 있습니다. 이는 특히 API별 옵션을 설정할 때 유용합니다.
dropParams
키:
| Key | Type | Description | Example |
|---|---|---|---|
| dropParams | Array/List of Strings | 요청에서 기본 매개변수를 제거합니다. | Excludes specified default parameters. Useful for APIs that do not accept or recognize certain parameters. |
예시:
dropParams:
- 'stop'
- 'user'
- 'frequency_penalty'
- 'presence_penalty'참고:
dropParams필드는 모든 요청과 함께 전송되는 "Default Parameters"를 제거할 수 있게 해줍니다. 이는 특정 매개변수를 허용하지 않거나 인식하지 못하는 API와 작업할 때 유용합니다.
customParams
키:
| Key | Type | Description | Example |
|---|---|---|---|
| customParams | Object/Dictionary | 공급자 요청 본문에 포함되지 않는 사용자 지정 endpoint 동작 및 설정 메타데이터를 정의합니다. | Used for endpoint-specific configuration such as reasoning parameter shape. |
하위 키:
| Key | Type | Description | Example |
|---|---|---|---|
| defaultParamsEndpoint | String | 요청 매개변수 메타데이터에 사용되는 endpoint 기본값입니다. 기본값은 `custom`입니다. `provider: anthropic`이 설정되어 있고 이 필드가 생략된 경우, LibreChat은 Anthropic 매개변수 세트를 사용합니다. | defaultParamsEndpoint: custom |
| reasoningFormat | String | OpenAI 호환 커스텀 endpoint로 추론(reasoning) 매개변수가 전송되는 방식을 제어합니다. 유효한 값: `reasoning_effort`, `reasoning_object`, `disabled`. | reasoningFormat: reasoning_object |
| reasoningKey | String | 공급자 추론 콘텐츠를 읽기 위해 어떤 응답 키를 사용할지 제어합니다. 유효한 값: `reasoning` 또는 `reasoning_content`. | reasoningKey: reasoning_content |
| includeReasoningContent | Boolean | Replays provider `reasoning_content` within tool-call turns for OpenAI-compatible custom endpoints that require it. | includeReasoningContent: true |
| includeReasoningHistory | Boolean | 턴 전반에 걸쳐 지속된 대화 기록에서 `reasoning_content`를 재구성합니다. `includeReasoningContent`를 포함합니다. | includeReasoningHistory: true |
| paramDefinitions | Array/List | 이 endpoint에 대한 사용자 지정 설정 정의입니다. | See default parameter definitions. |
추론 형식:
reasoning_effort- 레거시reasoning_effort매개변수를 전송합니다.reasoning_object- 더 새로운 OpenAI 호환 형식을 따르는 공급자를 위해{ effort, summary }와 같은reasoning객체를 전송합니다.disabled- 사용자가 선택하거나 Model Specs에서 추론을 선택하더라도 추론 매개변수를 억제합니다.
추론 리플레이:
- 도구 호출(tool-call) 턴 중에 어시스턴트의
reasoning_content를 다시 재생해야 하는 OpenAI 호환 공급자(provider)의 경우includeReasoningContent: true를 사용하세요. includeReasoningHistory: true는 일부 Xiaomi MiMo 또는 Kimi 호환 게이트웨이와 같이 이후 턴에서 지속된 기록으로부터reasoning_content를 재구성해야 하는 공급자에게만 사용하세요.
Anthropic provider note:
사용자 지정 엔드포인트가 네이티브 Anthropic Messages API를 사용해야 할 때는 provider: anthropic를 사용하세요. OpenAI 호환 사용자 지정 엔드포인트 경로가 필요하지만 Anthropic 스타일의 매개변수 메타데이터와 요청 적응(request adaptation)을 원할 때만 provider 없이 customParams.defaultParamsEndpoint: anthropic를 사용하세요.
예시:
customParams:
reasoningFormat: reasoning_object
reasoningKey: reasoning_content
includeReasoningContent: truetokenConfig
키:
| Key | Type | Description | Example |
|---|---|---|---|
| tokenConfig | Object/Dictionary | 이 사용자 지정 endpoint에 대한 모델별 컨텍스트 윈도우 및 백만 토큰당 요금을 정의합니다. | Used by context usage, visible cost breakdowns, balance transactions, and multi-endpoint agent billing. |
각 키는 모델 이름입니다. 각 모델 항목은 다음을 지원합니다:
| Key | Type | Description | Example |
|---|---|---|---|
| prompt | Number | 백만 토큰당 프롬프트/입력 토큰 요금 | Required |
| completion | Number | 백만 토큰당 완료/출력 토큰 요금 | Required |
| context | Number | 모델의 최대 컨텍스트 윈도우입니다. | Required |
| cacheRead | Number | 백만 토큰당 캐시된 입력 읽기 속도. | Optional |
| cacheWrite | Number | 백만 토큰당 캐시된 입력 쓰기 요금 | Optional |
예시:
tokenConfig:
gpt-4o-mini:
prompt: 0.15
completion: 0.6
context: 128000
cacheRead: 0.075
cacheWrite: 0.15참고:
- 요금은
interface.currency변환이 표시를 위해 적용되기 전, USD 기준 백만 토큰당 요금으로 표시됩니다. - 모델 이름은 사용자 지정 endpoint를 통해 전송된 모델 값과 일치해야 합니다.
- 여러 엔드포인트를 사용하는 에이전트의 경우, 사용량 및 비용을 기록할 때 일치하는 엔드포인트/모델 토큰 설정이 사용됩니다.
headers
키:
| Key | Type | Description | Example |
|---|---|---|---|
| headers | Object/Dictionary | 요청에 추가 헤더를 추가합니다. 모든 헤더 값은 문자열이어야 합니다. `{{LIBRECHAT_USER_*}}`를 사용한 동적 사용자 필드 대체, `{{LIBRECHAT_BODY_*}}`를 사용한 요청 본문 플레이스홀더, 그리고 `${ENV_VAR}`를 사용한 환경 변수를 지원합니다. | The `headers` object specifies custom headers for requests. Useful for authentication and setting content types. |
예시:
headers:
x-api-key: '${ENVIRONMENT_VARIABLE}'
Content-Type: 'application/json'
X-User-ID: '{{LIBRECHAT_USER_ID}}'
X-User-Email: '{{LIBRECHAT_USER_EMAIL}}'참고: "${VARIABLE_NAME}" 형식을 사용하는 동적 환경 변수 값을 지원합니다.
models.fetch: true가 사용되면, 이러한 헤더들도 해석되어 관리자가 제어하는 기본 URL에 대한 모델 목록 요청으로 전달됩니다. 구성된 Authorization 헤더는 엔드포인트 apiKey 대체보다 우선순위를 가지며, 이는 사용자별 모델 목록을 반환하는 인증 인식 프록시에 유용합니다. baseURL: "user_provided"가 구성된 경우, LibreChat은 구성된 헤더 템플릿을 사용자가 제공한 대상으로 전달하지 않습니다. provider: anthropic의 경우, 헤더는 OpenAI 호환 클라이언트 대신 기본 Anthropic 클라이언트를 통해 전달됩니다.
사용 가능한 사용자 필드 플레이스홀더:
| 플레이스홀더 | 사용자 필드 | 타입 | 설명 |
|---|---|---|---|
{{LIBRECHAT_USER_ID}} | id | String | 사용자의 고유 식별자 |
{{LIBRECHAT_USER_NAME}} | name | String | 사용자의 표시 이름 |
{{LIBRECHAT_USER_USERNAME}} | username | String | 사용자의 사용자 이름 |
{{LIBRECHAT_USER_EMAIL}} | email | String | 사용자의 이메일 주소 |
{{LIBRECHAT_USER_PROVIDER}} | provider | String | 인증 제공자 (예: "email", "google", "github") |
{{LIBRECHAT_USER_ROLE}} | role | String | 사용자의 역할 (예: "user", "admin") |
{{LIBRECHAT_USER_GOOGLEID}} | googleId | String | Google 계정 ID |
{{LIBRECHAT_USER_FACEBOOKID}} | facebookId | String | Facebook 계정 ID |
{{LIBRECHAT_USER_OPENIDID}} | openidId | String | OpenID 계정 ID |
{{LIBRECHAT_USER_SAMLID}} | samlId | String | SAML 계정 ID |
{{LIBRECHAT_USER_LDAPID}} | ldapId | String | LDAP 계정 ID |
{{LIBRECHAT_USER_GITHUBID}} | githubId | String | GitHub 계정 ID |
{{LIBRECHAT_USER_DISCORDID}} | discordId | String | Discord 계정 ID |
{{LIBRECHAT_USER_APPLEID}} | appleId | String | Apple 계정 ID |
{{LIBRECHAT_USER_EMAILVERIFIED}} | emailVerified | Boolean → String | 이메일 인증 상태 ("true" 또는 "false") |
{{LIBRECHAT_USER_TWOFACTORENABLED}} | twoFactorEnabled | Boolean → String | 2FA 상태 ("true" 또는 "false") |
{{LIBRECHAT_USER_TERMSACCEPTED}} | termsAccepted | Boolean → String | 약관 동의 상태 ("true" 또는 "false") |
사용 가능한 요청 본문(Request Body) 플레이스홀더:
| 플레이스홀더 | 본문 필드 | 타입 | 설명 |
|---|---|---|---|
{{LIBRECHAT_BODY_CONVERSATIONID}} | conversationId | String | 현재 대화 식별자 |
{{LIBRECHAT_BODY_PARENTMESSAGEID}} | parentMessageId | String | 상위 메시지 식별자 |
{{LIBRECHAT_BODY_MESSAGEID}} | messageId | String | 현재 메시지 식별자 |
요청 본문 자리 표시자를 사용하는 예시:
headers:
X-Conversation-ID: '{{LIBRECHAT_BODY_CONVERSATIONID}}'
X-Parent-Message-ID: '{{LIBRECHAT_BODY_PARENTMESSAGEID}}'
X-Message-ID: '{{LIBRECHAT_BODY_MESSAGEID}}'directEndpoint
키:
| Key | Type | Description | Example |
|---|---|---|---|
| directEndpoint | Boolean | `true`로 설정하면 구성된 `baseURL`을 사용할 completions endpoint로 취급합니다 |
기본값: false
예시:
directEndpoint: truetitleMessageRole
- 옵션:
"system"|"user"|"assistant"
키:
| Key | Type | Description | Example |
|---|---|---|---|
| titleMessageRole | String | 제목 생성 시 메시지 페이로드에 사용할 역할(role) 값을 지정합니다. 다음 중 하나여야 합니다: `"system"`, `"user"`, `"assistant"`. | Defaults to "system" if omitted. May cause issues if "system" is not a valid value, which is sometimes the case for single message payloads, as it is for title generation. |
기본값: "system"
예시:
titleMessageRole: 'user'이 가이드는 어떤가요?